Views
No views yet
pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2sentences = ["This is an example sentence", "Each sentence is converted"]
3
4model = SentenceTransformer('OCR-robust-gte-multilingual-base}')
5embeddings = model.encode(sentences)
6print(embeddings)sentence_transformers.losses.MultipleNegativesRankingLoss with parameters:{'scale': 20.0, 'similarity_fct': 'cos_sim'}{
"epochs": 1,
"evaluation_steps": 0,
"evaluator": "NoneType",
"max_grad_norm": 1,
"optimizer_class": "<class 'torch.optim.adamw.AdamW'>",
"optimizer_params": {
"lr": 2e-05
},
"scheduler": "WarmupLinear",
"steps_per_epoch": null,
"warmup_steps": 250,
"weight_decay": 0.01
}SentenceTransformer(
(0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: NewModel
(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()
)1@inproceedings{michail-etal-2025-cheap,
2 title = "Cheap Character Noise for {OCR}-Robust Multilingual Embeddings",
3 author = "Michail, Andrianos and
4 Opitz, Juri and
5 Wang, Yining and
6 Meister, Robin and
7 Sennrich, Rico and
8 Clematide, Simon",
9 editor = "Che, Wanxiang and
10 Nabende, Joyce and
11 Shutova, Ekaterina and
12 Pilehvar, Mohammad Taher",
13 booktitle = "Findings of the Association for Computational Linguistics: ACL 2025",
14 month = jul,
15 year = "2025",
16 address = "Vienna, Austria",
17 publisher = "Association for Computational Linguistics",
18 url = "https://aclanthology.org/2025.findings-acl.609/",
19 doi = "10.18653/v1/2025.findings-acl.609",
20 pages = "11705--11716",
21 ISBN = "979-8-89176-256-5",1@inproceedings{zhang2024mgte,
2 title={mGTE: Generalized Long-Context Text Representation and Reranking Models for Multilingual Text Retrieval},
3 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},
4 booktitle={Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing: Industry Track},
5 pages={1393--1412},
6 year={2024}
7}