Download docs/shape-distributions/README.md from humanfia-lab/inference-kernels: direct link, hf CLI and curl.
- Browser
- Download file 14.6 kB
-
https://huggingface.co/datasets/humanfia-lab/inference-kernels/resolve/main/docs/shape-distributions/README.md
- Command line
-
hf download hf://datasets/humanfia-lab/inference-kernels/docs/shape-distributions/README.md
-
curl -L -o README.md https://huggingface.co/datasets/humanfia-lab/inference-kernels/resolve/main/docs/shape-distributions/README.md
Kernel shape distributions
21 kernels, 1104 captured workloads. Each histogram counts the workload records in one kernel definition's JSONL file. Every bar is one exact combination of its runtime dimensions; identical shapes are combined. The labels retain all runtime dimensions, including dimensions that happen to have one observed value. Model constants appear above each plot.
Read bar height (or length in horizontal plots) as the number of captured workloads with that shape. Bins are equally spaced categories, sorted by the dimension values, not continuous numeric intervals. A bar of 1 means one published example; a bar of 6 means six. These are capture counts, not request probabilities, runtime invocation frequencies, or AgentX traffic weights.
Multi-dimensional shapes use horizontal bars to keep every dimension readable. Dimension names are explained below each plot; the linked definition specifies complete tensor layouts.
Regenerate from the repository root with Python and Matplotlib (rendered with 3.11.2):
python scripts/plot_shape_distributions.py
Only definition and workload metadata are needed; tensor snapshots and a GPU are unnecessary.
prefix_cached_block_causal_h32_d128
Definition · Workloads · SVG
Runtime dimensions: B: Runtime batch size. Nq: Runtime current query/token count. Np: Runtime cached prefix length, possibly zero. Nall: Total prefix and current length.
prefix_cached_block_causal_h32_d128_prefix0
Definition · Workloads · SVG
Runtime dimensions: B: Runtime batch size. Nq: Runtime current query/token count. Nall: Total prefix and current length.
noncausal_dense_attention_h32_d128
Definition · Workloads · SVG
Runtime dimensions: B: Runtime batch size. Nq: Runtime query length. Nk: Runtime key/value length.
noncausal_dense_attention_h32_d64
Definition · Workloads · SVG
Runtime dimensions: B: Runtime batch size. Nq: Runtime query length. Nk: Runtime key/value length.
gdn_decode_qk4_v8_d128_k_last
Definition · Workloads · SVG
Runtime dimensions: batch_size: Number of sequences being decoded concurrently.
gdn_prefill_qk4_v8_d128_k_last
Definition · Workloads · SVG
Runtime dimensions: total_seq_len: total_seq_len num_seqs: num_seqs len_cu_seqlens: Length of cu_seqlens array (num_seqs + 1).
dense_gemm_bf16_nt_n12288_k4096
Definition · Workloads · SVG
Runtime dimensions: M: Runtime number of token rows.
dense_gemm_bf16_nt_n4096_k12288
Definition · Workloads · SVG
Runtime dimensions: M: Runtime number of token rows.
dense_gemm_bf16_nt_n4096_k4096
Definition · Workloads · SVG
Runtime dimensions: M: Runtime number of token rows.
grouped_gemm_fp8_fp4_e384_n4608_k5120_g32
Definition · Workloads · SVG
Runtime dimensions: M: Runtime number of token rows.
grouped_gemm_fp8_fp4_e384_n5120_k2304_g32
Definition · Workloads · SVG
Runtime dimensions: M: Runtime number of token rows.
mixed_mla_decode_deepseek41_h64_d512_k8128_k4512
Definition · Workloads · SVG
Runtime dimensions: B: Runtime batch size. N8: Allocated FP8 page count. P8: Backend FP8 page size. N4: Allocated FP4 page count. P4: Backend FP4 page size.
moe_router_gemm_topk_deepseek41_d5120_e384_topk6
Definition · Workloads · SVG
Runtime dimensions: M: Runtime number of token rows.
neighborhood_attention_3d_h16_d64_kt3_ky7_kx7
Definition · Workloads · SVG
Runtime dimensions: B: Runtime batch size. T: Runtime frame count. Y: Runtime grid height. X: Runtime grid width.
neighborhood_attention_3d_h32_d64_kt3_ky7_kx7
Definition · Workloads · SVG
Runtime dimensions: B: Runtime batch size. T: Runtime frame count. Y: Runtime grid height. X: Runtime grid width.
neighborhood_attention_3d_h4_d64_kt11_ky11_kx11
Definition · Workloads · SVG
Runtime dimensions: B: Runtime batch size. T: Runtime frame count. Y: Runtime grid height. X: Runtime grid width.
neighborhood_attention_3d_h8_d64_kt3_ky5_kx5
Definition · Workloads · SVG
Runtime dimensions: B: Runtime batch size. T: Runtime frame count. Y: Runtime grid height. X: Runtime grid width.
qsa_index_topk_decode_qwen38_h4_d128_topk512_c4
Definition · Workloads · SVG
Runtime dimensions: B: Runtime batch size. NP: Allocated compressed-key page count. P: Backend compressed-key page size, measured in micro-blocks. MP: Page-table capacity.
qsa_sparse_gqa_decode_qwen38_h24_kv2_d256_topk512_c4
Definition · Workloads · SVG
Runtime dimensions: B: Runtime batch size. NP: Allocated cache page count. P: Backend token-cache page size. MP: Page-table capacity per sequence.
sparse_mla_prefill_h64_d512_k128
Definition · Workloads · SVG
Runtime dimensions: M: Runtime number of token rows. Nkv: Number of latent vectors in the engine workspace.
sparse_mla_prefill_h64_d512_k640
Definition · Workloads · SVG
Runtime dimensions: M: Runtime number of token rows. Nkv: Number of latent vectors in the engine workspace.