Instructions to use codefuse-ai/F2LLM-v2-14B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use codefuse-ai/F2LLM-v2-14B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="codefuse-ai/F2LLM-v2-14B")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("codefuse-ai/F2LLM-v2-14B") model = AutoModel.from_pretrained("codefuse-ai/F2LLM-v2-14B", device_map="auto") - sentence-transformers
How to use codefuse-ai/F2LLM-v2-14B with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("codefuse-ai/F2LLM-v2-14B") 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
|
@@ -119,7 +119,7 @@ F2LLM-v2 is fully open. We release base models in 5 sizes, instruct models in 8
|
|
| 119 |
|
| 120 |
The F2LLM-v2 family set a new state-of-the-art on a wide range of MTEB benchmarks, including Code, European, Scandinavian, German, French, Spanish, Polish, Dutch, Japanese, Vietnamese, Thai, Indic, Persian, among others.
|
| 121 |
|
| 122 |
-
<img src="img/performance.png" width="
|
| 123 |
|
| 124 |
For details, refer to the [MTEB leaderboard](https://huggingface.co/spaces/mteb/leaderboard).
|
| 125 |
|
|
@@ -211,7 +211,7 @@ For symmetric tasks such as STS, clustering, and bitext mining, you can encode t
|
|
| 211 |
|
| 212 |
This model is trained with Matryoshka Representation Learning (MRL), allowing for a superior tradeoff between performance and embedding size. You can truncate the embeddings to keep only the first `d` dimensions to reduce storage and speed up vector search in downstream systems. The model is trained with a smallest Matryoshka dimension of 8.
|
| 213 |
|
| 214 |
-
<img src="img/mrl.png" width="
|
| 215 |
|
| 216 |
Example:
|
| 217 |
```python
|
|
|
|
| 119 |
|
| 120 |
The F2LLM-v2 family set a new state-of-the-art on a wide range of MTEB benchmarks, including Code, European, Scandinavian, German, French, Spanish, Polish, Dutch, Japanese, Vietnamese, Thai, Indic, Persian, among others.
|
| 121 |
|
| 122 |
+
<img src="img/performance.png" width="100%" alt="Performance">
|
| 123 |
|
| 124 |
For details, refer to the [MTEB leaderboard](https://huggingface.co/spaces/mteb/leaderboard).
|
| 125 |
|
|
|
|
| 211 |
|
| 212 |
This model is trained with Matryoshka Representation Learning (MRL), allowing for a superior tradeoff between performance and embedding size. You can truncate the embeddings to keep only the first `d` dimensions to reduce storage and speed up vector search in downstream systems. The model is trained with a smallest Matryoshka dimension of 8.
|
| 213 |
|
| 214 |
+
<img src="img/mrl.png" width="80%" alt="MRL results">
|
| 215 |
|
| 216 |
Example:
|
| 217 |
```python
|