Skip to content

Add chronos-enzh-50m-sft model package to dev (en→zh, research only) - #50

Merged
FonaTech merged 1 commit into
devfrom
model-enzh-50m-sft-dev
Nov 8, 2026
Merged

FonaTech merged 1 commit into
devfrom
model-enzh-50m-sft-dev

Conversation

@FonaTech

@FonaTech FonaTech commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Summary

Adds models/chronos-enzh-50m-sft/, the packaged 50M Chronos v3 English → Chinese model from the 69-hour M5 Max run, and links it from the root READMEs.

  • Contents: config.json, the model's own 16k tokenizer, the trained prompt (prompts.json), decoding settings (generation_config.json), the driver translate.py (CLI + Python API, pinned to Project_Chronos==0.3.2a0), the evaluation scripts, and aggregate results.
  • Weights: not in git. They are attached to release enzh-50m-sft-v1. translate.py --download fetches them and checks SHA-256 57c59a14…fab4b7.
  • Boundary, enforced by the driver:
    • English → Chinese only.
    • One sentence per call, ≤ 128 tokens.
    • zh→en is refused. en→zh-only SFT erased that direction: FLORES+ BLEU 0.00 after SFT, against 17.15 for the pretraining checkpoint.
    • Repetition loops are cut, with a warning.
  • Measured (MLX bf16, greedy):
    • FLORES+ devtest: BLEU 33.48 / chrF 29.52
    • WMT22: 32.60 / 28.83
    • WMT24++ (sentence split): 26.89 / 24.43
  • Terms: NOTICE limits the weights to research use. The training-corpus licences are unknown. The code is Apache-2.0.
  • Packaging: MANIFEST.in prunes models/, so the PyPI sdist does not change.

Test plan

  • ruff==0.17.4 check . and flake8 --select=E9,F63,F7,F82 are clean.
  • The local CI simulation (no MLX, CPU torch 2.10.0, Python 3.11) passes: 262 passed / 49 skipped on main, 408 passed / 67 skipped on dev.
  • tests/test_model_enzh_50m_sft.py (13 tests) checks:
    • refusal of zh, mixed-CJK, Japanese, Russian and empty input
    • that abbreviations and list numbers are not split
    • the loop guard
    • --direction zh_en exiting with code 2
    • the shipped settings
  • With the exported weights, the driver reproduces the training run's FLORES+ BLEU 33.48.
  • After the release: translate.py --download in an empty directory, plus one translation.

🤖 Generated with Claude Code

models/chronos-enzh-50m-sft/ packages the 50M Chronos v3 model trained
for 69 h on an Apple M5 Max: config, own 16k tokenizer, the trained
prompt, decoding settings, a driver (translate.py) and the evaluation.
Weights ship as a release asset (enzh-50m-sft-v1), not in git.

- Boundary: English -> Chinese only, one sentence of <= 128 tokens per
  call. zh->en is disabled because en->zh-only SFT erased it (FLORES+
  BLEU 0.00 after SFT vs 17.15 for the pretraining checkpoint).
- Measured (MLX bf16, greedy): FLORES+ devtest BLEU 33.48 / chrF 29.52,
  WMT22 32.60 / 28.83, WMT24++ 26.89 / 24.43 (sentence split).
- The driver checks the weights' SHA-256, splits sentences, refuses
  input outside the boundary and cuts repetition loops.
- NOTICE: weights are for research use only (corpus licences unknown).
- tests/test_model_enzh_50m_sft.py covers the boundary checks without
  loading weights; the sdist prunes models/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@FonaTech
FonaTech merged commit acf9ed6 into dev Nov 8, 2026
2 checks passed
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