Instructions to use texassred/LFM2.5-8B-A1B-heretic-16e-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 texassred/LFM2.5-8B-A1B-heretic-16e-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 texassred/LFM2.5-8B-A1B-heretic-16e-GGUF # Run inference directly in the terminal: llama cli -hf texassred/LFM2.5-8B-A1B-heretic-16e-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf texassred/LFM2.5-8B-A1B-heretic-16e-GGUF # Run inference directly in the terminal: llama cli -hf texassred/LFM2.5-8B-A1B-heretic-16e-GGUF
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 texassred/LFM2.5-8B-A1B-heretic-16e-GGUF # Run inference directly in the terminal: ./llama-cli -hf texassred/LFM2.5-8B-A1B-heretic-16e-GGUF
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 texassred/LFM2.5-8B-A1B-heretic-16e-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf texassred/LFM2.5-8B-A1B-heretic-16e-GGUF
Use Docker
docker model run hf.co/texassred/LFM2.5-8B-A1B-heretic-16e-GGUF
- LM Studio
- Jan
- Ollama
How to use texassred/LFM2.5-8B-A1B-heretic-16e-GGUF with Ollama:
ollama run hf.co/texassred/LFM2.5-8B-A1B-heretic-16e-GGUF
- Unsloth Studio
How to use texassred/LFM2.5-8B-A1B-heretic-16e-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 texassred/LFM2.5-8B-A1B-heretic-16e-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 texassred/LFM2.5-8B-A1B-heretic-16e-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for texassred/LFM2.5-8B-A1B-heretic-16e-GGUF to start chatting
- Pi
How to use texassred/LFM2.5-8B-A1B-heretic-16e-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf texassred/LFM2.5-8B-A1B-heretic-16e-GGUF
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": "texassred/LFM2.5-8B-A1B-heretic-16e-GGUF" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use texassred/LFM2.5-8B-A1B-heretic-16e-GGUF with Docker Model Runner:
docker model run hf.co/texassred/LFM2.5-8B-A1B-heretic-16e-GGUF
- Lemonade
How to use texassred/LFM2.5-8B-A1B-heretic-16e-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull texassred/LFM2.5-8B-A1B-heretic-16e-GGUF
Run and chat with the model
lemonade run user.LFM2.5-8B-A1B-heretic-16e-GGUF-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use texassred/LFM2.5-8B-A1B-heretic-16e-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf texassred/LFM2.5-8B-A1B-heretic-16e-GGUF
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 texassred/LFM2.5-8B-A1B-heretic-16e-GGUF
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use texassred/LFM2.5-8B-A1B-heretic-16e-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf texassred/LFM2.5-8B-A1B-heretic-16e-GGUF
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "texassred/LFM2.5-8B-A1B-heretic-16e-GGUF" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
LFM2.5-8B-A1B-heretic 16e — the expert-cut, gate-schooled coffin brain
A leaner, fully-resident reincarnation of coder3101/LFM2.5-8B-A1B-heretic: the 32 routed experts per layer were cut to 16, and the router gates were retrained (teacher-prior school) so the surviving heads know where to route. Same soul, half the mass — built to live entirely inside a 4GB VRAM card with real context headroom.
Why this exists
The full 8B model is 4.0G at IQ4_XS — it technically fits a 4GB card but leaves almost no room for context. Cutting experts cuts the file, not the brain per token: top-4 stays top-4, so the active parameters (A1B) are identical to the original — same speed, half the weight.
Model details
| Property | Value |
|---|---|
| Architecture | lfm2_moe (LFM2.5, linear attention) |
| Layers | 24 (2 dense + 22 sparse MoE floors) |
| Experts per sparse floor | 16 (was 32) |
| Experts per token | 4 (top-4) |
| Active params / token | ~1B (A1B, unchanged from base) |
| Total params | 4.6B |
| Context length | 128,000 native (linear attention = tiny KV) |
| Hidden size | 2048 |
| MoE intermediate | 1792 |
| Quantization | IQ4_XS with imatrix (this file) |
| Base | coder3101/LFM2.5-8B-A1B-heretic |
What was done
- Expert cut (32 → 16): per-layer expert tensors (w1/w2/w3) sliced to the first 16, gate rows and expert bias sliced to match,
num_expertsupdated in config. - Gate school (teacher-prior proxy): the ORIGINAL 32-expert gates were kept as teacher. Per-token soft targets = softmax of the original routing preference over the surviving 16 experts, blended with a uniform prior. Only the 16-wide gate weights were trained (CE, AdamW) — no backprop through the body. The cut brain learns where to route using its own old wisdom.
- Quant: F16 → imatrix (custom calibration corpus) → IQ4_XS.
The full bf16 safetensors (model.safetensors) ships in this repo — the gates are already patched in, so this is a complete, loadable model, not a patchset.
Files
| File | Description |
|---|---|
model.safetensors |
Full bf16 weights, post-trained gates (8.6G) |
lfm25-heretic-16e-iq4-xs.gguf |
IQ4_XS quant, imatrix-calibrated (2.4G) |
config.json / tokenizer* |
Transformers-compatible config + tokenizer |
Measured
- Generation: ~29.7 tok/s on i5-12450H CPU (8 threads,
-c 2048) — 4x faster than the 24-expert cut. - Prompt eval: ~58 tok/s.
- Coherent chat output after school (no word salad; verified via llama-server and ollama).
- Fits 4GB VRAM at IQ4_XS with ~1.5G left for context. Linear attention keeps KV tiny, so long context is cheap.
Usage
Ollama (import from this GGUF — a tuned Modelfile ships in this repo):
ollama create lfm25-heretic-16e -f Modelfile.lfm25-heretic-16e
(Tuned sampling: temperature 0.8, top_p 0.95, top_k 60, repeat_penalty 1.15. Note: this is a thinking model — ollama run shows <think> blocks before the answer.)
llama.cpp (RECOMMENDED for harness/API use — clean reasoning split):
llama-server -m lfm25-heretic-16e-iq4-xs.gguf --jinja --reasoning-format deepseek -c 8192
The GGUF carries the official LFM2.5 chat template (with the bos_token literal fix — llama.cpp doesn't pass bos_token as a template var, so the raw official template renders a 4-token prompt; <|startoftext|> is baked in). Responses arrive with the thinking in message.reasoning_content and the answer clean in message.content — verified: {"answer": "2+2 = 4", "reasoning_content": "..."}.
llama.cpp:
llama-server -m lfm25-heretic-16e-iq4-xs.gguf --jinja -c 8192
# or
llama-cli -m lfm25-heretic-16e-iq4-xs.gguf -p "Hi! Who are you?"
Transformers (from the safetensors):
from transformers import AutoModelForCausalLM, AutoTokenizer
m = AutoModelForCausalLM.from_pretrained("texassred/LFM2.5-8B-A1B-heretic-16e-GGUF", trust_remote_code=True)
Notes
- Small-active brain (~A1B per token): excellent for chat, explanation, code-adjacent work; arithmetic is not its superpower (a 1B active brain ceiling, not a defect of the cut).
- The base model's "heretic" ablation carries through — this is an uncensored model. Use accordingly.
- Built with the forge scripts: expert slice, teacher-prior gate school, imatrix IQ4_XS pipeline. The same pipeline makes any future cut (12e, 8e, ...) in about an hour.
Credits
Base: coder3101/LFM2.5-8B-A1B-heretic. Cut + school + quant: texassred (Sekhmet forge).
- Downloads last month
- 201
Model tree for texassred/LFM2.5-8B-A1B-heretic-16e-GGUF
Base model
LiquidAI/LFM2.5-8B-A1B-Base