Sentence-CamemBERT-Large
is the Embedding Model for French developed by
La Javaness
. The purpose of this embedding model is to represent the content and semantics of a French sentence in a mathematical vector which allows it to understand the meaning of the text-beyond individual words in queries and documents, offering a powerful semantic search.
Pre-trained sentence embedding models are state-of-the-art of Sentence Embeddings for French.
The model can be used directly (without a language model) as follows:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("dangvantuan/sentence-camembert-large")
sentences = ["Un avion est en train de décoller.",
"Un homme joue d'une grande flûte.",
"Un homme étale du fromage râpé sur une pizza.",
"Une personne jette un chat au plafond.",
"Une personne est en train de plier un morceau de papier.",
]
embeddings = model.encode(sentences)
Evaluation
The model can be evaluated as follows on the French test data of stsb.
from sentence_transformers import SentenceTransformer
from sentence_transformers.readers import InputExample
from datasets import load_dataset
defconvert_dataset(dataset):
dataset_samples=[]
for df in dataset:
score = float(df['similarity_score'])/5.0# Normalize score to range 0 ... 1
inp_example = InputExample(texts=[df['sentence1'],
df['sentence2']], label=score)
dataset_samples.append(inp_example)
return dataset_samples
# Loading the dataset for evaluation
df_dev = load_dataset("stsb_multi_mt", name="fr", split="dev")
df_test = load_dataset("stsb_multi_mt", name="fr", split="test")
# Convert the dataset for evaluation# For Dev set:
dev_samples = convert_dataset(df_dev)
val_evaluator = EmbeddingSimilarityEvaluator.from_input_examples(dev_samples, name='sts-dev')
val_evaluator(model, output_path="./")
# For Test set:
test_samples = convert_dataset(df_test)
test_evaluator = EmbeddingSimilarityEvaluator.from_input_examples(test_samples, name='sts-test')
test_evaluator(model, output_path="./")
Test Result
:
The performance is measured using Pearson and Spearman correlation:
@article{reimers2019sentence,
title={Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks},
author={Nils Reimers, Iryna Gurevych},
journal={https://arxiv.org/abs/1908.10084},
year={2019}
}
@article{martin2020camembert,
title={CamemBERT: a Tasty French Language Mode},
author={Martin, Louis and Muller, Benjamin and Su{\'a}rez, Pedro Javier Ortiz and Dupont, Yoann and Romary, Laurent and de la Clergerie, {\'E}ric Villemonte and Seddah, Djam{\'e} and Sagot, Beno{\^\i}t},
journal={Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics},
year={2020}
}
Runs of dangvantuan sentence-camembert-large on huggingface.co
28.8K
Total runs
187
24-hour runs
1.0K
3-day runs
1.8K
7-day runs
14.0K
30-day runs
More Information About sentence-camembert-large huggingface.co Model
sentence-camembert-large huggingface.co is an AI model on huggingface.co that provides sentence-camembert-large's model effect (), which can be used instantly with this dangvantuan sentence-camembert-large model. huggingface.co supports a free trial of the sentence-camembert-large model, and also provides paid use of the sentence-camembert-large. Support call sentence-camembert-large model through api, including Node.js, Python, http.
sentence-camembert-large huggingface.co is an online trial and call api platform, which integrates sentence-camembert-large's modeling effects, including api services, and provides a free online trial of sentence-camembert-large, you can try sentence-camembert-large online for free by clicking the link below.
dangvantuan sentence-camembert-large online free url in huggingface.co:
sentence-camembert-large is an open source model from GitHub that offers a free installation service, and any user can find sentence-camembert-large on GitHub to install. At the same time, huggingface.co provides the effect of sentence-camembert-large install, users can directly use sentence-camembert-large installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
sentence-camembert-large install url in huggingface.co: