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
Browse filesHello!
## Pull Request overview
* Add `sentence-transformers` tag 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
README.md
CHANGED
|
@@ -9,6 +9,7 @@ pipeline_tag: feature-extraction
|
|
| 9 |
library_name: transformers
|
| 10 |
tags:
|
| 11 |
- code
|
|
|
|
| 12 |
---
|
| 13 |
<div align="center" style="display: flex; justify-content: center; align-items: center; gap: 20px;">
|
| 14 |
<a href="https://github.com/codefuse-ai/CodeFuse-Embeddings/tree/main/" style="display: flex; align-items: center; text-decoration: none; color: inherit;">
|
|
|
|
| 9 |
library_name: transformers
|
| 10 |
tags:
|
| 11 |
- code
|
| 12 |
+
- sentence-transformers
|
| 13 |
---
|
| 14 |
<div align="center" style="display: flex; justify-content: center; align-items: center; gap: 20px;">
|
| 15 |
<a href="https://github.com/codefuse-ai/CodeFuse-Embeddings/tree/main/" style="display: flex; align-items: center; text-decoration: none; color: inherit;">
|