Module layers

Module layers 

Source

Re-exports§

pub use deepseek_v4_mtp::DeepseekV4MtpHead;
pub use deepseek_v4_mtp::DeepseekV4MtpProposerState;
pub use dense_ffn::DenseFfnLayer;
pub use dense_ffn::DenseFfnWeights;
pub use dense_ffn::FfnActivation;
pub use dflash_head::BlockDiffusionDraftHead;
pub use dflash_head::DflashLayer;
pub use dflash_head::DflashProposerState;
pub use dflash_head::DflashQuantization;
pub use dflash_head::dflash_ctx_cap;
pub use glm5next_mtp_head::Glm5NextMtpHead;
pub use moe::MoeLayer;
pub use mtp_head::MtpHead;
pub use mtp_head::MtpQuantization;
pub use mtp_head::mtp_drafter_prefill_enabled;
pub use nemotron_mamba2::NemotronMamba2Layer;
pub use nemotron_moe::NemotronMoeLayer;
pub use qwen3_attention::Qwen3AttentionLayer;
pub use qwen3_ssm::Qwen3SsmLayer;
pub use vision_encoder::MergerLayer;
pub use vision_encoder::ViTBlock;
pub use vision_encoder::VisionEncoder;

Modules§

deepseek_v4_mtp
DeepSeek-V4-Flash Multi-Token-Prediction (MTP) draft proposer.
dense_ffn
Dense SwiGLU FFN component for non-MoE models.
dflash_head
DFlash block-diffusion draft head implementing DraftProposer.
ep_dispatch
EP=2 token dispatch/combine routing for MoE expert parallelism.
fp8_calibration
Online FP8 KV cache scale calibration.
glm5next_dsa
GLM-5.3-Flash KDA integrated layer (Slice 6 – one layer, no scheduler/cache wiring). GLM-5.3-Flash DSA (DeepSeek Sparse Attention) production surface.
glm5next_dsa_ref
GLM-5.3-Flash DSA + kpool indexer CPU reference (Slice 8 design artifact). GLM-5.3-Flash DSA (DeepSeek Sparse Attention) + kpool indexer CPU reference — Slice 8.
glm5next_kda
GLM-5.3-Flash KDA attention block — the reusable production component.
glm5next_kda_ref
GLM-5.3-Flash KDA CPU reference (Slice 2 design artifact – not a production forward path). GLM-5.3-Flash KDA (Kimi Delta Attention) CPU reference — Slice 2B.
glm5next_layer
GLM-5.3-Flash composite decoder layer – mixer (KDA|DSA) + MLP (dense|MoE) + mHC. Glm5NextLayer — the composite GLM-5.3 decoder layer that implements TransformerLayer.
glm5next_mlp
GLM-5.3-Flash MLP production surface – dense FFN + routed NVFP4 MoE (TP + EP sharded). GLM-5.3-Flash MLP production surface — dense FFN and routed MoE.
glm5next_mtp_head
Glm5NextMtpHead — GLM-5.3’s MTP block as a DraftProposer.
glm5next_skeleton
GLM-5.3-Flash 45-layer text-model skeleton (Slice 9 – topology, wiring, structural binding). GLM-5.3-Flash 45-layer text-model skeleton — Slice 9.
moe
MoE (Mixture of Experts) FFN component.
mtp_head
MTP (Multi-Token Prediction) head implementing DraftProposer.
mtp_multi
Multi-module MTP proposer (MiniMax M2, DeepSeek-V3 style).
nemotron_mamba2
Nemotron-H Mamba-2 SSM layer implementing TransformerLayer.
nemotron_moe
Nemotron-H standalone MoE FFN layer.
ngram_embed
N-gram embedding id math — LongCat-Flash-Lite / Qwen3.8-Flash-Next family.
ops
Shared kernel dispatch operations.
ple
PLE — hashed n-gram injection into the hyper-connection highway.
qsa
The Qwen3.8-Flash-Next QSA indexer — decode-side sparse-attention selection (#753 phase G).
qwen3_attention
Qwen3 full attention layer.
qwen3_ssm
Qwen3-Next SSM (Gated Delta Net) layer implementing TransformerLayer.
vision_encoder
Qwen3-VL vision encoder: 27-block ViT + DeepStack mergers.
w4a16_gemv_tiers
SSOT for the narrow w4a16_gemv_batch{M} tier family (M = 4..8).

Enums§

FfnComponent
FFN component: MoE (expert routing), dense SwiGLU, or None (standalone attention).

Functions§

k64_kernel
Resolve the k64 deep-K tile GEMM, preferring the 3-deep weight-pipeline variant. ON by default; ATLAS_NO_K64_PIPELINE3 (presence — =0 is NOT “off”) falls back to the 2-stage parent.
k64_n64_kernel
Resolve the NARROW-N (N_TILE=64) deep-K twin. KernelHandle(0) when the kernel is absent or the presence kill switch ATLAS_NO_K64_N64 is set (=0 is NOT “off”). Callers must store the handle — kernel() is an init-time lookup, not a per-launch one.
k64_n64_wins
Should the narrow-N deep-K twin serve this shape? See K64_N64_MAX_WIDE_CTAS for the derivation and the measured curve.
moe_grouped_decode_decide
Whether the grouped-GEMM MoE decode arm should run for n rows — PURE, so both polarities are testable without touching process env or the OnceLocks below (which latch, and would make the tests order-dependent).
moe_grouped_decode_enabled
Kill switch for the grouped-GEMM MoE decode arm. PRESENCE check per the house convention (ATLAS_NO_MOE_GROUPED_DECODE=0 is NOT off), read once per process — this predicate sits in the decode path, and the env::var it replaces ran on every dispatch for MoE models.
moe_grouped_decode_for
Whether the grouped-GEMM MoE decode arm should run for n rows.
moe_grouped_decode_forced
Force the grouped arm BELOW moe_grouped_decode_min_rows(). Diagnostic only — it exists so the n=5..15 gap can be measured without a rebuild, and it is the same var #415’s measurements used, kept working on purpose. Never a production setting: if forcing wins at a width, move the THRESHOLD.
moe_grouped_decode_min_rows
Optional kernel lookup: KernelHandle(0) instead of an error.
tgemm_kernel
Resolve the N128/M64 tile GEMM, preferring the 3-deep weight-pipeline variant. ON by default; ATLAS_NO_TGEMM_PIPELINE3 (presence — =0 is NOT “off”) falls back to the 2-stage parent. Falls back automatically on any target that does not ship _p3.
try_kernel
w4a16_v2_kernel
Try to load an optional kernel, logging at debug level if it’s not found. Returns KernelHandle(0) (null) on failure — callers must check before use.
w4a16_v3_kernel
Resolve the W4A16 m128 v3 GEMM. Opt-in ONLY, same contract as w4a16_v2_kernel: ATLAS_W4A16_VARIANT=v3 selects it, anything else resolves to a ZERO handle WITHOUT issuing a lookup.