Skip to content

Commit

Permalink
fix: move tensor to cpu (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephantul authored Oct 15, 2024
1 parent b4927e1 commit 5c1ba32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model2vec/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5c1ba32

Please sign in to comment.