张宗平 77c2ada9b7 fix(train): _latest_step must consider final.pt (avoid re-running finished stage)
Critical supervisor bug: completion check + --resume both used a glob that
only matched '{stage}_step*.pt', so a finished '{stage}_final.pt' (whose
step lives inside the file, not the filename) was invisible. Symptom: after
stage1 hit 31250 and saved final.pt, the supervisor re-launched --resume,
which picked step8000 (oldest sort-order quirk) and started OVERWRITING the
just-finished run from step 8000. Caught mid-overwrite; final.pt survived.

Fix: _latest_step (both stage1 & stage2) now globs step*.pt AND final.pt,
reads each one's 'step' field, returns the true highest. Supervisor's
run_until uses the same helper + reads step from the chosen ckpt to decide
completion. Verified: stage1(31250) now correctly reports 'done' and the
supervisor skips straight to stage2.

Also corrected supervisor stage1 config: bs=4 ga=8 (not bs=8 ga=4) — the
latter OOMs on long-sequence batches (logits 4.6GB alloc). expandable_segments
set to reduce fragmentation.

Full-scale retrain completed: stage1 31250 steps EMA 1.26, stage2 9375
steps EMA 0.75 (beats small-scale avg 0.81).
2026-07-01 10:12:31 +00:00
2026-06-29 21:16:52 +08:00
2026-06-29 21:16:52 +08:00
2026-06-29 21:16:52 +08:00
2026-06-29 21:16:52 +08:00
2026-06-29 21:16:52 +08:00
2026-06-29 21:16:52 +08:00
2026-06-29 21:16:52 +08:00

tsmm

Time-series as a Modality — an experimental, single-GPU multimodal model that treats multivariate time series as an independent modality, jointly injected into a small LLM (Qwen2.5-0.5B) for time-series question answering and reasoning (ChatTS route).

Status

M1 (data pipeline) under construction. See docs/superpowers/specs/2026-06-29-ts-as-modality-design.md for the design and docs/superpowers/plans/2026-06-29-ts-as-modality-plan.md for the task plan.

Layout

src/tsmm/   package (data, model, train, eval)
configs/    training / data configs
scripts/    offline generation & training entrypoints
tests/      pytest suite
data/       generated datasets (gitignored)
checkpoints/ model checkpoints (gitignored)

Install (dev)

python3 -m venv .venv
. .venv/bin/activate
pip install -e .            # full deps (incl. torch/transformers/peft/...)
# M1-only lightweight install:
pip install numpy tqdm pyyaml pytest && pip install -e . --no-deps
S
Description
No description provided
Readme 421 KiB
Languages
Shell 99.8%
TypeScript 0.2%