N Neurarch Try it See it Changes Bot Pricing API Open app

Models / time_moe

TimeMoE-50M: GPU memory to fine-tune

Fine-tuning TimeMoE-50M at batch 1 and 2048 tokens takes about 0.99 GB of GPU memory for a full fine-tune (fits one T4 16 GB), and 0.42 GB with LoRA r=16 on a bf16 base (fits one T4 16 GB). Estimated from the model's structure, reading the config under transformers semantics, not measured. What fits on which card.

Reconstructed from its own config.json with no weights read. 106K downloads on Hugging Face.

Our count against the checkpoint

The left number comes from the graph. The right one is the number of scalars in the published weight files. Nothing on this page was tuned to make them agree.

Derived from structure
34.6M
34,577,664 parameters
In the published checkpoint
113M
113,352,192 scalars · safetensors.total, read 2024-10-22
Delta
-69.5%

custom-code This repository ships its own modeling code (`auto_map`, e.g. `configuration_time_moe.py`), so `config.json` names a class in the repo rather than an architecture `transformers` defines. The graph below is what those config keys mean under `transformers` semantics, which is not necessarily what the repo's own file builds. A gap here is a statement about what we read, not about the checkpoint.

What it costs to run

Cost is a roofline estimate on the priced GPU for 10 epochs at batch 32, 2048 tokens over 50,000 samples (assumed; no dataset attached).

Layers
50
Will it forward-pass
Yes
Priced on
A10G (24GB)
Est. one run
$2.39

Memory: what fits on which card

Largest batch per card. Training is sized at 2048 tokens per sample, serving at 4096 tokens per sequence.

Full fine-tune, batch 1 at 2048 tokens
0.99 GB
LoRA r=16, batch 1 at 2048 tokens
0.42 GB
Serve: bf16 weights
69 MB
Serve: KV cache, 4096 tokens
75 MB
CardFull fine-tuneLoRA r=16Serve bf16, 4096 tokens
T4 16 GBbatch 40batch 42batch 183
L4 24 GBbatch 62batch 63batch 275
A100 40 GBbatch 104batch 106batch 459
A100 / H100 80 GBbatch 211batch 213batch 920
H200 141 GBbatch 374batch 375batch 1623

Training: 2048 tokens per sample (2048, or the model's context when shorter; the structure table is at the config's maximum, 4096), AdamW with bf16 autocast, SDPA attention (no score matrix stored), 1.15x headroom on every card. Full fine-tune holds weights, gradients and optimizer state (1.2 x 16 bytes per parameter) plus activations. LoRA is r=16 on every linear layer but the head, base frozen in bf16 (2 bytes per parameter), adapters at full AdamW state, same activations. A two-card split is a contiguous layer cut (pipeline parallel), computed only where one card cannot hold batch 1. Serving: bf16 weights plus the KV cache of 4096 tokens per sequence; prefill working set, CUDA context and framework reserve not counted.

These are estimates from the graph, not measurements. Against measured runs, held out by architecture, the estimate flagged 113 of the 131 jobs that did not fit their card and said "fits" on the other 18. Every measured run.

Structure

52 nodes. Output shapes are propagated from the input shape, batch dimension excluded, at 4096 tokens: the config's maximum context, not the 2048 the memory above is sized at.

LayerTypeOutput shape
1InputInput1 × 4096
2EmbeddingEmbedding1 × 4096 × 384
3Positional_EmbeddingLearned Pos Embed1 × 4096 × 384
4Attention_1Multi-Head Attention1 × 4096 × 384
5Add_1Add1 × 4096 × 384
6LayerNorm_1_1LayerNorm1 × 4096 × 384
7FFN_1Feed Forward1 × 4096 × 384
8Attention_2Multi-Head Attention1 × 4096 × 384
9Add_2Add1 × 4096 × 384
10LayerNorm_2_1LayerNorm1 × 4096 × 384
11FFN_2Feed Forward1 × 4096 × 384
12Attention_3Multi-Head Attention1 × 4096 × 384
13Add_3Add1 × 4096 × 384
14LayerNorm_3_1LayerNorm1 × 4096 × 384
15FFN_3Feed Forward1 × 4096 × 384
16Attention_4Multi-Head Attention1 × 4096 × 384
17Add_4Add1 × 4096 × 384
18LayerNorm_4_1LayerNorm1 × 4096 × 384
19FFN_4Feed Forward1 × 4096 × 384
20Attention_5Multi-Head Attention1 × 4096 × 384
21Add_5Add1 × 4096 × 384
22LayerNorm_5_1LayerNorm1 × 4096 × 384
23FFN_5Feed Forward1 × 4096 × 384
24Attention_6Multi-Head Attention1 × 4096 × 384
25Add_6Add1 × 4096 × 384
26LayerNorm_6_1LayerNorm1 × 4096 × 384
27FFN_6Feed Forward1 × 4096 × 384
28Attention_7Multi-Head Attention1 × 4096 × 384
29Add_7Add1 × 4096 × 384
30LayerNorm_7_1LayerNorm1 × 4096 × 384
31FFN_7Feed Forward1 × 4096 × 384
32Attention_8Multi-Head Attention1 × 4096 × 384
33Add_8Add1 × 4096 × 384
34LayerNorm_8_1LayerNorm1 × 4096 × 384
35FFN_8Feed Forward1 × 4096 × 384
36Attention_9Multi-Head Attention1 × 4096 × 384
37Add_9Add1 × 4096 × 384
38LayerNorm_9_1LayerNorm1 × 4096 × 384
39FFN_9Feed Forward1 × 4096 × 384
40Attention_10Multi-Head Attention1 × 4096 × 384
41Add_10Add1 × 4096 × 384
42LayerNorm_10_1LayerNorm1 × 4096 × 384
43FFN_10Feed Forward1 × 4096 × 384
44Attention_11Multi-Head Attention1 × 4096 × 384
45Add_11Add1 × 4096 × 384
46LayerNorm_11_1LayerNorm1 × 4096 × 384
47FFN_11Feed Forward1 × 4096 × 384
48Attention_12Multi-Head Attention1 × 4096 × 384
49Add_12Add1 × 4096 × 384
50LayerNorm_12_1LayerNorm1 × 4096 × 384
51FFN_12Feed Forward1 × 4096 × 384
52OutputOutput1 × 4096 × 384

What the verifier says

infoAt 12 stacked attention layers, residual-branch outputs add up; unscaled init lets activation variance grow with depth. GPT-2/LLaMA-family models scale the residual projections by depth (N(0, 0.02 / √(2L))). Fix: Scale residual output projections by depth: nn.init.normal_(w, std=0.02 / math.sqrt(2 * n_layers))
deep-attention-default-init

What changed upstream

The change tracker follows Maple728/TimeMoE-50M: every revision it has read, what changed in the config, tokenizer, chat template or weights between them, and an OSV advisory per change.

Do this to your own model

Same numbers, on a model in your repo, in one command. No account.

pip install neurarch-trace
neurarch-trace Maple728/TimeMoE-50M --plan --share