Feature Extraction
Transformers
Safetensors
sentence-transformers
Chinese
English
c2llm
code
custom_code
Instructions to use codefuse-ai/C2LLM-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use codefuse-ai/C2LLM-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="codefuse-ai/C2LLM-7B", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("codefuse-ai/C2LLM-7B", trust_remote_code=True, dtype="auto") - sentence-transformers
How to use codefuse-ai/C2LLM-7B with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("codefuse-ai/C2LLM-7B", trust_remote_code=True) 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
Add `sentence-transformers` tag for better discoverability
#1
by tomaarsen HF Staff - opened
Hello!
Pull Request overview
- Add
sentence-transformerstag for better discoverability
Details
I just stumbled upon these models via the MTEB Code leaderboard, and I hadn't heard about them yet! I tend to check https://huggingface.co/models?library=sentence-transformers for new models, but this one wasn't tagged with it. This PR should help others in the same way as well.
- Tom Aarsen
Thanks!
Geralt-Targaryen changed pull request status to merged