Instructions to use codefuse-ai/ML-Embed-0.6B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use codefuse-ai/ML-Embed-0.6B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="codefuse-ai/ML-Embed-0.6B")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("codefuse-ai/ML-Embed-0.6B") model = AutoModel.from_pretrained("codefuse-ai/ML-Embed-0.6B", device_map="auto") - sentence-transformers
How to use codefuse-ai/ML-Embed-0.6B with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("codefuse-ai/ML-Embed-0.6B") 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] - Notebooks
- Google Colab
- Kaggle
MTEB Leaderboard?
I stumbled upon this model by accident, looking at the high rankings of your F2LLM models on the various MTEB Benchmarks. Do you plan to benchmark and place this model there, too? If no, why?
Just curious. I know these benchmarks are highly flawed but also the next best thing to finding these models, since in production rarely people test a dozen different models.
Thanks for your attention! We did not submit the results of this model to the leaderboard, as we view it more as an exploration of experimental model architecture rather than a production-grade model for deployment. While ML-Embed provides an interesting way for obtaining various-sized models from a single training run, it is not without performance degradation (as you can see in Figure 4 in the paper). If you are looking for models to deploy, we recommend the baseline models F2LLM-v2.