From 909852dde5ed6ba8e2d43ada168fe1f3320b0c4a Mon Sep 17 00:00:00 2001 From: stephantul Date: Tue, 15 Oct 2024 11:46:27 +0200 Subject: [PATCH] fix: move tensor to cpu --- model2vec/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model2vec/model.py b/model2vec/model.py index 017207c..2d88e94 100644 --- a/model2vec/model.py +++ b/model2vec/model.py @@ -111,7 +111,7 @@ def save_pretrained(self, path: PathLike, model_name: str | None = None) -> None """ save_pretrained( folder_path=Path(path), - embeddings=self.embedding.weight.numpy(), + embeddings=self.embedding.weight.cpu().numpy(), tokenizer=self.tokenizer, config=self.config, base_model_name=self.base_model_name,