Instructions to use alpharomercoma/LFM2.5-1.2B-Instruct-heretic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use alpharomercoma/LFM2.5-1.2B-Instruct-heretic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="alpharomercoma/LFM2.5-1.2B-Instruct-heretic") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("alpharomercoma/LFM2.5-1.2B-Instruct-heretic") model = AutoModelForCausalLM.from_pretrained("alpharomercoma/LFM2.5-1.2B-Instruct-heretic", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use alpharomercoma/LFM2.5-1.2B-Instruct-heretic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "alpharomercoma/LFM2.5-1.2B-Instruct-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": "alpharomercoma/LFM2.5-1.2B-Instruct-heretic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/alpharomercoma/LFM2.5-1.2B-Instruct-heretic
- SGLang
How to use alpharomercoma/LFM2.5-1.2B-Instruct-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 "alpharomercoma/LFM2.5-1.2B-Instruct-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": "alpharomercoma/LFM2.5-1.2B-Instruct-heretic", "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 "alpharomercoma/LFM2.5-1.2B-Instruct-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": "alpharomercoma/LFM2.5-1.2B-Instruct-heretic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use alpharomercoma/LFM2.5-1.2B-Instruct-heretic with Docker Model Runner:
docker model run hf.co/alpharomercoma/LFM2.5-1.2B-Instruct-heretic
LFM2.5-1.2B-Instruct, refusals removed
These are transformers weights, not a compiled model. There is no ExecuTorch
.ptein this repository: the one that used to sit inexecutorch/was built with a recipe that lost this family's tool calling and was withdrawn on 2026-09-19. Apps that run compiled exports, OpenWeights among them, cannot load safetensors. Use these withtransformers, or quantise them yourself; a replacement export needs its own GPTQ solve against these weights, which has not been done.
The ExecuTorch export was removed on 2026-09-19. It was built with a recipe carrying two defects: ExecuTorch 1.4.0's LFM2 definition never cleared
ShortConv.conv_statebetween prompts, so each prompt ran on the last one's state, and its int4 weights were round to nearest, which costs this family its tool calling. On 141 held-out questions the equivalent 1.2B export searched when needed on 10 percent of the questions that needed it and spoke of search results it had never fetched in a quarter of its replies. Fixing it needs a GPTQ solve against these weights, which has not been done. The weights in this repository are unaffected. Method and numbers: https://github.com/alpharomercoma/openweights/blob/main/docs/research/executorch-state-and-recipes.md
alpharomercoma/LFM2.5-1.2B-Instruct-heretic
Abliterated ("uncensored") version of LiquidAI/LFM2.5-1.2B-Instruct, produced with
heretic: directional ablation of the refusal direction in the residual
stream, with a TPE search over per-layer ablation weights that minimises both the refusal rate and the
KL divergence from the original model. Weights are merged, so this loads as a plain Lfm2ForCausalLM.
Chat template, tool-calling tokens and everything else are unchanged from the base model.
heretic Pareto front for this run
study: ./checkpoints/LiquidAI--LFM2--5-1--2B-Instruct.jsonl
completed trials: 200 / 200
idx trial refusals KL direction_index
0 133 0.06 0.0527 10.198270144464333
1 150 0.07 0.0402 10.32046799180982
2 157 0.11 0.0344 10.352822192960996
3 170 0.17 0.0316 10.690289415212908
4 169 0.18 0.0283 10.969840642119093
5 195 0.41 0.0232 9.737856473201463
6 63 0.43 0.0227 None
7 143 0.46 0.0217 11.294404725756008
8 158 0.49 0.0174 11.119204885113456
9 186 0.53 0.0170 10.5853942209232
10 191 0.63 0.0157 11.178660347171663
11 72 0.66 0.0124 11.153256538028568
12 161 0.79 0.0102 10.51671121861693
13 102 0.84 0.0097 11.205828382998588
14 59 0.87 0.0093 10.78726439886388
15 76 0.90 0.0061 None
16 164 0.91 0.0058 10.51819047303982
17 182 0.96 0.0028 None
18 26 0.98 0.0006 None
selected pareto index: 0
ExecuTorch (CPU)
executorch/lfm2_5_1_2b_heretic_8da4w.pte is an ExecuTorch program exported for the XNNPACK backend with 8-bit dynamic
activations / 4-bit grouped weights (8da4w); on Arm hosts XNNPACK dispatches these to KleidiAI kernels.
Run it with the llama_main runner from ExecuTorch (examples/models/llama) using this repo's tokenizer.json
and the prompt format <|startoftext|><|im_start|>user\n...<|im_end|>\n<|im_start|>assistant\n.
Pipeline
Reproducible end to end from https://github.com/ (see the repository this was built with):
make setup abliterate pareto, make save TRIAL=<idx>, make export, make publish.
Use responsibly; the safety training of the base model has been removed on purpose.
- Downloads last month
- 117
Model tree for alpharomercoma/LFM2.5-1.2B-Instruct-heretic
Base model
LiquidAI/LFM2.5-1.2B-Base