Instructions to use cwbc/MM-ReCoder-SFT-Cold-Start with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cwbc/MM-ReCoder-SFT-Cold-Start with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cwbc/MM-ReCoder-SFT-Cold-Start") 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)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("cwbc/MM-ReCoder-SFT-Cold-Start") model = AutoModelForMultimodalLM.from_pretrained("cwbc/MM-ReCoder-SFT-Cold-Start") 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cwbc/MM-ReCoder-SFT-Cold-Start with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cwbc/MM-ReCoder-SFT-Cold-Start" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cwbc/MM-ReCoder-SFT-Cold-Start", "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/cwbc/MM-ReCoder-SFT-Cold-Start
- SGLang
How to use cwbc/MM-ReCoder-SFT-Cold-Start 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 "cwbc/MM-ReCoder-SFT-Cold-Start" \ --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": "cwbc/MM-ReCoder-SFT-Cold-Start", "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 "cwbc/MM-ReCoder-SFT-Cold-Start" \ --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": "cwbc/MM-ReCoder-SFT-Cold-Start", "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 cwbc/MM-ReCoder-SFT-Cold-Start with Docker Model Runner:
docker model run hf.co/cwbc/MM-ReCoder-SFT-Cold-Start
MM-ReCoder-SFT-Cold-Start
CVPR 2026 | Project Page | arXiv | Code | Final RL Model
MM-ReCoder-SFT-Cold-Start is the supervised fine-tuned cold-start
checkpoint released alongside the CVPR 2026 paper
MM-ReCoder: Advancing Chart-to-Code Generation with Reinforcement Learning and Self-Correction.
It is fine-tuned from
Qwen/Qwen2.5-VL-7B-Instruct
to bootstrap the chart-to-code and self-correction behaviors before the
multi-turn RL stages.
This is an intermediate checkpoint, not the final MM-ReCoder model. If you want the best chart-to-code performance, use
cwbc/MM-ReCoderinstead. This checkpoint is released for researchers who want to reproduce or ablate the RL stages of the paper.
Intended Use
This checkpoint is intended as the starting point for multi-turn RL training. The pipeline is:
- SFT cold-start (this checkpoint) โ Qwen2.5-VL-7B-Instruct fine-tuned on chart-to-code demonstrations.
- Multi-turn RL (GRPO), stage 1 โ shared-first-turn optimization, initialized from this checkpoint.
- Multi-turn RL (GRPO), stage 2 โ full-trajectory optimization, resumed
from stage 1. The result is released as
cwbc/MM-ReCoder.
Usage
To kick off RL from this cold-start checkpoint, clone the
official repository and run the
stage 1 training script (which references this checkpoint via
REF_MODEL_PATH=cwbc/MM-ReCoder-SFT-Cold-Start):
git clone https://github.com/ZitianTang/MM-ReCoder.git
cd MM-ReCoder
# Follow the Installation section in the repo README, then launch the
# LLM-as-a-judge reward server (see the RL Training section).
# Stage 1: multi-turn GRPO with a shared first turn.
bash examples/mmrecoder/train/stage1-shared-first-turn.sh
# Stage 2: multi-turn GRPO on the full trajectory, resumed from stage 1.
bash examples/mmrecoder/train/stage2-full-trajectory.sh
Multi-Turn Inference with the Cold-Start Model
This checkpoint also supports the multi-turn self-correction inference loop from the repository โ useful for measuring the RL gains over the SFT-only baseline. Reuse the inference scripts and override the model path:
# Download the cold-start checkpoint.
hf download cwbc/MM-ReCoder-SFT-Cold-Start
# Two-turn self-correction on ChartMimic, using the cold-start model.
bash examples/mmrecoder/inference/chartmimic_2turns.sh \
model.path=cwbc/MM-ReCoder-SFT-Cold-Start \
data.output_path=generations/coldstart_chartmimic_2turns.json
The self-correction policy is sharpened by the RL stages, so the
cold-start model will generally underperform cwbc/MM-ReCoder
on multi-turn benchmarks; this is the intended baseline comparison.
Direct single-turn use
You can also load the checkpoint directly with transformers to inspect
single-turn chart-to-code behavior:
from transformers import AutoProcessor, Qwen2_5_VLForConditionalGeneration
import torch
model_id = "cwbc/MM-ReCoder-SFT-Cold-Start"
processor = AutoProcessor.from_pretrained(model_id)
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
model_id, torch_dtype=torch.bfloat16, device_map="auto"
)
Citation
@inproceedings{tang2026mmrecoder,
title={MM-ReCoder: Advancing Chart-to-Code Generation with Reinforcement Learning and Self-Correction},
author={Zitian Tang and Xu Zhang and Jianbo Yuan and Yang Zou and Varad Gunjal and Songyao Jiang and Davide Modolo},
booktitle={CVPR},
year={2026}
}
License
Released under the Apache 2.0 License, inheriting from the base Qwen2.5-VL-7B-Instruct license.
- Downloads last month
- 68
Model tree for cwbc/MM-ReCoder-SFT-Cold-Start
Base model
Qwen/Qwen2.5-VL-7B-Instruct