library_name: transformers
license: other
license_name: lfm1.0
license_link: LICENSE
pipeline_tag: text-generation
tags:
- liquid
- lfm2.5
- edge
- uncensored
- abliterix
- safetensors
- bf16
base_model: - LiquidAI/LFM2.5-2.6B
base_model_relation: finetune
parent: LiquidAI official
LFM2.5-2.6B-Uncensored
English | 📖 中文文档
Uncensored 2.6B edge model · abliterix Trial 65 · BF16 safetensors
LFM2.5-2.6B is a Liquid AI 2.6B-parameter hybrid edge model built for agentic workloads: 30 layers (22 double-gated short-convolution blocks + 8 GQA), a 128K context window, 128K vocabulary, and a ChatML-like template with native <think> reasoning. It is competitive with models 4x larger on tool use, instruction following, and multi-step agentic tasks.
This release builds on the official weights in two steps:
- Uncensored behavior edit via abliterix on ROCm (gfx1151), selecting Trial 65 LoRA and stream-merging it back to BF16.
- Full-precision BF16 export — no quantization loss; quantized GGUFs (Q4_K_M / Q6_K / Q8_0 / IQ4_XS / IQ3_XS, imatrix-calibrated) ship in the GGUF sibling repo.
License: LFM Open License v1.0 (same as the base model). See LICENSE.
After merging abliterix Trial 65, this model shows a much lower refusal rate and can differ substantially from official LFM2.5-2.6B. Evaluate compliance and safety for your use case; control access and audit as needed.
| Refusals (harmful eval) | 6 / 100 (baseline ~90 / 100) |
| KL divergence | 0.0335 (same-prefix, far below 0.5 prune threshold) |
| Length deviation | 0.079 σ |
| Generation health | PASSED |
| Selected trial | abliterix Trial 65 |
| Thinking | Preserved — always-thinks (<think> in chat template) |
Implementation sketch: LoRA merge W += (B @ A) * (alpha / r) (this trial alpha = r = 1); steering applied to attn.o_proj / conv.out_proj / mlp.down_proj across 30 layers.
| Architecture | LFM2 hybrid (transformers lfm2, Lfm2ForCausalLM) |
| Parameters | 2.69B total |
| Layers | 30 (22 double-gated short-conv + 8 GQA) |
| Context | 131,072 tokens |
| Vocab | 128,000 |
| Hidden / FFN | 2048 / 10752 |
| Reasoning | Always-thinks (<think> in chat template) |
| Languages | EN, ZH, AR, FR, DE, HI, ID, IT, JA, KO, PL, PT, RU, ES, TH, VI |
| This repo | BF16 safetensors (single shard, ~5.4 GB) + tokenizer + chat template |
Coding / tool / agentic ability is largely retained; refusal and alignment behavior are changed. Official benchmark tables were not re-run for this derivative.
model.safetensors | Merged BF16 weights (5.39 GB) |
config.json / generation_config.json | lfm2 config + official sampling defaults |
tokenizer.json / tokenizer_config.json | 128K vocab tokenizer |
chat_template.jinja | ChatML-like template with <think> + tool-use tokens |
The lfm2 architecture is natively supported by transformers >= 5.0.0 — no trust_remote_code needed.
from transformers import AutoModelForCausalLM, AutoTokenizermodel_id = "SC117/LFM2.5-2.6B-Uncensored"
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="bfloat16")
tokenizer = AutoTokenizer.from_pretrained(model_id)
messages = [{"role": "user", "content": "What is 2+2?"}]
input_ids = tokenizer.apply_chat_template(
messages, add_generation_prompt=True, return_tensors="pt"
)["input_ids"].to(model.device)
output = model.generate(
input_ids,
do_sample=True,
temperature=0.1,
top_k=50,
repetition_penalty=1.1,
max_new_tokens=512,
)
print(tokenizer.decode(output[0][input_ids.shape[1]:], skip_special_tokens=True))
llama.cpp / LM Studio users: use the quantized GGUFs in the GGUF sibling repo (Q4_K_M / Q6_K / Q8_0 / IQ4_XS / IQ3_XS, all imatrix-calibrated).
Keep the official generation defaults: temperature 0.1, top_k 50, repetition_penalty 1.1 (they are baked into generation_config.json). If you want more creative answers, raise temperature toward 0.6–0.8; note the model always thinks before answering, so allow enough max_new_tokens for the <think> block.
- abliterix trial search on ROCm (gfx1151): 60 trials + 20 warmup, seed 117; all trials pruned only by same-prefix
kl_divergence < 0.5. - Selected Trial 65: refusals 6/100 (baseline 90/100), KL 0.0335, length deviation 0.079 σ, generation health PASSED.
- LoRA stream-merged into base weights in BF16 (
W += B@A, alpha = r = 1). - BF16 GGUF converted (llama.cpp
lfm2), then quantized with imatrix calibration (401 chunks from the APEX calibration set) into Q4_K_M / Q6_K / Q8_0 / IQ4_XS / IQ3_XS — see the GGUF repo.