Clover-Preview-VL / README.md
kaivoss's picture
mention NVFP4 quant
f3556dd verified
|
Raw History Blame Contribute Delete
4.27 kB
---
license: apache-2.0
base_model:
- Diffuspace/Clover-35B-A3B-Preview
- Qwen/Qwen3.6-35B-A3B
pipeline_tag: image-text-to-text
datasets:
- lmms-lab/LLaVA-OneVision-Data
tags:
- diffusion-language-model
- vision
- mixture-of-experts
---
# Clover-Preview-VL
[Clover-35B-A3B-Preview](https://huggingface.co/Diffuspace/Clover-35B-A3B-Preview) is a text-only block-diffusion
model built from Qwen3.6-35B-A3B. Qwen3.6 can see, so this repo gives Clover Qwen3.6's own vision tower back and
tunes the connection. This is a full merged checkpoint (`CloverMoeVLModelLM`, 16 shards + `model-vision.safetensors`),
ready for serving.
## Changes
- `a2308171` — initial train: graft Qwen3.6's ViT + retrained merger onto Clover, short SFT so it learns to see
(103 steps, 1,650 LLaVA-OneVision images). Text-only reasoning was left untouched.
- `56a465e` — thinking with images: 1,833 rejection-sampled Qwen3.6-35B-A3B teacher traces (kept only traces whose
answer matched gold, $2.59 of OpenRouter) distilled back in as SFT with the `<think>…</think>` format, plus 500
plain rows so it doesn't forget the short-answer style. 146 steps, 1.15 h on one H200. It reasons about images
again, like its base model.
## Before and after
30 questions per task, greedy, the same items each time. One question is 3.3 points, so small differences are noise.
| | Graft, no training | See-only SFT | This checkpoint (SGLang) |
| --- | --- | --- | --- |
| TextVQA | 74.4 | 81.1 | 81.1 |
| ChartQA | 83.3 | 96.7 | 100.0 |
| POPE | 93.3 | 93.3 | 93.3 |
| MMBench (en dev) | 80.0 | 80.0 | 80.0 |
| AI2D | 86.7 | 86.7 | 86.7 |
| Mean | 83.5 | 87.6 | 88.2 |
Thinking mode (same items, answers scored after `</think>`): mean 75.8. It's lower than the direct mode because
89% of traces close within a 2,048-token cap and the 16 that don't score zero — the median trace is 327 tokens.
Per-item answers are in `results/`.
## Serve with SGLang (fast)
[DiffuSpace recommends](https://github.com/sgl-project/sglang/pull/46927) SGLang's CLOVER self-speculative decoding
for Clover Preview. [Akicou/sglang@clover-vl](https://github.com/Akicou/sglang/tree/clover-vl) adds the vision
tower to that path (`CloverMoeVLModelLM`): images go through the normal OpenAI chat API, and thinking toggles with
`chat_template_kwargs: {"enable_thinking": true}`.
```bash
docker run --gpus all --shm-size 32g lmsysorg/sglang:v0.5.23 bash -c '
git -C /sgl-workspace/sglang fetch --depth 1 https://github.com/Akicou/sglang.git clover-vl &&
git -C /sgl-workspace/sglang checkout --detach FETCH_HEAD &&
python3 -m sglang.launch_server --model-path kaivoss/Clover-Preview-VL \
--speculative-algorithm CLOVER --reasoning-parser qwen3 \
--max-running-requests 4 --context-length 16384 --host 0.0.0.0 --port 30000'
```
One H200, 150 short-answer VQA questions in 18 seconds direct mode, ~500–590 tok/s decode with accept lengths of
4.8–6.4. Thinking mode: 150 questions in 2 minutes. One checkpoint serves as both draft and verify model; no extra
GPU memory for the draft.
An NVFP4 quant of the routed experts lives at
[kaivoss/Clover-Preview-VL-NVFP4](https://huggingface.co/kaivoss/Clover-Preview-VL-NVFP4) — same serving setup,
~23 GB of weights instead of 66 GB, mean 84.2 vs 88.2 on this table.
## Run (slow, Hugging Face)
Needs one GPU with about 80 GB (Clover is 69 GB in bf16): about 8 seconds for a short answer, minutes for a
thinking trace.
```bash
git clone https://huggingface.co/kaivoss/Clover-Preview-VL && cd Clover-Preview-VL
pip install -r requirements.txt
python run.py photo.jpg "What does the sign say?" # thinking by default
python run.py photo.jpg "What is shown?" --no-think
```
`eval_vl.py` reproduces the table on this path; `train_vl.py`, `prep_data.py` and `distill.py` reproduce the
training; `build_serving.py` built the merged checkpoint.
## Limits
- One image per prompt, single turn. No grounding or box output.
- Thinking traces occasionally loop without closing; give them a higher token cap if you need 100% closure.
- Small evaluation. Treat the table as a sanity check, not a benchmark result.
## License
Apache-2.0, like Clover and Qwen3.6. The training images come from LLaVA-OneVision subsets with their own terms.