Skip to content

feat(hslm): progressive quantization — FP32 warmup → ternary anneal#566

Merged
gHashTag merged 1 commit into
mainfrom
feat/321-progressive-quantization
Apr 30, 2026
Merged

feat(hslm): progressive quantization — FP32 warmup → ternary anneal#566
gHashTag merged 1 commit into
mainfrom
feat/321-progressive-quantization

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Summary

Progressive quantization schedule: FP32 warmup → FP16 transition → ternary anneal → full ternary.

New file

  • src/b2t/progressive_quantization.zig — 191 LOC

Schedule

  1. FP32 warmup: Full precision, learn weight distribution
  2. FP16 transition: Reduce precision, threshold decays
  3. Ternary anneal: Progressive ternary conversion with temperature
  4. Full ternary: Complete {-1, 0, +1} quantization

Tests (5)

  • Stage progression, FP32 precision preserved, full ternary output, progress tracking, loss weight monotonicity

Closes #321

- Add src/b2t/progressive_quantization.zig
- 4-stage schedule: fp32_warmup → fp16_transition → ternary_anneal → full_ternary
- Progressive threshold decay: init_threshold → final_threshold
- quantizeWeights: stage-dependent weight modification
- Temperature-controlled ternary transition
- Quantization loss weight increases with schedule progress
- 5 tests: stage progression, fp32 preserves precision,
  full ternary output, progress tracking, loss weight monotonicity

Closes #321
@gHashTag gHashTag merged commit c3e217b into main Apr 30, 2026
9 of 19 checks passed
@gHashTag gHashTag deleted the feat/321-progressive-quantization branch April 30, 2026 00:54
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.

feat(hslm): progressive quantization — FP32 warmup → ternary anneal

1 participant