Model reference · open weights
french-document-embedding is an open-weight embedding model from dangvantuan. 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 | dangvantuan |
|---|---|
| Type | Embedding models |
| Task | Embeddings |
| Parameters (lead) | 305M |
| Context | 8k tokens |
| Runs with | sentence-transformers |
| Released | 2024-08-16 |
| Popularity | 1k downloads / month |
| Licence | Open weights |
About
french-document-embedding is an embedding model for documents in the French-English language, with a context length of up to 8096 tokens. This model is a specialized text-embedding model trained specifically for the French-English language. It is built upon gte-multilingual and trained using the [SimilarityLoss], Multi-Negative Ranking Loss, Matryoshka2dLoss and GISTEmbedLoss using guide model. This model embeds and converts long texts or documents into vectors with 786 dimensions, making it useful for vector databases serving semantic search or RAG (Retrieval-Augmented Generation).
SentenceTransformer(
(0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: BilingualModel
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
(2): Normalize()
)
Using this model becomes easy when you have sentence-transformers installed:
pip install -U sentence-transformers
Then you can use the model like this:
from sentence_transformers import SentenceTransformer
sentences = ["Paris est une capitale de la France", "Paris is a capital of France"]
model = SentenceTransformer('dangvantuan/french-document-embedding', trust_remote_code=True)
embeddings = model.encode(sentences)
print(embeddings)
@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{zhang2024mgte,
title={mGTE: Generalized Long-Context Text Representation and Reranking Models for Multilingual Text Retrieval},
author={Zhang, Xin and Zhang, Yanzhao and Long, Dingkun and Xie, Wen and Dai, Ziqi and Tang, Jialong and Lin, Huan and Yang, Baosong and Xie, Pengjun and Huang, Fei and others},
journal={arXiv preprint arXiv:2407.19669},
year={2024}
}
@article{li2023towards,
title={Towards general text embeddings with multi-stage contrastive learning},
author={Li, Zehan and Zhang, Xin and Zhang, Yanzhao and Long, Dingkun and Xie, Pengjun and Zhang, Meishan},
journal={arXiv preprint arXiv:2308.03281},
year={2023}
}
@article{li20242d,
title={2d matryoshka sentence embeddings},
author={Li, Xianming and Li, Zongxi and Li, Jing and Xie, Haoran and Li, Qing},
journal={arXiv preprint arXiv:2402.14776},
year={2024}
}
@misc{henderson2017efficient,
title={Efficient Natural Language Response Suggestion for Smart Reply},
author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
year={2017},
eprint={1705.00652},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@misc{solatorio2024gistembed,
title={GISTEmbed: Guided In-sample Selection of Training Negatives for Text Embedding Fine-tuning},
author={Aivin V. Solatorio},
year={2024},
eprint={2402.16829},
archivePrefix={arXiv},
primaryClass={cs.LG}
}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 |
|---|---|---|---|
| Clustering | MTEB AlloProfClusteringP2P | v_measure | 59.692 |
| Clustering | MTEB AlloProfClusteringP2P | v_measures | |
| Clustering | MTEB AlloProfClusteringS2S | v_measure | 45.607 |
| Clustering | MTEB AlloProfClusteringS2S | v_measures | |
| Reranking | MTEB AlloprofReranking | map | 73.518 |
| Reranking | MTEB AlloprofReranking | mrr | 74.855 |
| Reranking | MTEB AlloprofReranking | nAUC_map_diff1 | 56.006 |
| Reranking | MTEB AlloprofReranking | nAUC_map_max | 27.886 |
| Reranking | MTEB AlloprofReranking | nAUC_mrr_diff1 | 56.681 |
| Reranking | MTEB AlloprofReranking | nAUC_mrr_max | 29.363 |
| Retrieval | MTEB AlloprofRetrieval | map_at_1 | 32.081 |
| Retrieval | MTEB AlloprofRetrieval | map_at_10 | 43.582 |
| Retrieval | MTEB AlloprofRetrieval | map_at_100 | 44.381 |
| Retrieval | MTEB AlloprofRetrieval | map_at_1000 | 44.426 |
| Retrieval | MTEB AlloprofRetrieval | map_at_20 | 44.061 |
| Retrieval | MTEB AlloprofRetrieval | map_at_3 | 40.602 |
| Retrieval | MTEB AlloprofRetrieval | map_at_5 | 42.381 |
| Retrieval | MTEB AlloprofRetrieval | mrr_at_1 | 32.081 |
| Retrieval | MTEB AlloprofRetrieval | mrr_at_10 | 43.582 |
| Retrieval | MTEB AlloprofRetrieval | mrr_at_100 | 44.381 |
| Retrieval | MTEB AlloprofRetrieval | mrr_at_1000 | 44.426 |
| Retrieval | MTEB AlloprofRetrieval | mrr_at_20 | 44.061 |
| Retrieval | MTEB AlloprofRetrieval | mrr_at_3 | 40.602 |
| Retrieval | MTEB AlloprofRetrieval | mrr_at_5 | 42.381 |
Using it via the API
Once AxForge deploys french-document-embedding for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (french-document-embedding 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":"french-document-embedding","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.