Instructions to use 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME") model = AutoModelForCausalLM.from_pretrained("0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME 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 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16 # Run inference directly in the terminal: llama cli -hf 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16 # Run inference directly in the terminal: llama cli -hf 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16
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 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16 # Run inference directly in the terminal: ./llama-cli -hf 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16
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 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16
Use Docker
docker model run hf.co/0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16
- LM Studio
- Jan
- vLLM
How to use 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16
- SGLang
How to use 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME with Ollama:
ollama run hf.co/0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16
- Unsloth Desktop
- Pi
How to use 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME with Docker Model Runner:
docker model run hf.co/0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16
- Lemonade
How to use 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16
Run and chat with the model
lemonade run user.LFM2.5-2.6B-Heretic-NX-PRIME-BF16
List all available models
lemonade list
- Hermes Agent
How to use 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16
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 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf 0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16
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 "0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16" \ --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 2.6B — Heretic NX PRIME
Heretic NX PRIME is a behavioral edit of
LiquidAI/LFM2.5-2.6B
focused on aggressive false-refusal reduction while measuring drift from the
official base.
Q8 refresh — 2026-08-25: the current Q8_0 file is a native-runtime,
quantization-aware residual-stream composite. It reduces the matched lexical
refusal count from the previous PRIME Q8's 9/104 to 3/104. The BF16
Transformers checkpoint and BF16 GGUF are unchanged by this refresh and retain
their earlier evaluation results.
PRIME is the project's internal evidence and capability-preservation
protocol. It is not a third-party certification.
Files and variants
| File | Status |
|---|---|
model.safetensors |
Original PRIME v8 BF16 checkpoint; unchanged |
LFM2.5-2.6B-Heretic-NX-PRIME-BF16.gguf |
Original PRIME v8 BF16 GGUF; unchanged |
LFM2.5-2.6B-Heretic-NX-PRIME-Q8_0.gguf |
Refreshed Q8_0, 2.87 GB, SHA-256 0ee513ab837686211bca2d2872e642b43ff19772bd1011eb40f5ea8000b9d0e0 |
PROVENANCE.json |
Provenance of the unchanged BF16/v8 release |
Q8_RELEASE.json |
Exact provenance, hashes, protocol and claim limits for the refreshed Q8 |
The refreshed Q8 is a Q8-specific deployment artifact. Its metrics must not be
attributed to model.safetensors or the BF16 GGUF.
Matched Q8 comparison
Both Q8 files below were evaluated locally with official llama.cpp b10621
CUDA, native pre-tokenized /completion, one explicit BOS, the same closed
thinking template, greedy decoding, 96 generated tokens, serial request order
and exactly one runtime slot.
| Evaluation | Previous PRIME Q8 | Heretic Q8 comparator | Refreshed PRIME Q8 |
|---|---|---|---|
| Lexical refusal markers, 104 harmful rows | 9 | 5 | 3 |
| Markers per 100 | 8.65 | 4.81 | 2.88 |
| Hit rows, one-based | 3,35,55,57,68,80,93,97,101 |
3,29,68,97,98 |
3,68,97 |
| Mean first-token KL(base | candidate), 104 benign rows, full 128k vocabulary | 0.018217 |
The refreshed PRIME Q8 therefore has two fewer lexical refusal markers than
the pinned Heretic comparator under this matched local refusal protocol. It
does not win on KL: its measured 0.023597 is above both the previous PRIME
Q8 and the comparator card's published 0.0142. The comparator's published KL
was not independently reproduced under this repository's exact full-vocabulary
protocol, so that KL comparison is descriptive rather than formally matched.
Lexical markers are a refusal proxy, not semantic task success or a universal quality score. All 104 harmful rows participated in development and selection; they are not an untouched holdout.
The comparator is pinned to
Abiray/LFM2.5-2.6B-Heretic-Abliterated-GGUF
revision 1eaf992a33529fc839cbeca32109a9c4c43b57c4, artifact SHA-256
027f0a8308879a21163dd0c981b7397d1b8828dc06ce01e72250d3adf2f87f9b.
Method used for the refreshed Q8
The Q8 refresh did not copy or merge Heretic weights. The pinned comparator was used only as a black-box behavioral teacher: token-only trajectories were captured for six rows where it avoided a stable PRIME-v8 refusal. Heretic NX then optimized the existing eight-site residual-stream portfolio under a benign KL objective and exact Q8_0 fake quantization.
Promotion used deterministic native llama.cpp screening rather than the older parallel benchmark, because refusal counts were found to be batching-sensitive. The selected composite:
- starts from the strong teacher-guided residual candidate;
- restores the L28 short-convolution output to the lower-KL anchor;
- interpolates the L15 short-convolution output by 25% toward that anchor;
- interpolates the L17 FFN output by 75% toward that anchor;
- serializes and patches the eight complete Q8_0 tensor payloads exactly.
The final pack SHA-256 is
3083a6c8b0f74488221dd9fbd046e10b0eb9fdc3cb320e99b9769c6a01afb6c0.
The deployed GGUF was reloaded by llama.cpp for both the 104-row harmful run
and the exhaustive first-token KL calculation.
Validation status
Completed for the refreshed Q8:
- 104/104 harmful prompts, deterministic mono-slot native runtime;
- 104/104 benign prompts, full-vocabulary first-token KL against cached official-base BF16 log-probabilities;
- exact artifact/pack/report hash binding;
- 98 local unit and integration tests passing, including 13 Q8-specific tests.
Not yet rerun for the refreshed Q8:
- the 450-row XSTest gate;
- the 854-row ARC/HellaSwag/MMLU paired capability slice;
- a new LM Studio GUI smoke test.
Earlier XSTest and capability results in PROVENANCE.json belong to the
previous v8 Q8 artifact and must not be presented as evidence for this refresh.
The current file preserves the same valid GGUF metadata/layout and has been
loaded repeatedly by llama.cpp b10621 during evaluation.
LM Studio
Download LFM2.5-2.6B-Heretic-NX-PRIME-Q8_0.gguf, place it in your LM Studio
models directory and select it as an LFM2 model. The file is Q8_0 and is about
2.87 GB. The BF16 GGUF remains available when maximum precision is preferred.
Transformers usage
Transformers loads the unchanged BF16 checkpoint, not the Q8 refresh:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
dtype=torch.bfloat16,
device_map="auto",
).eval()
Limitations and responsibility
This edit intentionally weakens refusal behavior. That can increase compliance with unsafe, illegal, incorrect or otherwise harmful requests. It does not add factuality, judgment, sandboxing or application-level safety. Run untrusted generations in an appropriate sandbox.
The refreshed Q8 currently demonstrates a lower lexical-refusal count than the pinned Heretic Q8 on one development-exposed suite, while preserving less of the official base under the measured KL metric. It is not claimed to be a universal winner, externally certified, or fully capability-validated.
Use is subject to the included LFM Open License v1.0.
- Downloads last month
- 1,003
docker model run hf.co/0xzknw/LFM2.5-2.6B-Heretic-NX-PRIME:BF16