Skip to content

Commit 233505e

Browse files
jioffe502claude
andauthored
fix: add trust_remote_code=True to AutoTokenizer for embedqa model (#1461)
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e20bee2 commit 233505e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nemo_retriever/src/nemo_retriever/model/local/llama_nemotron_embed_1b_v2_embedder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __post_init__(self) -> None:
4545
MODEL_ID = self.model_id or "nvidia/llama-3.2-nv-embedqa-1b-v2"
4646
dev = torch.device(self.device or ("cuda" if torch.cuda.is_available() else "cpu"))
4747
hf_cache_dir = self.hf_cache_dir or str(Path.home() / ".cache" / "huggingface")
48-
self._tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, cache_dir=hf_cache_dir)
48+
self._tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True, cache_dir=hf_cache_dir)
4949
self._model = AutoModel.from_pretrained(MODEL_ID, trust_remote_code=True, cache_dir=hf_cache_dir)
5050
self._model = self._model.to(dev)
5151
self._model.eval()

0 commit comments

Comments
 (0)