What it is
The starting point is Qwen3.5-2B: a 2.2B-parameter vision-language model with 24 text layers, linear attention with a full attention layer every fourth block, and a tied 248k-token vocabulary.
Two changes were made to it:
- Abliteration — a refusal direction was extracted from the model at text layer 10 using harmful/harmless prompt pairs, then projected out of the output projections of every text layer. This removes the model's trained tendency to refuse requests.
- Identity fine-tune — a LoRA adapter was trained on synthetic conversations where the assistant answers as Commato, made by FRM Labs. Only the final assistant turn is supervised; prompt tokens are masked, so the model learns how to answer, not to memorise the questions.
The adapter was merged into the ablated weights, so this is one self-contained model — no separate adapter file needed. The vision encoder was not fine-tuned; image behaviour comes from the base model.
Use
import torchfrom transformers import AutoProcessor, AutoModelForImageTextToText repo = "FRM-Labs/Commato"model = AutoModelForImageTextToText.from_pretrained(repo, dtype=torch.bfloat16, device_map="auto")processor = AutoProcessor.from_pretrained(repo) messages = [{"role": "user", "content": [{"type": "text", "text": "Who are you?"}]}]inputs = processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt").to(model.device)with torch.inference_mode(): out = model.generate(**inputs, max_new_tokens=128, temperature=0.7, top_p=0.9)print(processor.batch_decode(out[:, inputs["input_ids"].shape[1]:], skip_special_tokens=True)[0])
Sampling: temperature=0.7, top_p=0.9. Lower makes identity answers repetitive; higher makes them drift. Images: add an {"type": "image"} content part and pass images=[pil_image].
The ablation dropped the base model's 14 mtp.* (multi-token prediction) tensors. Transformers warns about missing keys on load; generation is unaffected.
Details
Table | |
|---|
| Base | Qwen3.5-2B (Apache 2.0) |
| Parameters | 2.2B bf16 |
| Text stack | 24 layers, hidden 2048, head_dim 256, vocab 248,320 |
| LoRA | rank 16, alpha 32, dropout 0.05, on q/k/v/o_proj + gate/up/down_proj |
| Training | 3 epochs, 294 steps, lr 1e-4 cosine, 25 warmup, effective batch 16, max length 1024 |
| Data | 1,231 synthetic identity conversations (60 validation), last assistant turn only |
| Loss | train 1.849, eval 1.94 |
License
Apache 2.0 — see LICENSE and NOTICE. Based on Qwen3.5-2B, © Alibaba Cloud.