Repository navigation
feat(model): report bounded greedy FIM stop reasons and token-cap exits - #180
Merged
sanskarIN merged 7 commits intoOct 30, 2026
Merged
Conversation
…ts and aggregate counts
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.
Problem
The optional HF synthetic baseline/LoRA benchmark compares output token totals and inference latency, but cannot tell whether a completion ended at EOS/FIM suffix or exhausted
maxNewTokens. Token-limit exits may represent truncated code, so exact-match and timing summaries without this caveat can mislead.Implementation
lineloom-hf-synthetic-smoke-v7and offline comparison protocol tolineloom-hf-synthetic-comparison-v6.classify_generation_termination(): classify the actual generated ID sequence asstop-tokenif the last token is an allowed EOS/FIM suffix (including at the length cap), otherwisetoken-limitonly if the output exactly reaches the cap. Reject unexplained early truncations, stop tokens followed by further generation, and malformed IDs.stopTokenandtokenLimitexit counts overall and across all five languages; discard per-example token sequences and reasons after computing metrics.compare_smoke.py, refusing incompatible or fabricated reports.TOKEN_LIMIT_EXITS_REQUIRE_REVIEWwhen applicable; a natural stop does not imply code correctness.Verification and limits
All benchmark tests use invented counts/IDs and checked-in original synthetic fixtures; there is no GPU run, no actual model evaluation, no checkpoint or training corpus accessed, no model weights bundled, and no extension or marketplace release. Existing opt-in checkpoints and no-source-output controls remain. Merge only after cross-platform CI, independent dependency audit and isolated VSIX candidate installation/upgrade pass.