Repository navigation
Description
Feature request
Please support image-conditioned Clef/Jev-style decision model training and prediction on the PyTorch/CUDA backend, including multiple images per record.
The desired workflow is the one in the decision model tutorial, with an additional images field.
Related work
- MLX decision training: Clef rows and predict take images #13127 adds image-bearing decision rows and
FastDecisionModel.predict(..., images=...)for MLX. - MLX: decision models read images, and Clef trains on them unsloth-zoo#1645 implements the corresponding MLX image training path, but explicitly excludes image training on the torch path.
- Studio: send Decision API images to the MLX engine for Clef #13126 connects image requests to the MLX Decision API.
Is there an existing plan or tracking issue for equivalent PyTorch/CUDA support?
Current behavior observed in the source
I inspected unsloth/models/decision.py at commit c6db48dd3859e8eaa73fdee3b599b321f29d0bea:
_clef_items()passes onlystateandquestionstoencode_record(), dropping a top-levelimagesfield.ClefDataCollatordoes not propagate the image tensors.ClefDecisionModel.forward()selects the inner language model and does not forward image inputs.- The PyTorch
FastDecisionModel.predict()signature has noimagesargument.
As a result, selecting a vision-language backbone does not by itself enable image-conditioned decision training. An image column can be ignored while text-only training proceeds.
Desired interface
Illustrative input, using already loaded PIL images:
row = {
"state": "The images are ordered from oldest to newest, one second apart.",
"images": [frame_0, frame_1, frame_2],
"questions": {
"motion": {
"type": "choice",
"instructions": "How does the object move across these frames?",
"criteria": {
"left": "It moves to the left.",
"right": "It moves to the right.",
"stationary": "It stays in the same position.",
},
},
},
"gold": {"motion": "right"},
}
items, report = FastDecisionModel.build_dataset([row], processor, model)
# Desired CUDA API, matching the MLX interface:
answers = FastDecisionModel.predict(
model, processor, row["state"], row["questions"], images=row["images"]
)Expected scope
- Preserve images through preprocessing, batching, the multimodal forward pass, and the Clef joint schema head.
- Support multiple images per record, preserving their order.
- Keep images available during evaluation/calibration and question permutation.
- Save/reload the processor and required vision components for image-conditioned prediction.
- Until supported, raise a clear error or warning for image-bearing rows rather than silently training without images.
An initial implementation restricted to Qwen3.5-based Clef models with a frozen vision tower would already cover the requested workflow.
Thanks for the decision model support and the MLX implementation!
Activity
[-][Feature] Multi-image Clef decision model training and prediction on PyTorch/CUDA[/-][+][Feature] Multi-image Jev/Clef decision model training and prediction on PyTorch/CUDA[/+]Imagineer99 commentedon Oct 12, 2026
Can confirm images were getting dropped before reaching the vision tower, trying a fix to carry them through preprocessing, batching and prediction.
danielhanchen commentedon Oct 13, 2026
Fixed! On PyTorch/CUDA a Clef's
imageswere dropped before reaching the vision tower, so it trained and predicted on text alone. #13471 carries ordered images (one or many per row) throughbuild_dataset, batching, the multimodal forward, evaluation and save / reload, and addsFastDecisionModel.predict(..., images=...), matching the MLX interface.To update:
uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir(if it's not in the current release yet it'll be in the next one). Reopen if it still happens.resnant commentedon Oct 13, 2026
Thanks for the quick fix! I’ll try it and report back if I run into any issues. Really appreciate your help👍🏻