How do I run nvidia/NV-Embed-v2 in Colab?
from transformers import AutoModel
model_name = "nvidia/NV-Embed-v2"
model = AutoModel.from_pretrained(model_name, trust_remote_code=True)
AttributeError Traceback (most recent call last)
in <cell line: 4>()
2
3 model_name = "nvidia/NV-Embed-v2"
----> 4 model = AutoModel.from_pretrained(model_name, trust_remote_code=True)
5 # model = AutoModel.from_pretrained(model_name)
5 frames
/usr/local/lib/python3.10/dist-packages/transformers/configuration_utils.py in getattribute(self, key)
200 if key != "attribute_map" and key in super().getattribute("attribute_map"):
201 key = super().getattribute("attribute_map")[key]
--> 202 return super().getattribute(key)
203
204 def init(self, **kwargs):
AttributeError: 'LatentAttentionConfig' object has no attribute '_attn_implementation_internal'
Hi,
@pympk
. Please install the transformer package as suggested here: https://huggingface.co/nvidia/NV-Embed-v2#2-required-packages
Similar reported issue is also here: https://huggingface.co/nvidia/NV-Embed-v1/discussions/50