Instructions to use LiquidAI/LFM2-2.6B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use LiquidAI/LFM2-2.6B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="LiquidAI/LFM2-2.6B-GGUF", filename="LFM2-2.6B-F16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use LiquidAI/LFM2-2.6B-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf LiquidAI/LFM2-2.6B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf LiquidAI/LFM2-2.6B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf LiquidAI/LFM2-2.6B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf LiquidAI/LFM2-2.6B-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-2.6B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf LiquidAI/LFM2-2.6B-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-2.6B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf LiquidAI/LFM2-2.6B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/LiquidAI/LFM2-2.6B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use LiquidAI/LFM2-2.6B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LiquidAI/LFM2-2.6B-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-2.6B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LiquidAI/LFM2-2.6B-GGUF:Q4_K_M
- Ollama
How to use LiquidAI/LFM2-2.6B-GGUF with Ollama:
ollama run hf.co/LiquidAI/LFM2-2.6B-GGUF:Q4_K_M
- Unsloth Studio new
How to use LiquidAI/LFM2-2.6B-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for LiquidAI/LFM2-2.6B-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for LiquidAI/LFM2-2.6B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for LiquidAI/LFM2-2.6B-GGUF to start chatting
- Pi new
How to use LiquidAI/LFM2-2.6B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf LiquidAI/LFM2-2.6B-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "LiquidAI/LFM2-2.6B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use LiquidAI/LFM2-2.6B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf LiquidAI/LFM2-2.6B-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default LiquidAI/LFM2-2.6B-GGUF:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use LiquidAI/LFM2-2.6B-GGUF with Docker Model Runner:
docker model run hf.co/LiquidAI/LFM2-2.6B-GGUF:Q4_K_M
- Lemonade
How to use LiquidAI/LFM2-2.6B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull LiquidAI/LFM2-2.6B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.LFM2-2.6B-GGUF-Q4_K_M
List all available models
lemonade list
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,12 +1,73 @@
|
|
| 1 |
-
|
| 2 |
---
|
| 3 |
license: other
|
| 4 |
license_name: lfm1.0
|
| 5 |
license_link: LICENSE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
tags:
|
| 7 |
- liquid
|
| 8 |
- lfm2
|
| 9 |
- edge
|
|
|
|
|
|
|
| 10 |
base_model:
|
| 11 |
- LiquidAI/LFM2-2.6B
|
| 12 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: other
|
| 3 |
license_name: lfm1.0
|
| 4 |
license_link: LICENSE
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
- ar
|
| 8 |
+
- zh
|
| 9 |
+
- fr
|
| 10 |
+
- de
|
| 11 |
+
- ja
|
| 12 |
+
- ko
|
| 13 |
+
- es
|
| 14 |
+
pipeline_tag: text-generation
|
| 15 |
tags:
|
| 16 |
- liquid
|
| 17 |
- lfm2
|
| 18 |
- edge
|
| 19 |
+
- llama.cpp
|
| 20 |
+
- gguf
|
| 21 |
base_model:
|
| 22 |
- LiquidAI/LFM2-2.6B
|
| 23 |
---
|
| 24 |
+
|
| 25 |
+
<center>
|
| 26 |
+
<div style="text-align: center;">
|
| 27 |
+
<img
|
| 28 |
+
src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/7_6D7rWrLxp2hb6OHSV1p.png"
|
| 29 |
+
alt="Liquid AI"
|
| 30 |
+
style="width: 100%; max-width: 66%; height: auto; display: inline-block; margin-bottom: 0.5em; margin-top: 0.5em;"
|
| 31 |
+
/>
|
| 32 |
+
</div>
|
| 33 |
+
|
| 34 |
+
<a href="https://playground.liquid.ai/chat">
|
| 35 |
+
<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;">
|
| 36 |
+
<title>Liquid: Playground</title>
|
| 37 |
+
<g>
|
| 38 |
+
<rect fill="#fff" width="600" height="200"></rect>
|
| 39 |
+
<rect fill="url(#x)" x="600" width="700" height="200"></rect>
|
| 40 |
+
</g>
|
| 41 |
+
<g transform="translate(20, 30) scale(0.4, 0.4)">
|
| 42 |
+
<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"/>
|
| 43 |
+
<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"/>
|
| 44 |
+
<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"/>
|
| 45 |
+
</g>
|
| 46 |
+
<g aria-hidden="true" fill="#fff" text-anchor="start" font-family="Verdana,DejaVu Sans,sans-serif" font-size="110">
|
| 47 |
+
<text x="200" y="148" textLength="329" fill="#000" opacity="0.1">Liquid</text>
|
| 48 |
+
<text x="190" y="138" textLength="329" fill="#000">Liquid</text>
|
| 49 |
+
<text x="655" y="148" textLength="619" fill="#000" opacity="0.1">Playground</text>
|
| 50 |
+
<text x="645" y="138" textLength="619">Playground</text>
|
| 51 |
+
</g>
|
| 52 |
+
|
| 53 |
+
<linearGradient id="x" x1="0%" y1="0%" x2="100%" y2="0%">
|
| 54 |
+
<stop offset="0%" style="stop-color:#000000"></stop>
|
| 55 |
+
<stop offset="100%" style="stop-color:#000000"></stop>
|
| 56 |
+
</linearGradient>
|
| 57 |
+
</svg>
|
| 58 |
+
</a>
|
| 59 |
+
</center>
|
| 60 |
+
|
| 61 |
+
# LFM2-2.6B-GGUF
|
| 62 |
+
|
| 63 |
+
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.
|
| 64 |
+
|
| 65 |
+
Find more details in the original model card: https://huggingface.co/LiquidAI/LFM2-2.6B
|
| 66 |
+
|
| 67 |
+
## 🏃 How to run LFM2
|
| 68 |
+
|
| 69 |
+
Example usage with [llama.cpp](https://github.com/ggml-org/llama.cpp):
|
| 70 |
+
|
| 71 |
+
```
|
| 72 |
+
llama-cli -hf LiquidAI/LFM2-2.6B-GGUF
|
| 73 |
+
```
|