Instructions to use LiquidAI/LFM2-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-350M-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf LiquidAI/LFM2-350M-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf LiquidAI/LFM2-350M-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf LiquidAI/LFM2-350M-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf LiquidAI/LFM2-350M-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf LiquidAI/LFM2-350M-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf LiquidAI/LFM2-350M-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf LiquidAI/LFM2-350M-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf LiquidAI/LFM2-350M-GGUF:Q4_K_M
Use Docker
docker model run hf.co/LiquidAI/LFM2-350M-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use LiquidAI/LFM2-350M-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LiquidAI/LFM2-350M-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LiquidAI/LFM2-350M-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LiquidAI/LFM2-350M-GGUF:Q4_K_M
- Ollama
How to use LiquidAI/LFM2-350M-GGUF with Ollama:
ollama run hf.co/LiquidAI/LFM2-350M-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use LiquidAI/LFM2-350M-GGUF with Docker Model Runner:
docker model run hf.co/LiquidAI/LFM2-350M-GGUF:Q4_K_M
- Lemonade
How to use LiquidAI/LFM2-350M-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull LiquidAI/LFM2-350M-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.LFM2-350M-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
license: other
|
| 3 |
license_name: lfm1.0
|
| 4 |
license_link: LICENSE
|
|
@@ -16,19 +17,53 @@ tags:
|
|
| 16 |
- liquid
|
| 17 |
- lfm2
|
| 18 |
- edge
|
| 19 |
-
- llama.cpp
|
| 20 |
-
- gguf
|
| 21 |
-
base_model:
|
| 22 |
-
- LiquidAI/LFM2-350M
|
| 23 |
---
|
| 24 |
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
# LFM2-350M-GGUF
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
Example usage with llama.cpp:
|
| 32 |
|
| 33 |
```
|
| 34 |
llama-cli -hf LiquidAI/LFM2-350M-GGUF
|
|
|
|
| 1 |
---
|
| 2 |
+
library_name: transformers
|
| 3 |
license: other
|
| 4 |
license_name: lfm1.0
|
| 5 |
license_link: LICENSE
|
|
|
|
| 17 |
- liquid
|
| 18 |
- lfm2
|
| 19 |
- edge
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
---
|
| 21 |
|
| 22 |
+
<center>
|
| 23 |
+
<div style="text-align: center;">
|
| 24 |
+
<img
|
| 25 |
+
src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/7_6D7rWrLxp2hb6OHSV1p.png"
|
| 26 |
+
alt="Liquid AI"
|
| 27 |
+
style="width: 100%; max-width: 66%; height: auto; display: inline-block; margin-bottom: 0.5em; margin-top: 0.5em;"
|
| 28 |
+
/>
|
| 29 |
+
</div>
|
| 30 |
+
|
| 31 |
+
<a href="https://playground.liquid.ai/chat">
|
| 32 |
+
<svg width="114.8" height="20" viewBox="0 0 1300 200" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Liquid Playground" style="margin-bottom: 1em;">
|
| 33 |
+
<title>Liquid: Playground</title>
|
| 34 |
+
<g>
|
| 35 |
+
<rect fill="#fff" width="600" height="200"></rect>
|
| 36 |
+
<rect fill="url(#x)" x="600" width="700" height="200"></rect>
|
| 37 |
+
</g>
|
| 38 |
+
<g transform="translate(20, 30) scale(0.4, 0.4)">
|
| 39 |
+
<path d="M172.314 129.313L172.219 129.367L206.125 188.18C210.671 195.154 213.324 203.457 213.324 212.382C213.324 220.834 210.956 228.739 206.839 235.479L275.924 213.178L167.853 33.6L141.827 76.9614L172.314 129.313Z" fill="black"/>
|
| 40 |
+
<path d="M114.217 302.4L168.492 257.003C168.447 257.003 168.397 257.003 168.352 257.003C143.515 257.003 123.385 237.027 123.385 212.387C123.385 203.487 126.023 195.204 130.55 188.24L162.621 132.503L135.966 86.7327L60.0762 213.183L114.127 302.4H114.217Z" fill="black"/>
|
| 41 |
+
<path d="M191.435 250.681C191.435 250.681 191.43 250.681 191.425 250.686L129.71 302.4H221.294L267.71 226.593L191.435 250.686V250.681Z" fill="black"/>
|
| 42 |
+
</g>
|
| 43 |
+
<g aria-hidden="true" fill="#fff" text-anchor="start" font-family="Verdana,DejaVu Sans,sans-serif" font-size="110">
|
| 44 |
+
<text x="200" y="148" textLength="329" fill="#000" opacity="0.1">Liquid</text>
|
| 45 |
+
<text x="190" y="138" textLength="329" fill="#000">Liquid</text>
|
| 46 |
+
<text x="655" y="148" textLength="619" fill="#000" opacity="0.1">Playground</text>
|
| 47 |
+
<text x="645" y="138" textLength="619">Playground</text>
|
| 48 |
+
</g>
|
| 49 |
+
|
| 50 |
+
<linearGradient id="x" x1="0%" y1="0%" x2="100%" y2="0%">
|
| 51 |
+
<stop offset="0%" style="stop-color:#000000"></stop>
|
| 52 |
+
<stop offset="100%" style="stop-color:#000000"></stop>
|
| 53 |
+
</linearGradient>
|
| 54 |
+
</svg>
|
| 55 |
+
</a>
|
| 56 |
+
</center>
|
| 57 |
|
| 58 |
# LFM2-350M-GGUF
|
| 59 |
|
| 60 |
+
LFM2 is a new generation of hybrid models developed by [Liquid AI](https://www.liquid.ai/), specifically designed for edge AI and on-device deployment. It sets a new standard in terms of quality, speed, and memory efficiency.
|
| 61 |
+
|
| 62 |
+
Find more details in the original model card: https://huggingface.co/LiquidAI/LFM2-350M
|
| 63 |
+
|
| 64 |
+
## 🏃 How to run LFM2
|
| 65 |
|
| 66 |
+
Example usage with [llama.cpp](https://github.com/ggml-org/llama.cpp):
|
| 67 |
|
| 68 |
```
|
| 69 |
llama-cli -hf LiquidAI/LFM2-350M-GGUF
|