Image-Text-to-Text
Transformers
Safetensors
qwen3_5
commato
frm-labs
qwen3.5
abliterated
lora
conversational
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.
Instructions to use FRM-Labs/Commato with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FRM-Labs/Commato with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="FRM-Labs/Commato") 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 AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("FRM-Labs/Commato") model = AutoModelForMultimodalLM.from_pretrained("FRM-Labs/Commato", device_map="auto") 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?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use FRM-Labs/Commato with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FRM-Labs/Commato" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FRM-Labs/Commato", "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/FRM-Labs/Commato
- SGLang
How to use FRM-Labs/Commato 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 "FRM-Labs/Commato" \ --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": "FRM-Labs/Commato", "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 "FRM-Labs/Commato" \ --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": "FRM-Labs/Commato", "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" } } ] } ] }' - Docker Model Runner
How to use FRM-Labs/Commato with Docker Model Runner:
docker model run hf.co/FRM-Labs/Commato
|
Download README.md from FRM-Labs/Commato: direct link, hf CLI and curl.
- Browser
- Download file 3.12 kB
-
https://huggingface.co/FRM-Labs/Commato/resolve/main/README.md
- Command line
-
hf download hf://FRM-Labs/Commato/README.md
-
curl -L -o README.md https://huggingface.co/FRM-Labs/Commato/resolve/main/README.md
3.12 kB
| 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. | |