Model failing in prod after today's config.yaml update
Hi @zpn
We're using Nomic Embed v1.5 and are getting an error on model load as of today, has been working previously:
huggingface_hub.errors.LocalTokenNotFoundError: Token is required (`token=True`), but no token found. You need to provide a token or be logged in to Hugging Face with `huggingface-cli login` or `huggingface_hub.login`. See https://huggingface.co/settings/tokens.
The traceback suggests the error is coming from this line https://huggingface.co/nomic-ai/nomic-bert-2048/blob/main/modeling_hf_nomic_bert.py#L65.
I attempted the following to resolve the error:
- Pinning an earlier revision of the repo, which failed as the old dependency was deleted
- Passing a token to the
SentenceTransformer()
instantiation, which didn't have any effect - Trying various versions of Python, sentence transformers, and einops to ensure it is not a dependency issue
Would appreciate any advice on how to get the model up and running again!
This should work if you do huggingface-cli login
, otherwise I'll have to rewrite some logic to get this working for both private and public models.
I handled by copying the files .py file here: https://huggingface.co/nomic-ai/nomic-bert-2048/tree/main to my local model path, and updating config.json like this:
"auto_map": {
"AutoConfig": "configuration_hf_nomic_bert.NomicBertConfig",
"AutoModel": "modeling_hf_nomic_bert.NomicBertModel",
"AutoModelForMaskedLM": "modeling_hf_nomic_bert.NomicBertForPreTraining"
Thanks for the advice @zpn it is working now! I'm not used to this sort of second-order authentication, the pointer was helpful!
As a note to anyone who finds this thread in my same situation, I'm running it as a script so I ended up using huggingface_hub.login(token="")
.
@jeffmeloy you should be able to clear you Huggingface cache (or at least the place where the Nomic models are stored) and it should work as well