Skip to content

0.3.4 follow-up: remove no-op auto-depth, fix greedy verify penalty, correct CHANGELOG - #62

Merged
FonaTech merged 1 commit into
mainfrom
fix-0.3.4-decoding
Nov 18, 2026
Merged

FonaTech merged 1 commit into
mainfrom
fix-0.3.4-decoding

Conversation

@FonaTech

Copy link
Copy Markdown
Owner

Fixes three defects that shipped in #61 (26f3bb4). Land this before tagging v0.3.4.

Defects

  1. auto_select_inference_depth never ran on a real checkpoint. It read config.step_sizes, but the trained schedule is the recurrent_controller.step_sizes parameter in the state dict. ChronosConfig has no such attribute, so the selector returned None on every real load. The 0.3.4: repetition_penalty + auto max_inference_depth (decoding-only) #61 tests passed only because they set step_sizes on a fake config.
  2. The cumulative-dt rule behind it was wrong. step_sizes has shape [recurrent_groups], not [depth], and every loop iteration runs all groups. Summing dt[:d] is not a per-iteration cumulative step.
  3. Greedy verify ignored repetition_penalty. Draft pick() took argmax after the penalty, but verify took argmax of raw logits. Under penalty > 1 they disagreed on every seen token.

Changes

  • Removed auto_select_inference_depth, _effective_dt, AUTO_DEPTH_DT_LIMIT, the loader auto-pick block, ChronosConfig.auto_inference_depth, and CHRONOS_AUTO_INFERENCE_DEPTH.
  • Greedy verify now applies the same CTRL penalty on the same seen set before argmax.
  • max_inference_depth stays in INFERENCE_OVERRIDE_KEYS as a manual override.
  • CHANGELOG corrected. The 0.129 → 0.692 unique_ratio figures come from the local 30M bilingual CPT checkpoint (step 3559), not the shipped 50M en-zh SFT demo model. A quoted continuation that the probe output does not contain was removed.

Tests

  • tests/test_0_3_4_decoding.py was rewritten against the real model. A new case checks that greedy speculative decoding with penalty matches token-by-token penalized greedy. Against 0.3.4: repetition_penalty + auto max_inference_depth (decoding-only) #61's speculative.py, 3 of its 8 cases fail.
  • Full suite without the MLX long-context tests: 691 passed, 1 skipped. test_long_context.py::test_chunked_ce_equals_full_logits_stage_loss also fails on 0.3.3 head, so it is not caused by this change.

After merge

gh release create v0.3.4 --target main --title 0.3.4 --notes-file CHANGELOG.md → pypi.yml publishes.

🤖 Generated with Claude Code

… verify

Three defects shipped in #61 (26f3bb4):

1) auto_select_inference_depth never ran on a real checkpoint. It read
   config.step_sizes, but the trained schedule lives on
   recurrent_controller.step_sizes in the state dict. ChronosConfig has
   no step_sizes attribute. Verified by auto_select_inference_depth
   returning None on a realistic post-load config. The function, its
   helpers, the loader block that called it, and the companion
   ChronosConfig.auto_inference_depth / CHRONOS_AUTO_INFERENCE_DEPTH
   opt-outs are all removed.

2) The cumulative-dt framing behind the selector was also wrong.
   step_sizes has shape [recurrent_groups], not [depth], and every
   iteration of the loop runs all groups (chronos/model/model_chronos.py
   run_layer / block-order loop). Summing dt[:d] across groups is not
   a cumulative Euler step over iterations, so the selector would be
   wrong even if it had seen the right array.

3) Greedy verify applied no repetition_penalty. The draft used
   pick(row), which applied the penalty before argmax; verify read
   argmax(row) on raw logits. Under penalty > 1 the two always
   disagreed on any seen token. Verify now applies the same CTRL
   penalty on the same seen vector before its argmax.

Also corrects CHANGELOG attribution: the 0.129 / 0.553 / 0.220 / 0.692
numbers were measured on the local 30M bilingual CPT run
(latest.state.pkl, step 3559, export_prefix chronos_30m_d4_top2_
bilingual_cpt1b), not on the shipped 50M en-zh SFT demo model. The
quoted 'water' continuation under rep=1.15 no longer matches the probe
output either — removed.

What remains in 0.3.4:
- repetition_penalty threaded through speculative_generate,
  generate_stream, the serving adapter, and the Ollama/OpenAI HTTP
  layer. Default 1.0. CTRL rule applied on raw logits in both
  pick() and greedy verify.
- max_inference_depth is kept in INFERENCE_OVERRIDE_KEYS as an explicit
  manual override (inference_overrides={'max_inference_depth': d}).

Tests: tests/test_0_3_4_decoding.py rewritten against the real model
(no fake config). Confirmed to catch bug #3 against the pre-fix
speculative.py (3 of 8 cases fail). Full suite minus the pre-existing
MLX long-context tolerance failures: 691 passed, 1 skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@FonaTech
FonaTech merged commit db62a31 into main Nov 18, 2026
3 checks passed
@FonaTech
FonaTech deleted the fix-0.3.4-decoding branch November 18, 2026 13:24
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