Instructions to use codefuse-ai/F2LLM-v2-330M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use codefuse-ai/F2LLM-v2-330M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="codefuse-ai/F2LLM-v2-330M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("codefuse-ai/F2LLM-v2-330M") model = AutoModel.from_pretrained("codefuse-ai/F2LLM-v2-330M", device_map="auto") - sentence-transformers
How to use codefuse-ai/F2LLM-v2-330M with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("codefuse-ai/F2LLM-v2-330M") 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
Commit History
-
Update README.md
Verified signaturede3ccdf -
Upload 2 files
Verified signature7fcc99e
-
Fix word_embedding_dimension in 1_Pooling/config.json (#2)
- Fix word_embedding_dimension in 1_Pooling/config.json (d68959a243ef8c09cacc3354c578b0295b226930) Co-authored-by: Bram Vanroy <BramVanroy@users.noreply.huggingface.co>1b8f030
-
Update README.md
Verified signature1239cdd
-
Truncate layer_types to match num_hidden_layers (#1)
- Truncate layer_types to match num_hidden_layers (ac0ca53079b40a3c156fb999ed823700c54f8d89) Co-authored-by: Alexander Miller <alex-miller-gov@users.noreply.huggingface.co>e8ef9a8
-
Update README.md
Verified signature33d1c82
-
Update README.md
Verified signature4d19ed9
-
Update README.md
Verified signatureab2dd8f
-
Update README.md
Verified signatureb0e8e19 -
Upload folder using huggingface_hub
Verified signatureacf5ddd -
initial commit
Verified signature0fc8430