# Decode indexer logits schedule (`paged_mqa_logits_metadata`) | ServingStudio Kernel Library

Plan the per-SM work split of the dense paged decode indexer logits.

One CTA scans the rows' request indices into requests, prefix-sums their KV split cost and writes each SM's start point.

Category: Attention; group: DSA. Interactive page: https://servingstudio.cs.washington.edu/kernels.html?kind=paged_mqa_logits_metadata. All kernel kinds: https://servingstudio.cs.washington.edu/kernels.md.

## Formula

- `bytes = 8 · batch_size · next_n + 8 · (SMs + 1)`

## How it is measured

GPU kernel time from CUPTI activity records, averaged over repeated launches in one capture. The L2 cache is flushed before each launch, so the numbers are cold-cache times. The schedule is checked by one scoring launch against fp32 math first.

## Caveats

- Measured at a 4096-key context; the single CTA's work is per row, not per key.

## Arguments

| Argument | Type | Unit | Meaning |
| --- | --- | --- | --- |
| `batch_size` | number | requests | Requests decoded together. |
| `next_n` | number | tokens | Query rows per request (verify width). |
| `block_size` | number | tokens | Index keys per cache page. |

## Metrics

- Time (`time_ms`, ms)
- Throughput (`tflops`, TFLOPS)
- Memory bandwidth (`memory_bandwidth_gbps`, GB/s)
- Energy (`energy_j`, J)

## Backends

- `deepgemm_sm100`: DeepGEMM get_paged_mqa_logits_metadata with indices, as DeepInfer's decode indexer calls it. dtypes `mxfp4_e2m1`, SM targets `sm_100f`, GPUs B200-SXM-180GB, B300-SXM-288GB, GB200-Superchip. Source: https://github.com/deepseek-ai/DeepGEMM

## Measured rows

52 rows in all.

| GPU | Backend | Precision | Rows |
| --- | --- | --- | --- |
| NVIDIA B200 | `deepgemm_sm100` |  | 52 |

## Used by these deployments

- [DeepSeek V4.1 Flash 1017: vLLM or DeepInfer, DP attention, EP MoE](https://servingstudio.cs.washington.edu/models/DeepSeek-V4.1-Flash-1017/deepseek_v41_vllm_dp_attn_ep_moe.md) (`DeepSeek-V4.1-Flash-1017/deepseek_v41_vllm_dp_attn_ep_moe`)
- [DeepSeek V4.1 Flash 1017: vLLM, DP attention, EP MoE, DSpark speculative decoding](https://servingstudio.cs.washington.edu/models/DeepSeek-V4.1-Flash-1017/deepseek_v41_vllm_dp_attn_ep_moe_dspark.md) (`DeepSeek-V4.1-Flash-1017/deepseek_v41_vllm_dp_attn_ep_moe_dspark`)

## API

- This kind: https://servingstudio.cs.washington.edu/api/public/v1/kernels/paged_mqa_logits_metadata
- Measured rows: https://servingstudio.cs.washington.edu/api/public/v1/kernels/paged_mqa_logits_metadata/rows (filter by any column, such as `?gpu=NVIDIA%20H200`; `format=csv` for CSV)
- Configs the public deployments ask of it: https://servingstudio.cs.washington.edu/api/public/v1/kernels/paged_mqa_logits_metadata/configs

---

This page as Markdown: https://servingstudio.cs.washington.edu/kernels/paged_mqa_logits_metadata.md. A guide to the whole site for AI agents: [llms.txt](https://servingstudio.cs.washington.edu/llms.txt).
