Suggest a perCoreBatchSize based on available system memory.
TimesFM 2.5 200M loads ~1.5 GB into RAM (model weights + activations).
Each additional batch element adds ~200 MB for intermediate tensors.
This function computes a safe batch size that fits within a configurable
fraction of free memory (default: 50 %).
The result is clamped to [1, 16] — the model processes elements
concurrently via Promise.all, so diminishing returns apply beyond 8.
Suggest a
perCoreBatchSizebased on available system memory.TimesFM 2.5 200M loads ~1.5 GB into RAM (model weights + activations). Each additional batch element adds ~200 MB for intermediate tensors. This function computes a safe batch size that fits within a configurable fraction of free memory (default: 50 %).
The result is clamped to [1, 16] — the model processes elements concurrently via
Promise.all, so diminishing returns apply beyond 8.