初始化项目,由ModelHub XC社区提供模型
Model: unsloth/LFM2.5-8B-A1B-GGUF Source: Original Platform
This commit is contained in:
58
.gitattributes
vendored
Normal file
58
.gitattributes
vendored
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.model filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||||
|
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-IQ1_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-Q2_K_XL.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-IQ3_XXS.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-Q3_K_XL.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-IQ4_XS.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-Q4_K_XL.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-Q5_K_XL.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-IQ2_XXS.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-IQ2_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-IQ3_S.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-IQ4_NL.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-MXFP4_MOE.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-Q8_K_XL.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-Q6_K_XL.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
imatrix_unsloth.gguf_file filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-BF16.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
LFM2.5-8B-A1B-UD-Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
3
LFM2.5-8B-A1B-BF16.gguf
Normal file
3
LFM2.5-8B-A1B-BF16.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:bc9c40afbdbeb0bbc764f52c7d0b0088701fdecc78668c92ebc0a89e4a463bbe
|
||||||
|
size 16947260768
|
||||||
3
LFM2.5-8B-A1B-MXFP4_MOE.gguf
Normal file
3
LFM2.5-8B-A1B-MXFP4_MOE.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f4aeaba50cc24bf677aaa0cf75d0410e963195d2202390c5c9706e7f51ee839a
|
||||||
|
size 5348437600
|
||||||
3
LFM2.5-8B-A1B-Q8_0.gguf
Normal file
3
LFM2.5-8B-A1B-Q8_0.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ec11666b6129f0b4fe893760b66797f22e1c478a561b40e365f2b6930729b8d2
|
||||||
|
size 9010196064
|
||||||
3
LFM2.5-8B-A1B-UD-IQ1_M.gguf
Normal file
3
LFM2.5-8B-A1B-UD-IQ1_M.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4ea3c929fc1028d3564406c146e38938a47db166f0b5802350a785e4d7788e2b
|
||||||
|
size 2573872736
|
||||||
3
LFM2.5-8B-A1B-UD-IQ2_M.gguf
Normal file
3
LFM2.5-8B-A1B-UD-IQ2_M.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:463670a7140a5d9e2a05f05afce1cd55e81ec764bbfd26e80287727d3e48645f
|
||||||
|
size 2754588256
|
||||||
3
LFM2.5-8B-A1B-UD-IQ2_XXS.gguf
Normal file
3
LFM2.5-8B-A1B-UD-IQ2_XXS.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:99d381e0345d6a13721c9c0616c2bb45874b83a55e6a7689f8953f9369853730
|
||||||
|
size 2701274720
|
||||||
3
LFM2.5-8B-A1B-UD-IQ3_S.gguf
Normal file
3
LFM2.5-8B-A1B-UD-IQ3_S.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4a3c682957fa64e4361f651d6a157caaf8f2447bff64167eee0d258c0c937ef4
|
||||||
|
size 3570921056
|
||||||
3
LFM2.5-8B-A1B-UD-IQ3_XXS.gguf
Normal file
3
LFM2.5-8B-A1B-UD-IQ3_XXS.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f460496b7cf64a2cadc951e89884eb7509c0aae32f9f62062d42ebb415cfa675
|
||||||
|
size 3272339040
|
||||||
3
LFM2.5-8B-A1B-UD-IQ4_NL.gguf
Normal file
3
LFM2.5-8B-A1B-UD-IQ4_NL.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a1921216ded964e5c4f787226729e8c2c32bd587ac7b897742e0b7a7cc7eff6a
|
||||||
|
size 4358844000
|
||||||
3
LFM2.5-8B-A1B-UD-IQ4_XS.gguf
Normal file
3
LFM2.5-8B-A1B-UD-IQ4_XS.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:36a4f1c9fd045794e23978174aefda27971fdc2f257d6d032e3a26c047fe0eca
|
||||||
|
size 4264996448
|
||||||
3
LFM2.5-8B-A1B-UD-Q2_K_XL.gguf
Normal file
3
LFM2.5-8B-A1B-UD-Q2_K_XL.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:d5d1a7e009fe87e9f53ce2f2c8a6c8b07d560530837430085240be61055f8fed
|
||||||
|
size 2925768288
|
||||||
3
LFM2.5-8B-A1B-UD-Q3_K_M.gguf
Normal file
3
LFM2.5-8B-A1B-UD-Q3_K_M.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:541ca0ed07d2d7977858f71ba32e3ab57aed27e1c9f1d54285a665026285e247
|
||||||
|
size 3939626592
|
||||||
3
LFM2.5-8B-A1B-UD-Q3_K_XL.gguf
Normal file
3
LFM2.5-8B-A1B-UD-Q3_K_XL.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:1cadae9f79eeffa38d950acc75a6e635ffec2372f6d8fee9c79f6ed05e714986
|
||||||
|
size 4003114592
|
||||||
3
LFM2.5-8B-A1B-UD-Q4_K_M.gguf
Normal file
3
LFM2.5-8B-A1B-UD-Q4_K_M.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e2c8350d5e6e7c633b2ba4e20805a2c86bc46884cd285e8f3fe36ad917b772c7
|
||||||
|
size 5322223200
|
||||||
3
LFM2.5-8B-A1B-UD-Q4_K_S.gguf
Normal file
3
LFM2.5-8B-A1B-UD-Q4_K_S.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ff96de1f5ec9b6ee4f78524fcce3955d3fae89413f58e993f30126587d9f4032
|
||||||
|
size 5013941856
|
||||||
3
LFM2.5-8B-A1B-UD-Q4_K_XL.gguf
Normal file
3
LFM2.5-8B-A1B-UD-Q4_K_XL.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ee7c5e925a04cd672868959e48d199b66d6dcb9f90afe64f219856189e83b27e
|
||||||
|
size 5351583328
|
||||||
3
LFM2.5-8B-A1B-UD-Q5_K_M.gguf
Normal file
3
LFM2.5-8B-A1B-UD-Q5_K_M.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:90e0b86095c6485fd5a9b7fa9822a02ebb103b6846f3eb3648643cea946fe9cf
|
||||||
|
size 6361886304
|
||||||
3
LFM2.5-8B-A1B-UD-Q5_K_S.gguf
Normal file
3
LFM2.5-8B-A1B-UD-Q5_K_S.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:cf7d55ec2e0b427e152d31b08a5d7612472566efae7a2749064f507be9992c39
|
||||||
|
size 6005894752
|
||||||
3
LFM2.5-8B-A1B-UD-Q5_K_XL.gguf
Normal file
3
LFM2.5-8B-A1B-UD-Q5_K_XL.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f4ae9cae33235d0e5e81f9bd399ea36bb2c9aff6e1a60d1885f6b535406ed33e
|
||||||
|
size 6393081440
|
||||||
3
LFM2.5-8B-A1B-UD-Q6_K.gguf
Normal file
3
LFM2.5-8B-A1B-UD-Q6_K.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f5c60637503fcbb479275b1bca9358a315ca5916556f1eeed40013da45a914c3
|
||||||
|
size 7088287328
|
||||||
3
LFM2.5-8B-A1B-UD-Q6_K_XL.gguf
Normal file
3
LFM2.5-8B-A1B-UD-Q6_K_XL.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:de2718c45e69587a0589ebe5f531ed4a99bccf341b2c122b6479ffe28929a9be
|
||||||
|
size 7742467680
|
||||||
3
LFM2.5-8B-A1B-UD-Q8_K_XL.gguf
Normal file
3
LFM2.5-8B-A1B-UD-Q8_K_XL.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3e3df81ea436475a727905f01968069f0d2b4bc361b831f10d9137b004c3c395
|
||||||
|
size 9340497504
|
||||||
283
README.md
Normal file
283
README.md
Normal file
@@ -0,0 +1,283 @@
|
|||||||
|
---
|
||||||
|
library_name: transformers
|
||||||
|
license: other
|
||||||
|
license_name: lfm1.0
|
||||||
|
license_link: LICENSE
|
||||||
|
language:
|
||||||
|
- en
|
||||||
|
- ar
|
||||||
|
- zh
|
||||||
|
- fr
|
||||||
|
- de
|
||||||
|
- ja
|
||||||
|
- ko
|
||||||
|
- es
|
||||||
|
- pt
|
||||||
|
pipeline_tag: text-generation
|
||||||
|
tags:
|
||||||
|
- liquid
|
||||||
|
- unsloth
|
||||||
|
- lfm2.5
|
||||||
|
- edge
|
||||||
|
base_model:
|
||||||
|
- LiquidAI/LFM2.5-8B-A1B
|
||||||
|
---
|
||||||
|
|
||||||
|
## Updated from Liquid's chat template update
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<p style="margin-top: 0;margin-bottom: 0;">
|
||||||
|
<em><a href="https://docs.unsloth.ai/basics/unsloth-dynamic-v2.0-gguf">Unsloth Dynamic 2.0</a> achieves superior accuracy & outperforms other leading quants.</em>
|
||||||
|
</p>
|
||||||
|
<div style="display: flex; gap: 5px; align-items: center; ">
|
||||||
|
<a href="https://github.com/unslothai/unsloth/">
|
||||||
|
<img src="https://github.com/unslothai/unsloth/raw/main/images/unsloth%20new%20logo.png" width="133">
|
||||||
|
</a>
|
||||||
|
<a href="https://discord.gg/unsloth">
|
||||||
|
<img src="https://github.com/unslothai/unsloth/raw/main/images/Discord%20button.png" width="173">
|
||||||
|
</a>
|
||||||
|
<a href="https://docs.unsloth.ai/">
|
||||||
|
<img src="https://raw.githubusercontent.com/unslothai/unsloth/refs/heads/main/images/documentation%20green%20button.png" width="143">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<img
|
||||||
|
src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/2b08LKpev0DNEk6DlnWkY.png"
|
||||||
|
alt="Liquid AI"
|
||||||
|
style="width: 100%; max-width: 100%; height: auto; display: inline-block; margin-bottom: 0.5em; margin-top: 0.5em;"
|
||||||
|
/>
|
||||||
|
<div style="display: flex; justify-content: center; gap: 0.5em; margin-bottom: 1em;">
|
||||||
|
<a href="https://playground.liquid.ai/"><strong>Try LFM</strong></a> •
|
||||||
|
<a href="https://docs.liquid.ai/lfm/getting-started/welcome"><strong>Docs</strong></a> •
|
||||||
|
<a href="https://leap.liquid.ai/"><strong>LEAP</strong></a> •
|
||||||
|
<a href="https://discord.com/invite/liquid-ai"><strong>Discord</strong></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
# LFM2.5-8B-A1B
|
||||||
|
|
||||||
|
LFM2.5 is a new family of hybrid models designed for on-device deployment. It builds on the LFM2 architecture with extended pre-training and reinforcement learning.
|
||||||
|
|
||||||
|
- **On-device personal assistant**: Designed to power real-life applications, chaining tool calls, and following complex instructions on all devices.
|
||||||
|
- **Compressed performance**: Competitive with much larger dense and MoE models on instruction following and agentic tasks.
|
||||||
|
- **Unmatched throughput**: Fastest in its size class on both CPU and GPU inference, with day-one support for llama.cpp, MLX, vLLM, and SGLang.
|
||||||
|
|
||||||
|
Find more information about LFM2.5-8B-A1B in our [blog post](https://www.liquid.ai/blog/lfm2-5-8b-a1b).
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
**AA-Omniscience Index (higher is better) rewards correct answers and penalizes hallucinations. Scores range from -100 to 100. See more results on [Artificial Analysis](https://artificialanalysis.ai/evaluations/omniscience).*
|
||||||
|
|
||||||
|
## 🗒️ Model Details
|
||||||
|
|
||||||
|
| Model | Parameters | Description |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| [LFM2.5-8B-A1B-Base](https://huggingface.co/LiquidAI/LFM2.5-8B-A1B-Base) | 8.3B total / 1.5B active | Pre-trained base model for fine-tuning |
|
||||||
|
| [**LFM2.5-8B-A1B**](https://huggingface.co/LiquidAI/LFM2.5-8B-A1B) | 8.3B total / 1.5B active | Reasoning-tuned general-purpose model |
|
||||||
|
|
||||||
|
LFM2.5-8B-A1B is a general-purpose text-only model with the following features:
|
||||||
|
|
||||||
|
- **Total parameters**: 8.3B
|
||||||
|
- **Active parameters**: 1.5B
|
||||||
|
- **Number of layers**: 24 (18 double-gated LIV conv + 6 GQA)
|
||||||
|
- **Training budget**: 38 trillion tokens
|
||||||
|
- **Context length**: 131,072
|
||||||
|
- **Vocabulary size**: 128,000
|
||||||
|
- **Languages**: English, Arabic, Chinese, French, German, Japanese, Korean, Portuguese, Spanish
|
||||||
|
- **Generation parameters**: We recommend the following parameters:
|
||||||
|
- `temperature: 0.2`
|
||||||
|
- `top_k: 80`
|
||||||
|
- `repetition_penalty: 1.05`
|
||||||
|
|
||||||
|
| Model | Description |
|
||||||
|
| --- | --- |
|
||||||
|
| [**LFM2.5-8B-A1B**](https://huggingface.co/LiquidAI/LFM2.5-8B-A1B) | Original model checkpoint in native format. Best for fine-tuning or inference with Transformers, vLLM, and SGLang. |
|
||||||
|
| [LFM2.5-8B-A1B-GGUF](https://huggingface.co/LiquidAI/LFM2.5-8B-A1B-GGUF) | Quantized format for llama.cpp and compatible tools. Optimized for edge inference and local deployment. |
|
||||||
|
| [LFM2.5-8B-A1B-ONNX](https://huggingface.co/LiquidAI/LFM2.5-8B-A1B-ONNX) | ONNX Runtime format for cross-platform deployment. |
|
||||||
|
| [LFM2.5-8B-A1B-MLX](https://huggingface.co/LiquidAI/LFM2.5-8B-A1B-MLX-8bit) | MLX format for Apple Silicon. Optimized for fast inference on Mac devices. |
|
||||||
|
|
||||||
|
We recommend using LFM2.5-8B-A1B for agentic workflows, tool use, structured outputs, multilingual assistants, and on-device personal-assistant applications. It is not the best fit for heavy programming or knowledge-intensive question answering without retrieval.
|
||||||
|
|
||||||
|
### Chat Template
|
||||||
|
|
||||||
|
LFM2.5 uses a ChatML-like format. See the [Chat Template documentation](https://docs.liquid.ai/lfm/key-concepts/chat-template) for details. Example:
|
||||||
|
|
||||||
|
```
|
||||||
|
<|startoftext|><|im_start|>system
|
||||||
|
You are a helpful assistant trained by Liquid AI.<|im_end|>
|
||||||
|
<|im_start|>user
|
||||||
|
What is C. elegans?<|im_end|>
|
||||||
|
<|im_start|>assistant
|
||||||
|
```
|
||||||
|
|
||||||
|
Because LFM2.5-8B-A1B is a reasoning model, assistant turns contain an explicit chain of thought before the final answer. You can use [`tokenizer.apply_chat_template()`](https://huggingface.co/docs/transformers/en/chat_templating#using-applychattemplate) to format your messages automatically.
|
||||||
|
|
||||||
|
### Tool Use
|
||||||
|
|
||||||
|
LFM2.5 supports function calling in four steps:
|
||||||
|
|
||||||
|
1. **Function definition**: Provide the list of tools as a JSON object in the system prompt, or use [`tokenizer.apply_chat_template()`](https://huggingface.co/docs/transformers/en/chat_extras#passing-tools) with `tools=...`.
|
||||||
|
2. **Function call**: By default, LFM2.5 writes Pythonic function calls (a Python list between `<|tool_call_start|>` and `<|tool_call_end|>` special tokens), as the assistant answer. You can override this behavior by asking the model to output JSON function calls in the system prompt.
|
||||||
|
3. **Function execution**: Execute the call and return the result with the `tool` role.
|
||||||
|
4. **Final answer**: LFM2.5 interprets the tool output and returns a plain-text answer addressing the original prompt.
|
||||||
|
|
||||||
|
See the [Tool Use documentation](https://docs.liquid.ai/lfm/key-concepts/tool-use) for the full guide. Example:
|
||||||
|
|
||||||
|
```
|
||||||
|
<|startoftext|><|im_start|>system
|
||||||
|
List of tools: [{"name": "get_candidate_status", "description": "Retrieves the current status of a candidate in the recruitment process", "parameters": {"type": "object", "properties": {"candidate_id": {"type": "string", "description": "Unique identifier for the candidate"}}, "required": ["candidate_id"]}}]<|im_end|>
|
||||||
|
<|im_start|>user
|
||||||
|
What is the current status of candidate ID 12345?<|im_end|>
|
||||||
|
<|im_start|>assistant
|
||||||
|
<|tool_call_start|>[get_candidate_status(candidate_id="12345")]<|tool_call_end|>Checking the current status of candidate ID 12345.<|im_end|>
|
||||||
|
<|im_start|>tool
|
||||||
|
[{"candidate_id": "12345", "status": "Interview Scheduled", "position": "Clinical Research Associate", "date": "2023-11-20"}]<|im_end|>
|
||||||
|
<|im_start|>assistant
|
||||||
|
The candidate with ID 12345 is currently in the "Interview Scheduled" stage for the position of Clinical Research Associate, with an interview date set for 2023-11-20.<|im_end|>
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🏃 Inference
|
||||||
|
|
||||||
|
LFM2.5-8B-A1B is supported by many inference frameworks. See the [Inference documentation](https://docs.liquid.ai/lfm/inference/transformers) for the full list.
|
||||||
|
|
||||||
|
| Name | Description | Docs | Notebook |
|
||||||
|
|------|-------------|------|:--------:|
|
||||||
|
| [Transformers](https://github.com/huggingface/transformers) | Simple inference with direct access to model internals. | <a href="https://docs.liquid.ai/lfm/inference/transformers">Link</a> | <a href="https://colab.research.google.com/drive/1_q3jQ6LtyiuPzFZv7Vw8xSfPU5FwkKZY?usp=sharing"><img src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/vlOyMEjwHa_b_LXysEu2E.png" width="110" alt="Colab link"></a> |
|
||||||
|
| [vLLM](https://github.com/vllm-project/vllm) | High-throughput production deployments with GPU. | <a href="https://docs.liquid.ai/lfm/inference/vllm">Link</a> | <a href="https://colab.research.google.com/drive/1VfyscuHP8A3we_YpnzuabYJzr5ju0Mit?usp=sharing"><img src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/vlOyMEjwHa_b_LXysEu2E.png" width="110" alt="Colab link"></a> |
|
||||||
|
| [llama.cpp](https://github.com/ggml-org/llama.cpp) | Cross-platform inference with CPU offloading. | <a href="https://docs.liquid.ai/lfm/inference/llama-cpp">Link</a> | <a href="https://colab.research.google.com/drive/1ohLl3w47OQZA4ELo46i5E4Z6oGWBAyo8?usp=sharing"><img src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/vlOyMEjwHa_b_LXysEu2E.png" width="110" alt="Colab link"></a> |
|
||||||
|
| [MLX](https://github.com/ml-explore/mlx) | Apple's machine learning framework optimized for Apple Silicon. | <a href="https://docs.liquid.ai/lfm/inference/mlx">Link</a> | — |
|
||||||
|
| [LM Studio](https://lmstudio.ai/) | Desktop application for running LLMs locally. | <a href="https://docs.liquid.ai/lfm/inference/lm-studio">Link</a> | — |
|
||||||
|
|
||||||
|
Quick start with Transformers (compatible with `transformers>=5.0.0`):
|
||||||
|
|
||||||
|
```python
|
||||||
|
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
|
||||||
|
|
||||||
|
model_id = "LiquidAI/LFM2.5-8B-A1B"
|
||||||
|
model = AutoModelForCausalLM.from_pretrained(
|
||||||
|
model_id,
|
||||||
|
device_map="auto",
|
||||||
|
dtype="bfloat16",
|
||||||
|
# attn_implementation="flash_attention_2" <- uncomment on compatible GPU
|
||||||
|
)
|
||||||
|
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
||||||
|
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
|
||||||
|
|
||||||
|
prompt = "What is C. elegans?"
|
||||||
|
|
||||||
|
input_ids = tokenizer.apply_chat_template(
|
||||||
|
[{"role": "user", "content": prompt}],
|
||||||
|
add_generation_prompt=True,
|
||||||
|
return_tensors="pt",
|
||||||
|
tokenize=True,
|
||||||
|
).to(model.device)
|
||||||
|
|
||||||
|
output = model.generate(
|
||||||
|
input_ids,
|
||||||
|
do_sample=True,
|
||||||
|
temperature=0.2,
|
||||||
|
top_k=80,
|
||||||
|
repetition_penalty=1.05,
|
||||||
|
max_new_tokens=8192,
|
||||||
|
streamer=streamer,
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🔧 Fine-Tuning
|
||||||
|
|
||||||
|
We recommend fine-tuning LFM2.5 for your specific use case to achieve the best results.
|
||||||
|
|
||||||
|
| Name | Description | Docs | Notebook |
|
||||||
|
|------|-------------|------|----------|
|
||||||
|
| CPT ([Unsloth](https://github.com/unslothai/unsloth)) | Continued Pre-Training using Unsloth for text completion. | <a href="https://docs.liquid.ai/lfm/fine-tuning/unsloth">Link</a> | <a href="https://colab.research.google.com/drive/10fm7eNMezs-DSn36mF7vAsNYlOsx9YZO?usp=sharing"><img src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/vlOyMEjwHa_b_LXysEu2E.png" width="110" alt="Colab link"></a> |
|
||||||
|
| CPT ([Unsloth](https://github.com/unslothai/unsloth)) | Continued Pre-Training using Unsloth for translation. | <a href="https://docs.liquid.ai/lfm/fine-tuning/unsloth">Link</a> | <a href="https://colab.research.google.com/drive/1gaP8yTle2_v35Um8Gpu9239fqbU7UgY8?usp=sharing"><img src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/vlOyMEjwHa_b_LXysEu2E.png" width="110" alt="Colab link"></a> |
|
||||||
|
| SFT ([Unsloth](https://github.com/unslothai/unsloth)) | Supervised Fine-Tuning with LoRA using Unsloth. | <a href="https://docs.liquid.ai/lfm/fine-tuning/unsloth">Link</a> | <a href="https://colab.research.google.com/drive/1vGRg4ksRj__6OLvXkHhvji_Pamv801Ss?usp=sharing"><img src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/vlOyMEjwHa_b_LXysEu2E.png" width="110" alt="Colab link"></a> |
|
||||||
|
| SFT ([TRL](https://github.com/huggingface/trl)) | Supervised Fine-Tuning with LoRA using TRL. | <a href="https://docs.liquid.ai/lfm/fine-tuning/trl">Link</a> | <a href="https://colab.research.google.com/drive/1j5Hk_SyBb2soUsuhU0eIEA9GwLNRnElF?usp=sharing"><img src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/vlOyMEjwHa_b_LXysEu2E.png" width="110" alt="Colab link"></a> |
|
||||||
|
| DPO ([TRL](https://github.com/huggingface/trl)) | Direct Preference Optimization with LoRA using TRL. | <a href="https://docs.liquid.ai/lfm/fine-tuning/trl">Link</a> | <a href="https://colab.research.google.com/drive/1MQdsPxFHeZweGsNx4RH7Ia8lG8PiGE1t?usp=sharing"><img src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/vlOyMEjwHa_b_LXysEu2E.png" width="110" alt="Colab link"></a> |
|
||||||
|
| GRPO ([Unsloth](https://github.com/unslothai/unsloth)) | GRPO with LoRA using Unsloth. | <a href="https://docs.liquid.ai/lfm/fine-tuning/unsloth">Link</a> | <a href="https://colab.research.google.com/drive/1mIikXFaGvcW4vXOZXLbVTxfBRw_XsXa5?usp=sharing"><img src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/vlOyMEjwHa_b_LXysEu2E.png" width="110" alt="Colab link"></a> |
|
||||||
|
| GRPO ([TRL](https://github.com/huggingface/trl)) | GRPO with LoRA using TRL. | <a href="https://docs.liquid.ai/lfm/fine-tuning/trl">Link</a> | <a href="https://colab.research.google.com/github/Liquid4All/cookbook/blob/main/finetuning/notebooks/grpo_for_verifiable_tasks.ipynb"><img src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/vlOyMEjwHa_b_LXysEu2E.png" width="110" alt="Colab link"></a> |
|
||||||
|
|
||||||
|
## 📊 Performance
|
||||||
|
|
||||||
|
### Improvements over LFM2-8B-A1B
|
||||||
|
|
||||||
|
Thanks to reasoning, scaled-up pre-training, and large-scale RL, LFM2.5-8B-A1B improves over its predecessor across the board:
|
||||||
|
|
||||||
|
| Benchmark | LFM2-8B-A1B | LFM2.5-8B-A1B | Δ |
|
||||||
|
| :--- | ---: | ---: | ---: |
|
||||||
|
| AA-Omniscience Index | -78.42 | -24.70 | +53.62 |
|
||||||
|
| AA-Omniscience Accuracy | 7.33 | 8.67 | +1.34 |
|
||||||
|
| AA-Omniscience Non-Hallucination Rate | 7.46 | 63.47 | +56.01 |
|
||||||
|
| IFEval | 79.44 | 91.84 | +12.40 |
|
||||||
|
| IFBench | 26.00 | 56.47 | +30.47 |
|
||||||
|
| Multi-IF | 58.54 | 79.93 | +21.39 |
|
||||||
|
| MATH500 | 74.80 | 88.76 | +13.96 |
|
||||||
|
| AIME25 | 20.00 | 42.53 | +22.53 |
|
||||||
|
| BFCLv3 | 45.07 | 64.36 | +19.29 |
|
||||||
|
| BFCLv4 | 25.52 | 48.50 | +22.98 |
|
||||||
|
| Tau² Telecom | 13.60 | 88.07 | +74.47 |
|
||||||
|
| Tau² Retail | 7.02 | 39.82 | +32.80 |
|
||||||
|
|
||||||
|
### Knowledge and instruction following
|
||||||
|
|
||||||
|
| Model | Parameters | AA-Omni. Index | AA-Omni. Accuracy | AA-Omni. Non-Halluc. | IFEval | IFBench | Multi-IF |
|
||||||
|
| :--- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
||||||
|
| LFM2.5-8B-A1B | 8B/A1B | -24.70 | 8.67 | 63.47 | 91.84 | 56.47 | 79.93 | |
|
||||||
|
| Granite-4.0-H-Tiny | 7B/A1B | -75.50 | 9.37 | 6.38 | 82.23 | 21.28 | 59.00 | |
|
||||||
|
| Qwen3.5-4B | 4B | -51.53 | 17.20 | 16.99 | 87.80 | 50.38 | 67.43 | |
|
||||||
|
| Qwen3-30B-A3B-Thinking-2507 | 30.5B/3.3B | -51.31 | 18.80 | 13.87 | 90.82 | 51.11 | 79.04 | |
|
||||||
|
| Gemma-4-E2B-IT | 5.1B | -72 | 7.00 | 15.05 | 82.93 | 33.53 | 69.70 | |
|
||||||
|
| Gemma-4-E4B-IT | 8B | -50.67 | 8.10 | 36.06 | 87.74 | 39.48 | 77.58 | |
|
||||||
|
| Gemma-4-26B-A4B-IT | 26B/4B | -62.07 | 14.37 | 10.75 | 91.40 | 47.25 | 82.06 | |
|
||||||
|
| gpt-oss-20b | 21B/3.6B | -49.17 | 14.57 | 24.50 | 86.73 | 58.65 | 76.64 | |
|
||||||
|
|
||||||
|
### Math and agentic workflows
|
||||||
|
|
||||||
|
| Model | Parameters | MATH500 | AIME25 | AIME26 | BFCLv3 | BFCLv4 | Tau² Telecom | Tau² Retail |
|
||||||
|
|---|---|---|---|---|---|---|---|---|
|
||||||
|
| LFM2.5-8B-A1B | 8B/A1B | 88.76 | 42.53 | 50.00 | 64.79 | 49.73 | 88.07 | 39.82 |
|
||||||
|
| Granite-4.0-H-Tiny | 7B/A1B | 59.20 | 4.93 | 3.33 | 56.89 | 28.52 | 16.67 | 18.42 |
|
||||||
|
| Qwen3.5-4B | 4B | 80.76 | 54.28 | 58.33 | 71.06 | 54.01 | 87.72 | 71.93 |
|
||||||
|
| Qwen3-30B-A3B-Thinking-2507 | 30.5B/3.3B | 86.48 | 71.67 | 66.67 | 73.39 | 50.53 | 21.93 | 56.14 |
|
||||||
|
| Gemma-4-E2B-IT | 5.1B | 64.00 | 26 | 30 | 56.44 | 31.91 | 22.37 | 18.95 |
|
||||||
|
| Gemma-4-E4B-IT | 8B | 65.00 | 34.33 | 40.67 | 57.31 | 33.92 | 26.75 | 42.11 |
|
||||||
|
|
||||||
|
### CPU Inference
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### GPU Inference
|
||||||
|
|
||||||
|
LFM2.5-8B-A1B is the fastest model in its size class, reaching **18.5K output tokens per second at high concurrency**, over 1.6B tokens per day on a single H100.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 📬 Contact
|
||||||
|
|
||||||
|
- Got questions or want to connect? [Join our Discord community](https://discord.com/invite/liquid-ai).
|
||||||
|
- If you are interested in custom solutions with edge deployment, please contact [our sales team](https://www.liquid.ai/contact).
|
||||||
|
|
||||||
|
## Citation
|
||||||
|
|
||||||
|
```bibtex
|
||||||
|
@article{liquidAI20268BA1B,
|
||||||
|
author = {Liquid AI},
|
||||||
|
title = {LFM2.5-8B-A1B: Personal Assistant On Your Laptop},
|
||||||
|
journal = {Liquid AI Blog},
|
||||||
|
year = {2026},
|
||||||
|
note = {www.liquid.ai/blog/lfm2-5-8b-a1b},
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```bibtex
|
||||||
|
@article{liquidai2025lfm2,
|
||||||
|
title = {LFM2 Technical Report},
|
||||||
|
author = {Liquid AI},
|
||||||
|
journal = {arXiv preprint arXiv:2511.23404},
|
||||||
|
year = {2025}
|
||||||
|
}
|
||||||
|
```
|
||||||
3
imatrix_unsloth.gguf_file
Normal file
3
imatrix_unsloth.gguf_file
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:09cf3e3f38c9906dc0239750f524d4e728b8fe985ad04bcfc07dd55bbb6e4474
|
||||||
|
size 17375232
|
||||||
Reference in New Issue
Block a user