Feature Extraction
sentence-transformers
Safetensors
Transformers
English
qwen3
text-embeddings-inference
Instructions to use codefuse-ai/F2LLM-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use codefuse-ai/F2LLM-4B with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("codefuse-ai/F2LLM-4B") 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] - Transformers
How to use codefuse-ai/F2LLM-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="codefuse-ai/F2LLM-4B")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("codefuse-ai/F2LLM-4B") model = AutoModelForMultimodalLM.from_pretrained("codefuse-ai/F2LLM-4B") - Notebooks
- Google Colab
- Kaggle
Improve model card: Add pipeline tag, library name, paper and GitHub links
#1
by nielsr HF Staff - opened
This PR enhances the model card for F2LLM-4B by:
- Adding
pipeline_tag: feature-extractionto correctly categorize the model's functionality on the Hub. - Including
library_name: transformersto enable the automated "How to use" widget, as evidenced by the existing usage snippet. - Adding direct links to the paper (F2LLM Technical Report: Matching SOTA Embedding Performance with 6 Million Open-Source Data) and the GitHub repository for better visibility and easier access.
These changes will improve the model's discoverability and usability on the Hugging Face Hub.
Geralt-Targaryen changed pull request status to merged