Instructions to use saidutta69/LFM3-VL-2B-heretic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use saidutta69/LFM3-VL-2B-heretic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="saidutta69/LFM3-VL-2B-heretic", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForImageTextToText model = AutoModelForImageTextToText.from_pretrained("saidutta69/LFM3-VL-2B-heretic", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use saidutta69/LFM3-VL-2B-heretic 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 saidutta69/LFM3-VL-2B-heretic:Q4_K_M # Run inference directly in the terminal: llama cli -hf saidutta69/LFM3-VL-2B-heretic:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf saidutta69/LFM3-VL-2B-heretic:Q4_K_M # Run inference directly in the terminal: llama cli -hf saidutta69/LFM3-VL-2B-heretic:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf saidutta69/LFM3-VL-2B-heretic:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf saidutta69/LFM3-VL-2B-heretic:Q4_K_M
Use Docker
docker model run hf.co/saidutta69/LFM3-VL-2B-heretic:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use saidutta69/LFM3-VL-2B-heretic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "saidutta69/LFM3-VL-2B-heretic" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "saidutta69/LFM3-VL-2B-heretic", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/saidutta69/LFM3-VL-2B-heretic:Q4_K_M
- SGLang
How to use saidutta69/LFM3-VL-2B-heretic 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 "saidutta69/LFM3-VL-2B-heretic" \ --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": "saidutta69/LFM3-VL-2B-heretic", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "saidutta69/LFM3-VL-2B-heretic" \ --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": "saidutta69/LFM3-VL-2B-heretic", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Ollama
How to use saidutta69/LFM3-VL-2B-heretic with Ollama:
ollama run hf.co/saidutta69/LFM3-VL-2B-heretic:Q4_K_M
- Unsloth Desktop
- Pi
How to use saidutta69/LFM3-VL-2B-heretic with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf saidutta69/LFM3-VL-2B-heretic:Q4_K_M
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": "saidutta69/LFM3-VL-2B-heretic:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use saidutta69/LFM3-VL-2B-heretic with Docker Model Runner:
docker model run hf.co/saidutta69/LFM3-VL-2B-heretic:Q4_K_M
- Lemonade
How to use saidutta69/LFM3-VL-2B-heretic with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull saidutta69/LFM3-VL-2B-heretic:Q4_K_M
Run and chat with the model
lemonade run user.LFM3-VL-2B-heretic-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use saidutta69/LFM3-VL-2B-heretic with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf saidutta69/LFM3-VL-2B-heretic: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 saidutta69/LFM3-VL-2B-heretic:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use saidutta69/LFM3-VL-2B-heretic with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf saidutta69/LFM3-VL-2B-heretic:Q4_K_M
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 "saidutta69/LFM3-VL-2B-heretic:Q4_K_M" \ --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"
LFM3-VL-2B-heretic
A decensored variant of LiquidAI/LFM3-VL-2B, produced with
Heretic v1.4.0 (directional ablation / "abliteration").
Only the language model is edited: refusal directions are removed from the text tower's
attention output projections (including the convolution operator's out_proj on conv layers) and
MLP down-projections. The 164M vision encoder and 25M projector are copied into the GGUF unchanged,
so image understanding survives quantization.
The GGUF is fully multimodal - text and vision. The vision tower ships separately as
LFM3-VL-2B-heretic-mmproj-F16.gguf(0.38 GB); the two files together are the model. For image input you must load both - see Quickstart. Text-only use needs only the main GGUF. Nothing is dropped from the text path: the text GGUF carries the full language tower (287 tensors, 24 blocks), and the mmproj carries 189,380,352 vision+projector parameters.llama.cpp video input for LFM3-VL is not supported upstream yet; image input is tested and works. Video works through the transformers checkpoint.
Who this is for: on-device document, chart, screenshot and video work that should not need a data centre. LFM3-VL-2B is Liquid's post-trained 1.92B vision model, and its published numbers include DocVQA 96.7, TextVQA 87.9, OCRBench v1 86.3, RealWorldQA 79.3 and MMMU 55.7. It is not recommended for coding, multi-turn conversations, or complex reasoning; abliteration removes refusals, not those limits.
Refusals drop from 98/100 to 3/100 at a KL divergence of 0.0014 - a very tight text edit.
Abliteration parameters
Trial 94 of a 200-trial Heretic run (seed 1424362134).
| Parameter | Value |
|---|---|
| direction_index | 14.32 |
| attn.o_proj.max_weight | 1.41 |
| attn.o_proj.max_weight_position | 13.92 |
| attn.o_proj.min_weight | 0.95 |
| attn.o_proj.min_weight_distance | 10.15 |
| mlp.down_proj.max_weight | 1.48 |
| mlp.down_proj.max_weight_position | 21.08 |
| mlp.down_proj.min_weight | 1.41 |
| mlp.down_proj.min_weight_distance | 10.47 |
Performance
| Metric | This model | Original model (LiquidAI/LFM3-VL-2B) |
|---|---|---|
| KL divergence | 0.0014 | 0 (by definition) |
| Refusals | 3/100 | 98/100 |
95 of the 98 refusals clear, and the edit is tight (KL 0.0014). The base was almost fully refusal-tuned on Heretic's harmful evaluation set.
MMLU (text only)
Measured on this checkpoint and on the original model in the same environment
(lm-eval 0.4.13, 14,042 questions):
| Metric | This model | Original model |
|---|---|---|
| MMLU (acc) | 34.44% | 34.37% |
| stderr | 0.40 pp | 0.40 pp |
The +0.07 pp difference is far inside one standard error. MMLU exercises the text path only; it does not measure the vision encoder. Vision weights are unchanged from the base model, and the image smoke test in the pipeline checks that the projector still pairs correctly.
Why abliteration instead of fine-tuning
Fine-tuning a "helpful" persona on top of RLHF'd refusals fights the base model's training and tends to degrade coherence. Abliteration instead finds and edits the specific weight directions responsible for refusal, leaving the rest of the network (and its capabilities) untouched. See the Heretic repo and the original abliteration writeup for the mechanism.
Files
Safetensors
| File | Size |
|---|---|
model.safetensors |
3.84 GB |
BF16, 1,918,181,888 parameters (1.92B): 1,728,801,536 language model + 164,206,336
vision encoder + 25,174,016 projector. The reproduce/ directory carries the full Heretic
recipe - config.toml, requirements.txt, the Optuna study journal, and SHA-256 sums.
GGUF quantizations
Full quantization set (F16 + 14 quants, 19.31 GB including the projector) produced with llama.cpp master on 2026-10-28.
The text files use the new
lfm3GGUF architecture and the projector usesclip. You need an LFM3-VL-capable llama.cpp build (support landed in late October 2026); older builds will fail to load them. The upstream LiquidAI/LFM3-VL-2B-GGUF uses the same pair.
| File | Format | Size |
|---|---|---|
LFM3-VL-2B-heretic-F16.gguf |
GGUF F16 | 3.47 GB |
LFM3-VL-2B-heretic-Q2_K.gguf |
GGUF Q2_K | 0.75 GB |
LFM3-VL-2B-heretic-IQ3_S.gguf |
GGUF IQ3_S | 0.85 GB |
LFM3-VL-2B-heretic-Q3_K_S.gguf |
GGUF Q3_K_S | 0.85 GB |
LFM3-VL-2B-heretic-Q3_K_M.gguf |
GGUF Q3_K_M | 0.91 GB |
LFM3-VL-2B-heretic-Q3_K_L.gguf |
GGUF Q3_K_L | 0.97 GB |
LFM3-VL-2B-heretic-IQ4_XS.gguf |
GGUF IQ4_XS | 1.01 GB |
LFM3-VL-2B-heretic-Q4_K_S.gguf |
GGUF Q4_K_S | 1.06 GB |
LFM3-VL-2B-heretic-Q4_0.gguf |
GGUF Q4_0 | 1.05 GB |
LFM3-VL-2B-heretic-Q4_1.gguf |
GGUF Q4_1 | 1.14 GB |
LFM3-VL-2B-heretic-Q4_K_M.gguf |
GGUF Q4_K_M | 1.10 GB |
LFM3-VL-2B-heretic-Q5_K_S.gguf |
GGUF Q5_K_S | 1.23 GB |
LFM3-VL-2B-heretic-Q5_K_M.gguf |
GGUF Q5_K_M | 1.26 GB |
LFM3-VL-2B-heretic-Q6_K.gguf |
GGUF Q6_K | 1.43 GB |
LFM3-VL-2B-heretic-Q8_0.gguf |
GGUF Q8_0 | 1.85 GB |
LFM3-VL-2B-heretic-mmproj-F16.gguf |
GGUF F16 projector | 0.38 GB |
Text + vision needs both the chosen text quant and the projector. For reference: Q4_K_M 1.48 GB, Q5_K_M 1.64 GB, Q6_K 1.81 GB, Q8_0 2.23 GB. The projector is not quantized.
Quickstart
# llama.cpp - -hf auto-fetches the matching mmproj (LFM3-VL-capable build)
llama-mtmd-cli -hf saidutta69/LFM3-VL-2B-heretic:Q4_K_M \
--image photo.jpg -p "Describe this image."
# explicit two-file form
llama-mtmd-cli \
-m LFM3-VL-2B-heretic-Q4_K_M.gguf \
--mmproj LFM3-VL-2B-heretic-mmproj-F16.gguf \
--image photo.jpg -p "Describe this image."
# transformers (the checkpoint ships custom code; needs transformers>=5.21.0)
import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "saidutta69/LFM3-VL-2B-heretic"
model = AutoModelForImageTextToText.from_pretrained(
model_id, dtype=torch.bfloat16, device_map="auto", trust_remote_code=True
)
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
messages = [{
"role": "user",
"content": [
{"type": "image", "url": "https://placecats.com/300/200"},
{"type": "text", "text": "Describe this image."},
],
}]
inputs = processor.apply_chat_template(
messages, add_generation_prompt=True, return_tensors="pt", return_dict=True
).to(model.device)
out = model.generate(**inputs, do_sample=True, temperature=0.1, top_p=1.0, top_k=50,
repetition_penalty=1.1, max_new_tokens=512)
print(processor.tokenizer.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
Generation parameters
Liquid's recommended settings: temperature=0.1, top_p=1.0, top_k=50, min_p=0.0, repetition_penalty=1.1. For image and video preprocessing use the values in
processor_config.json.
Chat template and thinking
LFM3 uses ChatML with <|startoftext|> at the front. Reasoning is enabled by default and arrives
in a thinking block; pass enable_thinking=False to disable it (Liquid notes this can be
inconsistent on reasoning-heavy tasks). Prior-turn reasoning is dropped unless
preserve_thinking=True. Tool calls use the same XML format as LFM3-1.7B; pass schemas with
tools=... to apply_chat_template() and feed results back under a tool role.
Runs anywhere
| Device | Recommended quant | Text weights | + vision projector |
|---|---|---|---|
| Phone / browser (6 GB RAM) | Q4_K_M | 1.10 GB | 1.48 GB |
| Raspberry Pi 5 (8 GB) | Q4_K_M | 1.10 GB | 1.48 GB |
| Laptop (8 GB, Apple Silicon) | Q6_K | 1.43 GB | 1.81 GB |
| RTX 3060 / 4060 (12 GB) | Q8_0 | 1.85 GB | 2.23 GB |
| Server / multi-tenant | Q5_K_M | 1.26 GB | 1.64 GB |
Weights only; the KV cache grows with context. The projector is fixed at 0.38 GB regardless of the text quant.
Model details
| Architecture | Lfm3VlForConditionalGeneration (LFM3 language tower + LFM3-VL vision) |
| Parameters | 1.92B: 1.73B language + 164M vision encoder + 25M projector |
| Language tower | 24 layers: 13 gated short convolutions, 5 sliding-window attention, 6 global attention |
| Vision encoder | 14 layers: 8 gated depthwise 2D convolutions, 6 bidirectional attention, 16x16 patches with 2D RoPE |
| Attention (text) | 16 heads / 4 KV heads on attention layers, head dim 128 |
| Hidden / intermediate (text) | 2048 / 7680 |
| Convolution cache | L_cache = 7 |
| Sliding window | 256 |
| Context length | 128,000 (base card and GGUF header lfm3.context_length) |
| Vocab | 128,000 |
| Inputs | Text, images, and video at native resolution; video at 2 fps; each 2x2 patch block is one language token |
| Precision | bfloat16 |
| Languages | English, Arabic, Chinese, French, German, Italian, Japanese, Korean, Portuguese, Spanish, Vietnamese, Thai, Indonesian, Hindi, Russian, Polish |
| Base model | LiquidAI/LFM3-VL-2B |
Text GGUF: arch=lfm3, 287 tensors, 24 blocks, 128,000 context, tied embeddings (no lm_head
tensor). The projector GGUF carries the complete 164,206,336-parameter vision encoder +
25,174,016-parameter projector.
Base-model note: the heretic repo's original YAML tag said LiquidAI/LFM3-1.7B-Base, but the
ablation was run on LiquidAI/LFM3-VL-2B (commit f83d2b0a...) - see reproduce/config.toml.
This card uses the correct base.
FAQ
What is LFM3-VL-2B-heretic?
LFM3-VL-2B-heretic is a decensored build of LiquidAI/LFM3-VL-2B produced with Heretic 1.4.0 (directional ablation). It is the same weights with the refusal direction removed, not a new fine-tune, so its capabilities track the base model.
Is LFM3-VL-2B-heretic actually uncensored?
Yes. On Heretic's 100-prompt refusal harness it drops from 98/100 to 3/100 at KL divergence 0.0014 from the base model. These are measured values, not a claim; reproduction data is in reproduce/.
How do I run LFM3-VL-2B-heretic locally?
Text: llama serve -hf saidutta69/LFM3-VL-2B-heretic:Q4_K_M. Images: llama-mtmd-cli -hf saidutta69/LFM3-VL-2B-heretic:Q4_K_M --mmproj LFM3-VL-2B-heretic-mmproj-F16.gguf. The repo ships 15 GGUF quants plus the projector, so vision survives quantization.
Responsible use
Refusal suppression is deliberate and works as intended: this model will comply with requests the base model would refuse, including some it should not. There is no safety filtering layered on top. You are responsible for how you deploy it - don't put this behind an unmoderated public-facing endpoint serving third parties. It inherits LFM3-VL-2B's factual and visual limitations; abliteration removes refusal directions, it does not add capability or judgment.
Made with ❤️ by RACER IS OP (saidutta69) - follow for more uncensored models
License
Inherits the LFM Open License v1.0 from the base model. This is not Apache-2.0; review the LFM terms before commercial use.
Related
- LiquidAI/LFM3-VL-2B - the post-trained vision-language base model
- LiquidAI/LFM3-VL-2B-GGUF - the upstream GGUF + mmproj
- LFM3-1.7B-heretic - the text-only sibling
- LFM3 family collection
- RACER IS OP - Heretic Models - full collection
Abliteration hardware
Recorded in reproduce/reproduce.json:
- GPU: NVIDIA RTX PRO 6000 Blackwell Server Edition (94.97 GB VRAM)
- OS:
Linux-4.19.0-gvisor-x86_64-with-glibc2.41 - CUDA / driver: CUDA 13.0, driver 595.71.05
- Software: PyTorch 2.14.1+cu130, Heretic 1.4.0
Heretic notes that KL-divergence and refusal numbers can vary slightly with hardware and library versions.
- Downloads last month
- 5,818