Instructions to use LiquidAI/LFM2.5-Encoder-350M-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use LiquidAI/LFM2.5-Encoder-350M-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible embeddings server: llama serve -hf LiquidAI/LFM2.5-Encoder-350M-GGUF:F16 --embeddings
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible embeddings server: llama serve -hf LiquidAI/LFM2.5-Encoder-350M-GGUF:F16 --embeddings
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible embeddings server: ./build/bin/llama serve -hf LiquidAI/LFM2.5-Encoder-350M-GGUF:F16 --embeddings
- Llama new
- LM Studio
- Jan
- Ollama
How to use LiquidAI/LFM2.5-Encoder-350M-GGUF with Ollama:
ollama run hf.co/LiquidAI/LFM2.5-Encoder-350M-GGUF:F16
- Unsloth Desktop
- Docker Model Runner
How to use LiquidAI/LFM2.5-Encoder-350M-GGUF with Docker Model Runner:
docker model run hf.co/LiquidAI/LFM2.5-Encoder-350M-GGUF:F16
- Lemonade
How to use LiquidAI/LFM2.5-Encoder-350M-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull LiquidAI/LFM2.5-Encoder-350M-GGUF:F16
Run and chat with the model
lemonade run user.LFM2.5-Encoder-350M-GGUF-F16
List all available models
lemonade list
- Atomic Chat
GGUF release: F16/Q8_0/Q4_0 + card aligned with the encoder release card
#1
by v4zhong - opened
- .gitattributes +3 -0
- LFM2.5-Encoder-350M-F16.gguf +3 -0
- LFM2.5-Encoder-350M-Q4_0.gguf +3 -0
- LFM2.5-Encoder-350M-Q8_0.gguf +3 -0
- LICENSE +2 -2
- README.md +55 -27
.gitattributes
CHANGED
|
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
LFM2.5-Encoder-350M-F16.gguf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
LFM2.5-Encoder-350M-Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
LFM2.5-Encoder-350M-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
LFM2.5-Encoder-350M-F16.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e63e9411bf8e843375cb4b13667c4500c64a749884bd0d04f77c21462929d02a
|
| 3 |
+
size 711482752
|
LFM2.5-Encoder-350M-Q4_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f8d5ffec7d62fe175c7ab28b6a79e60294abea922c24d917e9b0e276669ec16d
|
| 3 |
+
size 219307392
|
LFM2.5-Encoder-350M-Q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5260da695354414ffc17dbe1747aa3c55910b45a7dd90fca0008d8ae42c3b2b3
|
| 3 |
+
size 379215232
|
LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
LFM Open License v1.0
|
| 2 |
|
| 3 |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 4 |
|
|
@@ -68,4 +68,4 @@ You may add Your own copyright statement to Your modifications and may provide a
|
|
| 68 |
|
| 69 |
11. Termination. This License will terminate automatically and immediately if You fail to comply with any of its terms and conditions. Upon termination, You must cease all use of the Work and any Derivative Works and delete all copies in Your possession.
|
| 70 |
|
| 71 |
-
END OF TERMS AND CONDITIONS
|
|
|
|
| 1 |
+
LFM Open License v1.0
|
| 2 |
|
| 3 |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 4 |
|
|
|
|
| 68 |
|
| 69 |
11. Termination. This License will terminate automatically and immediately if You fail to comply with any of its terms and conditions. Upon termination, You must cease all use of the Work and any Derivative Works and delete all copies in Your possession.
|
| 70 |
|
| 71 |
+
END OF TERMS AND CONDITIONS
|
README.md
CHANGED
|
@@ -1,52 +1,80 @@
|
|
| 1 |
---
|
| 2 |
-
library_name: gguf
|
| 3 |
-
license: other
|
| 4 |
-
license_name: lfm1.0
|
| 5 |
-
license_link: LICENSE
|
| 6 |
language:
|
| 7 |
- en
|
| 8 |
-
- ar
|
| 9 |
-
- zh
|
| 10 |
-
- fr
|
| 11 |
- de
|
| 12 |
-
- ja
|
| 13 |
-
- ko
|
| 14 |
- es
|
| 15 |
-
-
|
| 16 |
- it
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
tags:
|
| 20 |
- liquid
|
|
|
|
| 21 |
- lfm2.5
|
| 22 |
-
-
|
|
|
|
|
|
|
| 23 |
- llama.cpp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
---
|
| 25 |
|
| 26 |
-
<
|
| 27 |
-
|
| 28 |
-
|
|
|
|
| 29 |
alt="Liquid AI"
|
| 30 |
style="width: 100%; max-width: 100%; height: auto; display: inline-block; margin-bottom: 0.5em; margin-top: 0.5em;"
|
| 31 |
/>
|
| 32 |
-
<div style="display: flex; justify-content: center; gap: 0.5em; margin-bottom: 1em;">
|
| 33 |
-
<a href="https://playground.liquid.ai/"><strong>Try LFM</strong></a> •
|
| 34 |
-
<a href="https://docs.liquid.ai/lfm/getting-started/welcome"><strong>Docs</strong></a> •
|
| 35 |
-
<a href="https://leap.liquid.ai/"><strong>LEAP</strong></a> •
|
| 36 |
-
<a href="https://discord.com/invite/liquid-ai"><strong>Discord</strong></a>
|
| 37 |
-
</div>
|
| 38 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
-
# LFM2.5-Encoder-350M
|
| 41 |
|
| 42 |
-
LFM2 is a
|
| 43 |
|
| 44 |
-
|
|
|
|
|
|
|
| 45 |
|
| 46 |
-
|
|
|
|
|
|
|
| 47 |
|
| 48 |
Example usage with [llama.cpp](https://github.com/ggml-org/llama.cpp):
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
```
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
```
|
|
|
|
|
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
language:
|
| 3 |
- en
|
|
|
|
|
|
|
|
|
|
| 4 |
- de
|
|
|
|
|
|
|
| 5 |
- es
|
| 6 |
+
- fr
|
| 7 |
- it
|
| 8 |
+
- nl
|
| 9 |
+
- pl
|
| 10 |
+
- pt
|
| 11 |
+
- ar
|
| 12 |
+
- hi
|
| 13 |
+
- ja
|
| 14 |
+
- ru
|
| 15 |
+
- tr
|
| 16 |
+
- vi
|
| 17 |
+
- zh
|
| 18 |
tags:
|
| 19 |
- liquid
|
| 20 |
+
- lfm2
|
| 21 |
- lfm2.5
|
| 22 |
+
- bidirectional
|
| 23 |
+
- masked-lm
|
| 24 |
+
- encoder
|
| 25 |
- llama.cpp
|
| 26 |
+
- gguf
|
| 27 |
+
pipeline_tag: fill-mask
|
| 28 |
+
license: other
|
| 29 |
+
license_name: lfm1.0
|
| 30 |
+
license_link: LICENSE
|
| 31 |
+
base_model:
|
| 32 |
+
- LiquidAI/LFM2.5-Encoder-350M
|
| 33 |
---
|
| 34 |
|
| 35 |
+
<center>
|
| 36 |
+
<div style="text-align: center;">
|
| 37 |
+
<img
|
| 38 |
+
src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/2b08LKpev0DNEk6DlnWkY.png"
|
| 39 |
alt="Liquid AI"
|
| 40 |
style="width: 100%; max-width: 100%; height: auto; display: inline-block; margin-bottom: 0.5em; margin-top: 0.5em;"
|
| 41 |
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
</div>
|
| 43 |
+
<div style="display: flex; justify-content: center; gap: 0.5em;">
|
| 44 |
+
<a href="https://playground.liquid.ai/"><strong>Try LFM</strong></a> • <a href="https://docs.liquid.ai/lfm"><strong>Documentation</strong></a> • <a href="https://leap.liquid.ai/"><strong>LEAP</strong></a>
|
| 45 |
+
</div>
|
| 46 |
+
</center>
|
| 47 |
|
| 48 |
+
# LFM2.5-Encoder-350M
|
| 49 |
|
| 50 |
+
LFM2.5-Encoder-350M is a multilingual bidirectional encoder built on the LFM2 architecture — a larger encoder for maximum downstream quality. It is a masked language model with full bidirectional attention, designed to be fine-tuned into task-specific models (classification, token classification, retrieval, reranking, and semantic similarity) across 15 languages, and to run efficiently on-device.
|
| 51 |
|
| 52 |
+
- **Highly capable for its size.** On par with the best similarly sized encoders and well ahead of our own retrieval siblings.
|
| 53 |
+
- **General-purpose.** 8k context, strong across NLI, paraphrase, sentiment, and multilingual tasks.
|
| 54 |
+
- **Fast and on-device.** Matches or beats ModernBERT throughput, with a long-context edge on CPU; runs in the browser on WebGPU.
|
| 55 |
|
| 56 |
+
Find more information about LFM2.5-Encoder-350M in our [blog post](https://www.liquid.ai/blog/lfm2-5-encoders).
|
| 57 |
+
|
| 58 |
+
## 🏃 How to run
|
| 59 |
|
| 60 |
Example usage with [llama.cpp](https://github.com/ggml-org/llama.cpp):
|
| 61 |
|
| 62 |
+
Run masked-token prediction — the prompt's literal `[MASK]` is replaced with the model's mask token, one non-causal forward pass is run, and the top-K predictions at the mask position are printed:
|
| 63 |
+
|
| 64 |
+
```bash
|
| 65 |
+
llama-fill-mask -hf LiquidAI/LFM2.5-Encoder-350M-GGUF "The capital of France is [MASK]." 5
|
| 66 |
+
# 1 11.42 ' Paris'
|
| 67 |
+
# 2 10.43 'Paris'
|
| 68 |
+
# 3 9.65 ' Nice'
|
| 69 |
+
# 4 8.94 ' Strasbourg'
|
| 70 |
+
# 5 8.62 ' Lyon'
|
| 71 |
```
|
| 72 |
+
|
| 73 |
+
For downstream use, the encoder body also serves per-token embeddings:
|
| 74 |
+
|
| 75 |
+
```bash
|
| 76 |
+
llama-server -hf LiquidAI/LFM2.5-Encoder-350M-GGUF --embeddings
|
| 77 |
+
curl -s http://localhost:8080/embedding -d '{"content": "hello world"}'
|
| 78 |
```
|
| 79 |
+
|
| 80 |
+
Find more details in the original model card: https://huggingface.co/LiquidAI/LFM2.5-Encoder-350M
|