# Per-worker model-state memory Specify the number of parameters, worker count, zero-based rank, ZeRO stage, and bytes per parameter for weights, gradients and optimizer state. Stage 1 partitions optimizer state, stage 2 also partitions gradients, and stage 3 also partitions weights. Remainders go to the lowest ranks. The minimum-rank search budgets the largest rank. ## Try the native command Extract the archive for your platform from the [Albatross 0.2.0 release](https://github.com/Rahulchaube1/blyx-albatross/releases/tag/v0.2.0). Add its directory to PATH or use the executable’s full path. Run the fixture commands from the extracted directory. ~~~sh albatross state 2199023255552 512 0 3 2 2 12 albatross min-ranks 2199023255552 3 2 2 12 85899345920 17179869184 4096 ~~~ ## Scope and input contract Results are signed 64-bit byte counts under balanced partitioning. The reserve is supplied by the caller. Measure activations, communication buffers, fragmentation and runtime overhead for your own model. A fit in this arithmetic model does not establish throughput or a successful distributed training run. ## Import in Blyx The executable includes its runtime. To compile the source example, install the tested compiler revision and a host linker, then run these commands from the tagged source tree. ~~~sh cargo install --locked --git https://github.com/Rahulchaube1/blyxxxx --rev 120d6b6ec6df09ff018d7c18752fb3297b5e629d blyxc blyxc native-run scale_example.blyx ~~~ ~~~blyx use train_memory; fn main() { let parameters = 2199023255552; println!(albatross_state_bytes(parameters,512,0,3,2,2,12)); println!(albatross_min_ranks(parameters,3,2,2,12,85899345920,17179869184,4096)); } ~~~ ## Verification At 512 ranks the model-state share is 68,719,476,736 bytes (64 GiB). An 80 GiB device with a 16 GiB reserve admits this share. The example returns 512 as the smallest number of ranks within the specified bound. [Study, raw timings and reproduction instructions](https://www.blyx-lang.space/articles/training-in-factors)