* feat(sft): multimodal (VLM) SFT
Renderer-produced multimodal samples flow end to end through SFT:
- SFTDataset keeps the renderer's MultiModalData: image-safe truncation
(never cuts inside a placeholder run, drops truncated-out images, and
skips samples whose EOS was truncated away), mm_token_type_ids kept
aligned through EOS append and causal shift, video inputs rejected
explicitly. _flatten_mm_items folds per-image processor outputs into
model-forward kwargs (pixel_values, image_grid_thw, ...).
- Cat packing concatenates mm_kwargs across samples in a pack and
represents text-only spans as zeros in mm_token_type_ids; stack
bucketing emits multimodal samples solo. Collates move mm tensors to
CUDA and keep packed rows batch-size 1.
- Local data_files normalization wraps string message content into
typed content blocks under a multimodal flag so Arrow can unify
text and image rows.
- setup_processor loads the AutoProcessor and attaches it to the
renderer; VLM SFT fails fast without one; weight checkpoints save
the processor alongside the tokenizer.
- Dense Qwen3.5 gains the composite VLM body (HF vision encoder +
custom text model) with MRoPE positions from mm_token_type_ids and
registers in _CUSTOM_VLM_MAPPING; VLM training requires a custom
PrimeRL implementation. Both dense and MoE VLM bodies always run
the vision encoder (dummy input on text-only microbatches, kept in
the backward graph) for FSDP/EP collective symmetry.
- Config: VLM SFT requires micro_batch_size=1; unfreezing the vision
encoder is incompatible with LoRA; the renderer-vs-VLM rejection is
gone (renderers own multimodal tokenization now).