What problem does it solve?
Hybrid models combining attention layers with linear-attention layers (Mamba, GDN, KDA) split serving memory into two independently budgeted pools, and choosing the wrong --mamba-full-memory-ratio causes one pool to bottleneck first, clamping concurrency or wasting GPU memory. This Skill computes the ratio at which neither pool bottlenecks first for a given workload.
Core Features & Use Cases
- Optimal ratio computation: Derives r* = (S + D) · token_equiv · dcp_size / L from workload context length, per-slot state bytes, per-token KV bytes, cache strategy, speculative decoding, and DCP configuration.
- Concurrency clamp prediction: Predicts max_running_requests from the memory budget and identifies which pool (state vs KV) binds first.
- Configuration guidance: Covers cache strategies (extra_buffer, extra_buffer_lazy, no_buffer), dtype effects (fp8 KV, fp32/bf16 SSM), DCP sharding, and when to pin --max-mamba-cache-size instead of dialing a ratio.
- Use Case: An engineer serving a hybrid Mamba model on TP8 with DCP8 reads the boot log byte constants, provides an average context length of 9216 tokens, and receives r ≈ 14 with a predicted clamp of 125, matching measured behavior.
Quick Start
Ask the assistant to compute the optimal --mamba-full-memory-ratio for your hybrid Mamba model given your average context length, boot log memory figures, cache strategy, and DCP size.