Python APIs¶
This section covers the direct MATE Python APIs. Use these interfaces only when your framework or model architecture requires direct symbol-level integration.
Note
Check wrapper availability first. The wrapper-first workflow preserves more of the upstream package behavior and usually requires less code change.
Use direct MATE Python APIs when:
no wrapper matches your framework’s package surface
a wrapper exists but does not cover the feature you need
you need symbol-level control over a specific operator path
Supported API Entrypoints¶
Attention¶
Optimized entrypoints for FlashAttention, varlen, KV-cache, and MLA-related attention paths.
mate.flash_attn_varlen_funcmate.flash_attn_with_kvcachemate.get_mla_metadatamate.flash_mla_with_kvcache
GEMM¶
Low-precision GEMM entrypoints, including batched FP8 and groupwise GEMM paths.
mate.gemm.bmm_fp8mate.gemm.gemm_fp8_nt_groupwise
Hyperconnection¶
Direct Hyperconnection APIs exposed through mate.hyperconnection.
KDA¶
Direct KDA entrypoints for fused chunked KDA when the
flash_kda wrapper is not the right integration surface.
mate.kda.chunk_kda