Skip to content

fix: respect later-turn single-image placeholders - #1134

Closed
primorLee wants to merge 1 commit into
OpenBMB:mainfrom
primorLee:codex/fix-later-turn-image-placeholder
Closed

fix: respect later-turn single-image placeholders#1134
primorLee wants to merge 1 commit into
OpenBMB:mainfrom
primorLee:codex/fix-later-turn-image-placeholder

Conversation

@primorLee

Copy link
Copy Markdown

Summary

  • Resolve the single-image placeholder in the first conversation turn that contains <image>, rather than assuming it is always in turn zero.
  • Preserve the existing front-of-conversation fallback when a single-image sample does not include a placeholder.

Testing

  • python3 -m unittest discover -s finetune -p 'test_dataset.py' -v
  • python3 -m py_compile finetune/dataset.py finetune/test_dataset.py

The focused regression test stubs optional training dependencies and verifies both later-turn placement and the no-placeholder fallback.

@airlsyn

airlsyn commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Thanks @primorLee ! Great catch on the later-turn single-image placeholder handling.

Finetune is no longer maintained in MiniCPM-V — could re-submit to MiniCPM-V-Cookbook , if the corresponding code still exists there.

Happy to review it there.
Appreciate the contribution!

@primorLee

Copy link
Copy Markdown
Author

Thanks for the guidance. I migrated the focused fix and regression coverage to OpenSQZ/MiniCPM-V-CookBook#138, where the corresponding finetune/official/dataset.py code is maintained. Closing this PR to keep the old repository review queue clean.

@primorLee primorLee closed this Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants