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
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Introduction
|
| 2 |
|
| 3 |
-
<h1 align="center">
|
| 4 |
-
<a href="https://github.com/codefuse-ai/CodeFuse-Embeddings/tree/main/">
|
| 5 |
-
<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="30" height="30" style="vertical-align: middle; margin-right: 8px;">
|
| 6 |
-
CodeFuse-Embeddings
|
| 7 |
-
</a> |
|
| 8 |
-
</h1>
|
| 9 |
|
| 10 |
|
| 11 |
-
C2LLM: Advanced Code Embeddings for Deep Semantic Understanding
|
| 12 |
|
| 13 |
**C2LLMs (Code Contrastive Large Language Model)** is a powerful new model for generating code embeddings, designed to capture the deep semantics of source code.
|
| 14 |
|
|
|
|
| 1 |
+
<div align="center" style="display: flex; justify-content: center; align-items: center; gap: 20px;">
|
| 2 |
+
<a href="https://github.com/codefuse-ai/CodeFuse-Embeddings/tree/main/" style="display: flex; align-items: center; text-decoration: none; color: inherit;">
|
| 3 |
+
<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="30" height="30" style="vertical-align: middle; margin-right: 8px;">
|
| 4 |
+
<span style="font-size: 1.5em; font-weight: bold;">CodeFuse-Embeddings</span>
|
| 5 |
+
</a>
|
| 6 |
+
</div>
|
| 7 |
+
|
| 8 |
# Introduction
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
+
## C2LLM: Advanced Code Embeddings for Deep Semantic Understanding
|
| 13 |
|
| 14 |
**C2LLMs (Code Contrastive Large Language Model)** is a powerful new model for generating code embeddings, designed to capture the deep semantics of source code.
|
| 15 |
|