545802d62c6eb98ec3b728e8bd8ec88b62129c92
- src/tsmm/model/ts_encoder.py: Patchify (channel-independent unfold) + TSEncoder (shared per-channel patch linear, mean-pool over channels, learnable positional embedding, 2-layer pre-norm Transformer, LayerNorm). - configs/ts_encoder.yaml: encoder/projector hyperparameters. - tests/test_ts_encoder.py: 10 tests (shape, n_patches formula, window values, determinism, gradient flow, param sanity). - 61 tests passing; GPU fwd/bwd verified on RTX 3060 (39 MB peak). Spec clarifications (small tier, comet-build Step 4): - n_patches = (T-P)//S+1 ⇒ 127 for T=512 (design said 128; arithmetic slip). - 'Channel-independent' = shared per-channel patch embed + mean-pool → C-free output [B,n_patches,d]; channel identity carried by [属性] tokens. - Actual params ≈2.1M (design's '≈4M' was a rough estimate).
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
Description
Languages
Shell
99.8%
TypeScript
0.2%