fix(grounded_reasoning): bump max_new_tokens 512 → 1024#927
Closed
lichengzhe wants to merge 2 commits into
Closed
Conversation
The default max_new_tokens=512 silently truncates Falcon Perception output when segmenting dense scenes (170+ instances). Autoregressive mask-coordinate generation exceeds 512 tokens, causing later masks to never be emitted. Tested on a 200+ object counting task: 512 tokens → 170 masks 1024 tokens → 198 masks (+16.5% recall) 2048/4096 → 198 (no further gain, 1024 is sufficient) Ref: Blaizzy#926 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
246e3f7 to
930cbff
Compare
Owner
|
done in main |
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
max_new_tokensfrom 512 to 1024 ingrounded_reasoning/fp_tools.pyProblem
Falcon Perception generates mask coordinates autoregressively. When segmenting dense scenes (e.g., 200+ small objects), the token sequence exceeds 512 tokens and later masks are silently dropped — no error, no warning, just missing detections.
Test results
Tested with
tiiuae/Falcon-Perception+mlx-community/gemma-4-26b-a4b-it-4biton M4 Pro 64GB.Related
🤖 Generated with Claude Code