Sentence Similarity
sentence-transformers
Safetensors
Transformers
French
English
Bilingual
feature-extraction
french
english
sentence-embedding
mteb
custom_code
Eval Results (legacy)
Instructions to use dangvantuan/french-document-embedding with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use dangvantuan/french-document-embedding with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("dangvantuan/french-document-embedding", trust_remote_code=True) sentences = [ "C'est une personne heureuse", "C'est un chien heureux", "C'est une personne très heureuse", "Aujourd'hui est une journée ensoleillée" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use dangvantuan/french-document-embedding with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("dangvantuan/french-document-embedding", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
tuan.ljn commited on
Commit ·
8dab408
1
Parent(s): 7074f9e
Feat: update model
Browse files
.ipynb_checkpoints/config-checkpoint.json
DELETED
|
@@ -1,50 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"_name_or_path": "dangvantuan/bilingual_impl",
|
| 3 |
-
"architectures": [
|
| 4 |
-
"BilingualModel"
|
| 5 |
-
],
|
| 6 |
-
"attention_probs_dropout_prob": 0.0,
|
| 7 |
-
"auto_map": {
|
| 8 |
-
"AutoConfig": "dangvantuan/bilingual_impl--configuration.BilingualConfig",
|
| 9 |
-
"AutoModel": "dangvantuan/bilingual_impl--modelling.BilingualModel",
|
| 10 |
-
"AutoModelForMaskedLM": "dangvantuan/bilingual_impl--modelling.BilingualForMaskedLM",
|
| 11 |
-
"AutoModelForMultipleChoice": "dangvantuan/bilingual_impl--modelling.BilingualForMultipleChoice",
|
| 12 |
-
"AutoModelForQuestionAnswering": "dangvantuan/bilingual_impl--modelling.BilingualForQuestionAnswering",
|
| 13 |
-
"AutoModelForSequenceClassification": "dangvantuan/bilingual_impl--modelling.BilingualForSequenceClassification",
|
| 14 |
-
"AutoModelForTokenClassification": "dangvantuan/bilingual_impl--modelling.BilingualForTokenClassification"
|
| 15 |
-
},
|
| 16 |
-
"classifier_dropout": 0.0,
|
| 17 |
-
"hidden_act": "gelu",
|
| 18 |
-
"hidden_dropout_prob": 0.1,
|
| 19 |
-
"hidden_size": 768,
|
| 20 |
-
"id2label": {
|
| 21 |
-
"0": "LABEL_0"
|
| 22 |
-
},
|
| 23 |
-
"initializer_range": 0.02,
|
| 24 |
-
"intermediate_size": 3072,
|
| 25 |
-
"label2id": {
|
| 26 |
-
"LABEL_0": 0
|
| 27 |
-
},
|
| 28 |
-
"layer_norm_eps": 1e-12,
|
| 29 |
-
"layer_norm_type": "layer_norm",
|
| 30 |
-
"logn_attention_clip1": false,
|
| 31 |
-
"logn_attention_scale": false,
|
| 32 |
-
"max_position_embeddings": 8192,
|
| 33 |
-
"model_type": "Bilingual",
|
| 34 |
-
"num_attention_heads": 12,
|
| 35 |
-
"num_hidden_layers": 12,
|
| 36 |
-
"pack_qkv": true,
|
| 37 |
-
"pad_token_id": 1,
|
| 38 |
-
"position_embedding_type": "rope",
|
| 39 |
-
"rope_scaling": {
|
| 40 |
-
"factor": 8.0,
|
| 41 |
-
"type": "ntk"
|
| 42 |
-
},
|
| 43 |
-
"rope_theta": 20000,
|
| 44 |
-
"torch_dtype": "float32",
|
| 45 |
-
"transformers_version": "4.42.3",
|
| 46 |
-
"type_vocab_size": 1,
|
| 47 |
-
"unpad_inputs": false,
|
| 48 |
-
"use_memory_efficient_attention": false,
|
| 49 |
-
"vocab_size": 250048
|
| 50 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.ipynb_checkpoints/config_sentence_transformers-checkpoint.json
DELETED
|
@@ -1,9 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"__version__": {
|
| 3 |
-
"sentence_transformers": "2.7.0",
|
| 4 |
-
"transformers": "4.42.3",
|
| 5 |
-
"pytorch": "2.2.1+cu121"
|
| 6 |
-
},
|
| 7 |
-
"prompts": {},
|
| 8 |
-
"default_prompt_name": null
|
| 9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|