Skip to content

fix: max_positions reads the text config (was 0 for Gemma 4) - #95

Merged
AdvayMonga merged 1 commit into
mainfrom
fix/max-positions-text-config
Oct 5, 2026
Merged

AdvayMonga merged 1 commit into
mainfrom
fix/max-positions-text-config

Conversation

@AdvayMonga

Copy link
Copy Markdown
Owner

CustomTorchBackend.max_positions read max_position_embeddings from the top-level config. Gemma 4's config is composite and keeps it only on the text config, so it was 0 — which silently disabled the prompt-length bound in score_logprobs (prompt_logprobs path). Now reads get_text_config(); Qwen3-MoE is unaffected (its text config is itself). Suite: 485 passed.

🤖 Generated with Claude Code

…ling the scoring length check)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@AdvayMonga
AdvayMonga merged commit 57e7bc5 into main Oct 5, 2026
4 checks passed
@AdvayMonga
AdvayMonga deleted the fix/max-positions-text-config branch October 5, 2026 04:18
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.

1 participant