Instructions to use codefuse-ai/F2LLM-v2-4B-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use codefuse-ai/F2LLM-v2-4B-Preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="codefuse-ai/F2LLM-v2-4B-Preview")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("codefuse-ai/F2LLM-v2-4B-Preview") model = AutoModel.from_pretrained("codefuse-ai/F2LLM-v2-4B-Preview", device_map="auto") - sentence-transformers
How to use codefuse-ai/F2LLM-v2-4B-Preview with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("codefuse-ai/F2LLM-v2-4B-Preview") 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
Upload intermediate checkpoints
Browse files
README.md
CHANGED
|
@@ -135,6 +135,10 @@ print(similarity)
|
|
| 135 |
# dtype=torch.bfloat16, grad_fn=<MmBackward0>)
|
| 136 |
```
|
| 137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
## Future Releases
|
| 139 |
|
| 140 |
We are committed to the open-source community and will soon release:
|
|
|
|
| 135 |
# dtype=torch.bfloat16, grad_fn=<MmBackward0>)
|
| 136 |
```
|
| 137 |
|
| 138 |
+
## Intermediate Checkpoints
|
| 139 |
+
|
| 140 |
+
To facilitate future research, we release intermediate checkpoints in the `intermediate_checkpoints` branch.
|
| 141 |
+
|
| 142 |
## Future Releases
|
| 143 |
|
| 144 |
We are committed to the open-source community and will soon release:
|