Instructions to use Kelexine/LFM2.5-1.2B-Thinking-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Kelexine/LFM2.5-1.2B-Thinking-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Kelexine/LFM2.5-1.2B-Thinking-GGUF", filename="LFM2.5-1.2B-Thinking-Q8_0.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Kelexine/LFM2.5-1.2B-Thinking-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0 # Run inference directly in the terminal: llama-cli -hf Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0 # Run inference directly in the terminal: llama-cli -hf Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0
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 Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0
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 Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0
Use Docker
docker model run hf.co/Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0
- LM Studio
- Jan
- vLLM
How to use Kelexine/LFM2.5-1.2B-Thinking-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Kelexine/LFM2.5-1.2B-Thinking-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": "Kelexine/LFM2.5-1.2B-Thinking-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0
- Ollama
How to use Kelexine/LFM2.5-1.2B-Thinking-GGUF with Ollama:
ollama run hf.co/Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0
- Unsloth Studio
How to use Kelexine/LFM2.5-1.2B-Thinking-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 Kelexine/LFM2.5-1.2B-Thinking-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 Kelexine/LFM2.5-1.2B-Thinking-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Kelexine/LFM2.5-1.2B-Thinking-GGUF to start chatting
- Pi
How to use Kelexine/LFM2.5-1.2B-Thinking-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0
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": "Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Kelexine/LFM2.5-1.2B-Thinking-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 Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0
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 Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0
Run Hermes
hermes
- Docker Model Runner
How to use Kelexine/LFM2.5-1.2B-Thinking-GGUF with Docker Model Runner:
docker model run hf.co/Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0
- Lemonade
How to use Kelexine/LFM2.5-1.2B-Thinking-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0
Run and chat with the model
lemonade run user.LFM2.5-1.2B-Thinking-GGUF-Q8_0
List all available models
lemonade list
LFM 2.5 1.2B Thinking (GGUF)
Description
This repository contains the GGUF quantized version of LiquidAI/LFM2.5-1.2B-Thinking, a 1.2 billion parameter "thinking" language model by Liquid AI.
The model uses the novel Lfm2ForCausalLM architecture featuring a hybrid design of 10 double-gated LIV convolution blocks + 6 GQA attention blocks โ a departure from standard transformer-only designs. This architecture alternates between local convolution-based mixing and sparse global attention, enabling efficient sequence processing with strong reasoning capabilities.
Model Details
| Property | Value |
|---|---|
| Architecture | Lfm2ForCausalLM |
| Parameter Count | 1.17B |
| Layers | 16 (10 conv blocks + 6 GQA blocks) |
| Hidden Size | 2048 |
| Intermediate (FFN) | 8192 |
| Attention Heads | 32 |
| KV Heads (GQA) | 8 (on attention layers) |
| Context Length | 32,768 tokens |
| Vocabulary Size | 65,536 |
| Languages | English, Arabic, Chinese, French, German, Japanese, Korean, Spanish |
| Quantization | Q8_0 (8-bit) |
| File Type | GGUF |
Quantization Details
This model was quantized using llama.cpp with the Q8_0 scheme:
- Source format: F16 (converted from HuggingFace safetensors)
- Quantization: Q8_0 โ 8-bit quantization with block-wise scaling
- Quality: Near-lossless; ideal for deployment where precision matters
- Size reduction: ~50% smaller than F16 while retaining virtually all model quality
Usage with llama.cpp
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
cmake -B build && cmake --build build --config Release -j$(nproc)
./build/bin/llama-cli \
-hf Kelexine/LFM2.5-1.2B-Thinking-GGUF \
--temp 0.05 --top-k 50 --repeat-penalty 1.05 -n 4096 -cnv
Or with a local file:
./build/bin/llama-cli \
-m LFM2.5-1.2B-Thinking-Q8_0.gguf \
-p "<|im_start|>user\nYour prompt here<|im_end|>\n<|im_start|>assistant\n" \
--temp 0.05 --top-k 50 --repeat-penalty 1.05 -n 4096
Usage with Python (llama-cpp-python)
from llama_cpp import Llama
llm = Llama(
model_path="LFM2.5-1.2B-Thinking-Q8_0.gguf",
n_ctx=4096,
temperature=0.05,
top_k=50,
repeat_penalty=1.05,
)
response = llm(
"<|im_start|>user\nWhat is machine learning?<|im_end|>\n<|im_start|>assistant\n",
max_tokens=4096,
stop=["<|im_end|>"],
)
print(response["choices"][0]["text"])
Provided Files
| File | Description |
|---|---|
LFM2.5-1.2B-Thinking-Q8_0.gguf |
8-bit quantized GGUF (recommended) |
Limitations
- This is a 1.17B parameter model โ suited for lightweight tasks, quick prototyping, and edge deployment.
- The "Thinking" variant is designed for chain-of-thought reasoning but may produce verbose
<think>...</think>blocks; strip these in downstream integrations. - Requires a recent version of llama.cpp with
Lfm2ForCausalLMarchitecture support. - Not recommended for knowledge-intensive tasks or programming per Liquid AI's own guidance.
License
This repository inherits the LFM 1.0 License from the base model LiquidAI/LFM2.5-1.2B-Thinking.
Credits
- Downloads last month
- 14
8-bit
Model tree for Kelexine/LFM2.5-1.2B-Thinking-GGUF
Base model
LiquidAI/LFM2.5-1.2B-Base
docker model run hf.co/Kelexine/LFM2.5-1.2B-Thinking-GGUF:Q8_0