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

Models / remote

tiny-RemoteForCausalLM: GPU memory to fine-tune

Fine-tuning tiny-RemoteForCausalLM at batch 1 and 2048 tokens takes about 1.65 GB of GPU memory for a full fine-tune (fits one T4 16 GB), and 1.62 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. 418K 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
2.2M
2,182,312 parameters
In the published checkpoint
2.1M
2,054,056 scalars · safetensors.total, read 2026-09-08
Delta
+6.24%

custom-code This repository ships its own modeling code (`auto_map`, e.g. `configuration_remote.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
16
Will it forward-pass
Yes
Priced on
A10G (24GB)
Est. one run
$0.12

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
1.65 GB
LoRA r=16, batch 1 at 2048 tokens
1.62 GB
Serve: bf16 weights
4.4 MB
Serve: KV cache, 4096 tokens
0.1 MB
CardFull fine-tuneLoRA r=16Serve bf16, 4096 tokens
T4 16 GBbatch 8batch 8batch 106114
L4 24 GBbatch 12batch 12batch 159188
A100 40 GBbatch 21batch 21batch 265336
A100 / H100 80 GBbatch 43batch 43batch 530707
H200 141 GBbatch 75batch 76batch 935396

Training: 2048 tokens per sample (2048, or the model's context when shorter; the structure table is at the config's maximum, 131072), 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

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

LayerTypeOutput shape
1InputInput1 × 131072
2EmbeddingEmbedding1 × 131072 × 8
3RoPERoPE1 × 131072 × 8
4RMSNorm_1_1RMSNorm1 × 131072 × 8
5Attention_1Grouped Query Attn1 × 131072 × 8
6Add_1_attnAdd1 × 131072 × 8
7RMSNorm_1_2RMSNorm1 × 131072 × 8
8FFN_1SwiGLU1 × 131072 × 8
9Add_1_ffnAdd1 × 131072 × 8
10RMSNorm_2_1RMSNorm1 × 131072 × 8
11Attention_2Grouped Query Attn1 × 131072 × 8
12Add_2_attnAdd1 × 131072 × 8
13RMSNorm_2_2RMSNorm1 × 131072 × 8
14FFN_2SwiGLU1 × 131072 × 8
15Add_2_ffnAdd1 × 131072 × 8
16Final_RMSNormRMSNorm1 × 131072 × 8
17LM_HeadLinear1 × 131072 × 128256
18OutputOutput1 × 131072 × 128256

What the verifier says

No finding on the reconstructed graph. See the checks.

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 trl-internal-testing/tiny-RemoteForCausalLM --plan --share