Feature Extraction
sentence-transformers
PyTorch
ONNX
Safetensors
OpenVINO
xlm-roberta
mteb
Sentence Transformers
sentence-similarity
Eval Results (legacy)
Eval Results
text-embeddings-inference
Instructions to use intfloat/multilingual-e5-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use intfloat/multilingual-e5-large with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("intfloat/multilingual-e5-large") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Inference
- Notebooks
- Google Colab
- Kaggle
Only 4G memory usage when inferring while 38Go when training
#15
by hayj - opened
Is it normal it takes much more GPU mem when training, or am I wrongly using it?
I use a Nvidia A100.
Yes, this is normal. During training, it needs to store optimizer states, intermediate activations, and some other stuff, which are several times larger than the model weights.
Please refer to https://huggingface.co/docs/transformers/v4.20.1/en/perf_train_gpu_one#anatomy-of-models-memory for more details.