Run this model with HF Jobs

Run FRM-Labs/Commato on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/FRM-Labs/Commato. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/FRM-Labs/Commato on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/FRM-Labs/Commato. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/FRM-Labs/Commato. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
File size: 3,122 Bytes
a297a48
 
60b0ec4
 
 
 
 
 
 
 
 
c28d9d6
a297a48
60b0ec4
 
 
09776bd
 
 
 
 
 
 
 
 
 
 
 
60b0ec4
c28d9d6
60b0ec4
 
 
 
 
 
c28d9d6
60b0ec4
 
 
c28d9d6
 
60b0ec4
c28d9d6
60b0ec4
 
 
09776bd
 
 
60b0ec4
c28d9d6
60b0ec4
 
 
c28d9d6
 
09776bd
 
 
 
c28d9d6
60b0ec4
c28d9d6
60b0ec4
c28d9d6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
license: apache-2.0
base_model: Qwen/Qwen3.5-2B
base_model_relation: finetune
library_name: transformers
pipeline_tag: image-text-to-text
tags:
  - commato
  - frm-labs
  - qwen3.5
  - abliterated
  - lora
---

# Commato 2B

Commato is a 2B assistant by **FRM Labs**, fine-tuned from [Qwen3.5-2B](https://huggingface.co/Qwen/Qwen3.5-2B). It answers as Commato, keeps replies short, and doesn't lecture or refuse. English, with the base model's image support intact.

## 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:

1. **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.
2. **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

```python
import torch
from 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

| | |
|---|---|
| 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.