Sentence Similarity
Transformers
Safetensors
multilingual
nllb-llm2vec
feature-extraction
text-embedding
embeddings
information-retrieval
beir
text-classification
language-model
text-clustering
text-semantic-similarity
text-evaluation
text-reranking
Sentence Similarity
natural_questions
ms_marco
fever
hotpot_qa
mteb
custom_code
fdschmidt93
commited on
Commit
·
0a0e65e
1
Parent(s):
74cdef3
fix(model): correctly configure AutoModelForTokenClassification
Browse files- config.json +2 -1
- modeling_nllbllm2vec.py +2 -2
config.json
CHANGED
@@ -5,7 +5,8 @@
|
|
5 |
"auto_map": {
|
6 |
"AutoConfig": "configuration_nllbllm2vec.NLLBLLM2VecConfig",
|
7 |
"AutoModel": "modeling_nllbllm2vec.NLLBLLM2Vec",
|
8 |
-
"AutoModelForSequenceClassification": "modeling_nllbllm2vec.NLLBLLM2VecForSequenceClassification"
|
|
|
9 |
},
|
10 |
"llm2vec_config": {
|
11 |
"_name_or_path": "McGill-NLP/LLM2Vec-Meta-Llama-3-8B-Instruct-mntp",
|
|
|
5 |
"auto_map": {
|
6 |
"AutoConfig": "configuration_nllbllm2vec.NLLBLLM2VecConfig",
|
7 |
"AutoModel": "modeling_nllbllm2vec.NLLBLLM2Vec",
|
8 |
+
"AutoModelForSequenceClassification": "modeling_nllbllm2vec.NLLBLLM2VecForSequenceClassification",
|
9 |
+
"AutoModelForTokenClassification": "modeling_nllbllm2vec.NLLBLLM2VecForTokenClassification"
|
10 |
},
|
11 |
"llm2vec_config": {
|
12 |
"_name_or_path": "McGill-NLP/LLM2Vec-Meta-Llama-3-8B-Instruct-mntp",
|
modeling_nllbllm2vec.py
CHANGED
@@ -18,7 +18,7 @@ from transformers.modeling_outputs import (
|
|
18 |
TokenClassifierOutput,
|
19 |
)
|
20 |
from transformers.modeling_utils import PreTrainedModel
|
21 |
-
from transformers.models.auto import AutoModel, AutoModelForSequenceClassification
|
22 |
from transformers.models.m2m_100.modeling_m2m_100 import M2M100Encoder
|
23 |
from transformers.tokenization_utils import BatchEncoding
|
24 |
|
@@ -536,6 +536,6 @@ AutoModel.register(NLLBLLM2VecConfig, NLLBLLM2Vec)
|
|
536 |
AutoModelForSequenceClassification.register(
|
537 |
NLLBLLM2VecConfig, NLLBLLM2VecForSequenceClassification
|
538 |
)
|
539 |
-
|
540 |
NLLBLLM2VecConfig, NLLBLLM2VecForTokenClassification
|
541 |
)
|
|
|
18 |
TokenClassifierOutput,
|
19 |
)
|
20 |
from transformers.modeling_utils import PreTrainedModel
|
21 |
+
from transformers.models.auto import AutoModel, AutoModelForSequenceClassification, AutoModelForTokenClassification
|
22 |
from transformers.models.m2m_100.modeling_m2m_100 import M2M100Encoder
|
23 |
from transformers.tokenization_utils import BatchEncoding
|
24 |
|
|
|
536 |
AutoModelForSequenceClassification.register(
|
537 |
NLLBLLM2VecConfig, NLLBLLM2VecForSequenceClassification
|
538 |
)
|
539 |
+
AutoModelForTokenClassification.register(
|
540 |
NLLBLLM2VecConfig, NLLBLLM2VecForTokenClassification
|
541 |
)
|