Model reference · open weights
sentence-flaubert is an open-weight embedding model from Lajavaness. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | Lajavaness |
|---|---|
| Type | Embedding models |
| Task | Embeddings |
| Parameters (lead) | 137M |
| Context | 512 tokens |
| Runs with | sentence-transformers |
| Released | 2023-10-25 |
| Popularity | 678 downloads / month |
| Licence | Open weights |
About
Model is Fine-tuned using pre-trained flaubert/flaubert_base_uncased and Siamese BERT-Networks with 'sentences-transformers' combined with Augmented SBERT on dataset stsb along with Pair Sampling Strategies through 2 models CrossEncoder-camembert-large and dangvantuan/sentence-camembert-large
The model can be used directly (without a language model) as follows:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("Lajavaness/sentence-flaubert-base")
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)
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 sentence_transformers.evaluation import EmbeddingSimilarityEvaluator
from datasets import load_dataset
def convert_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 on the sts-benchmark:
| Model | Pearson correlation | Spearman correlation | #params |
|---|---|---|---|
| Lajavaness/sentence-flaubert-base | 87.14 | 87.10 | 137M |
| Lajavaness/sentence-camembert-base | 86.88 | 86.73 | 110M |
| dangvantuan/sentence-camembert-base | 86.73 | 86.54 | 110M |
| inokufu/flaubert-base-uncased-xnli-sts | 85.85 | 85.71 | 137M |
| distiluse-base-multilingual-cased | 79.22 | 79.16 | 135M |
Pearson score
| Model | STS-B | STS12-fr | STS13-fr | STS14-fr | STS15-fr | STS16-fr | SICK-fr | params |
|---|---|---|---|---|---|---|---|---|
| Lajavaness/sentence-flaubert-base | 85.5 | 86.64 | 87.24 | 85.68 | 88.00 | 75.78 | 82.84 | 137M |
| Lajavaness/sentence-camembert-base | 83.46 | 84.49 | 84.61 | 83.94 | 86.94 | 75.20 | 82.86 | 110M |
| inokufu/flaubert-base-uncased-xnli-sts | 82.82 | 84.79 | 85.76 | 82.81 | 85.38 | 74.05 | 82.23 | 137M |
| dangvantuan/sentence-camembert-base | 82.36 | 82.06 | 84.08 | 81.51 | 85.54 | 73.97 | 80.91 | 110M |
| sentence-transformers/distiluse-base-multilingual-cased-v2 | 78.63 | 72.51 | 67.25 | 70.12 | 79.93 | 66.67 | 77.76 | 135M |
| hugorosen/flaubert_base_uncased-xnli-sts | 78.38 | 79.00 | 77.61 | 76.56 | 79.03 | 71.22 | 80.58 | 137M |
| antoinelouis/biencoder-camembert-base-mmarcoFR | 76.97 | 71.43 | 73.50 | 70.56 | 78.44 | 71.23 | 77.62 | 110M |
Spearman score | Model | STS-B | STS12-fr | [STS13-fr](https://huggingface.co/datasets/Lajav
From the published model card. Full card on the HuggingFace links in the sidebar.
Benchmarks
As published on the model card — the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| Sentence-Embedding | Text Similarity fr | Test Pearson correlation coefficient | 87.140 |
Using it via the API
Once AxForge deploys sentence-flaubert for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (sentence-flaubert below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/embeddings \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"sentence-flaubert","input":"text to embed"}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.