-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nvidia/NV-Embed-v1 #239
Comments
What’s the error message? |
This is the error message. + infinity_emb --model-name-or-path /mnt/cache/zhangxingyan/hub/model/nvidia/NV-Embed-v1 --port 20052 --trust-remote-code
INFO: Started server process [8]
INFO: Waiting for application startup.
INFO 2024-05-31 13:07:47,181 infinity_emb INFO: select_model.py:54
model=`/mnt/cache/zhangxingyan/hub/model/nvidia/NV-E
mbed-v1` selected, using engine=`torch` and
device=`None`
INFO 2024-05-31 13:07:47,193 SentenceTransformer.py:107
sentence_transformers.SentenceTransformer
INFO: Load pretrained SentenceTransformer:
/mnt/cache/zhangxingyan/hub/model/nvidia/NV-
Embed-v1
WARNING 2024-05-31 13:07:47,195 SentenceTransformer.py:1129
sentence_transformers.SentenceTransformer
WARNING: No sentence-transformers model
found with name
/mnt/cache/zhangxingyan/hub/model/nvidia/NV
-Embed-v1. Creating a new one with MEAN
pooling.
ERROR: Traceback (most recent call last):
File "/app/.venv/lib/python3.10/site-packages/starlette/routing.py", line 677, in lifespan
async with self.lifespan_context(app) as maybe_state:
File "/usr/lib/python3.10/contextlib.py", line 199, in __aenter__
return await anext(self.gen)
File "/app/infinity_emb/infinity_server.py", line 46, in lifespan
app.model = AsyncEmbeddingEngine.from_args(engine_args) # type: ignore
File "/app/infinity_emb/engine.py", line 49, in from_args
engine = cls(**asdict(engine_args), _show_deprecation_warning=False)
File "/app/infinity_emb/engine.py", line 40, in __init__
self._model, self._min_inference_t, self._max_inference_t = select_model(
File "/app/infinity_emb/inference/select_model.py", line 62, in select_model
loaded_engine = unloaded_engine.value(engine_args=engine_args)
File "/app/infinity_emb/transformer/embedder/sentence_transformer.py", line 47, in __init__
super().__init__(
File "/app/.venv/lib/python3.10/site-packages/sentence_transformers/SentenceTransformer.py", line 199, in __init__
modules = self._load_auto_model(
File "/app/.venv/lib/python3.10/site-packages/sentence_transformers/SentenceTransformer.py", line 1134, in _load_auto_model
transformer_model = Transformer(
File "/app/.venv/lib/python3.10/site-packages/sentence_transformers/models/Transformer.py", line 36, in __init__
self._load_model(model_name_or_path, config, cache_dir, **model_args)
File "/app/.venv/lib/python3.10/site-packages/sentence_transformers/models/Transformer.py", line 65, in _load_model
self.auto_model = AutoModel.from_pretrained(
File "/app/.venv/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 550, in from_pretrained
model_class = get_class_from_dynamic_module(
File "/app/.venv/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 489, in get_class_from_dynamic_module
final_module = get_cached_module_file(
File "/app/.venv/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 315, in get_cached_module_file
modules_needed = check_imports(resolved_module_file)
File "/app/.venv/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 180, in check_imports
raise ImportError(
ImportError: This modeling file requires the following packages that were not found in your environment: einops. Run `pip install einops`
ERROR: Application startup failed. Exiting. This is because the model configuration is different from other models. The model configuration is located in the "text_config". {
"add_eos": true,
"add_pad_token": true,
"architectures": [
"NVEmbedModel"
],
"auto_map": {
"AutoConfig": "configuration_nvembed.NVEmbedConfig",
"AutoModel": "modeling_nvembed.NVEmbedModel"
},
"is_mask_instruction": true,
"latent_attention_config": {
"model_type": "latent_attention"
},
"mask_type": "b",
"model_type": "nvembed",
"padding_side": "right",
"text_config": {
"_name_or_path": "nvidia/NV-Embed-v1",
"add_cross_attention": false,
"architectures": [
"MistralModel"
],
"attention_dropout": 0.0,
"bad_words_ids": null,
"begin_suppress_tokens": null,
"bos_token_id": 1,
"chunk_size_feed_forward": 0,
"cross_attention_hidden_size": null,
"decoder_start_token_id": null,
"diversity_penalty": 0.0,
"do_sample": false,
"early_stopping": false,
"encoder_no_repeat_ngram_size": 0,
"eos_token_id": 2,
"exponential_decay_length_penalty": null,
"finetuning_task": null,
"forced_bos_token_id": null,
"forced_eos_token_id": null,
"hidden_act": "silu",
"hidden_size": 4096,
"id2label": {
"0": "LABEL_0",
"1": "LABEL_1"
},
"initializer_range": 0.02,
"intermediate_size": 14336,
"is_decoder": false,
"is_encoder_decoder": false,
"label2id": {
"LABEL_0": 0,
"LABEL_1": 1
},
"length_penalty": 1.0,
"max_length": 20,
"max_position_embeddings": 32768,
"min_length": 0,
"model_type": "bidir_mistral",
"no_repeat_ngram_size": 0,
"num_attention_heads": 32,
"num_beam_groups": 1,
"num_beams": 1,
"num_hidden_layers": 32,
"num_key_value_heads": 8,
"num_return_sequences": 1,
"output_attentions": false,
"output_hidden_states": false,
"output_scores": false,
"pad_token_id": null,
"prefix": null,
"problem_type": null,
"pruned_heads": {},
"remove_invalid_values": false,
"repetition_penalty": 1.0,
"return_dict": true,
"return_dict_in_generate": false,
"rms_norm_eps": 1e-05,
"rope_theta": 10000.0,
"sep_token_id": null,
"sliding_window": 4096,
"suppress_tokens": null,
"task_specific_params": null,
"temperature": 1.0,
"tf_legacy_loss": false,
"tie_encoder_decoder": false,
"tie_word_embeddings": false,
"tokenizer_class": null,
"top_k": 50,
"top_p": 1.0,
"torch_dtype": "float32",
"torchscript": false,
"typical_p": 1.0,
"use_bfloat16": false,
"use_cache": true,
"vocab_size": 32000
},
"torch_dtype": "float16",
"transformers_version": "4.37.2"
} |
Can you please install |
Sorry, I pasted the wrong log. This is the correct one. Thanks for your work. I also think that NVIDIA/NV-Emberd-v1 should consider changing their model.
|
I assume fixed now .closing |
Model description
https://huggingface.co/nvidia/NV-Embed-v1
NV-Embed-v1 ranks first on the MTEB. However, it cannot be loaded using the SentenceTransformer library.
Open source status
Provide useful links for the implementation
https://huggingface.co/nvidia/NV-Embed-v1
The text was updated successfully, but these errors were encountered: