Repository navigation
fix: preserve text in typed-content checkpoint templates - #2165
Merged
inureyes merged 3 commits intoOct 12, 2026
Merged
Conversation
Normalize eligible string messages at the checkpoint template boundary. Preserve raw conversation fields and explicit template input contracts, with conservative probes and focused regression fixtures. Fixes lablup#2135
Detect selected checkpoint templates that render typed text but drop strings, then adapt typed ChatMessage renders through a borrowed text-part view. Keep raw JSON and string-compatible template contracts unchanged, and cover Granite Vision 3.2 and Granite 4 with pinned fixtures. Validated with eight focused CUDA-profile tests, repository contract checks, and real Granite CLI and server requests on GB10. Fixes lablup#2135
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Granite Vision 3.2 selects its standalone multimodal template, but that template silently drops plain-string message content. The loader now compares one string probe with one typed-text probe and stores a compatibility flag only when the typed form preserves the marker.
Typed
ChatMessagerenders for affected checkpoints use a borrowed typed-text view inapply_inner. Raw JSON requests, explicit template overrides, default processors, and string-compatible templates keep their existing content contracts.What changed
Validation
text_wrap_tests); 9,105 unrelated mlxcel tests and 160 surgery tests were filtered out.mlx-community/granite-vision-3.2-2b-4bitrevision351831ab5218b1f66bbfdfd57bd8f20d81ce8bafon NVIDIA GB10/CUDA: CLI answered Paris in 8 tokens; server string and typed-text requests both answered Paris with 55 prompt tokens and 8 completion tokens. The frozen baseline reproduced the 47-token prompt and unrelated greeting.Reports
TECHNICAL_REPORTS/2165-typed-chat-text-20261013.en.mdTECHNICAL_REPORTS/2165-typed-chat-text-20261013.ko.mdCloses #2135
Fixes #2135