nn/

directory
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2026 License: Apache-2.0

Directories

Path Synopsis
Package attn provides scaled dot-product, paged GQA, Multi-head Latent Attention (MLA), split-K decode, Gated DeltaNet, Kimi Delta Attention (KDA), tree attention, manifold-constrained hyper-connections (mHC), attention residuals, context-parallel 3D pipelines, and fused transformer layers.
Package attn provides scaled dot-product, paged GQA, Multi-head Latent Attention (MLA), split-K decode, Gated DeltaNet, Kimi Delta Attention (KDA), tree attention, manifold-constrained hyper-connections (mHC), attention residuals, context-parallel 3D pipelines, and fused transformer layers.
Package attnres implements attention over residual sources on the host and CUDA.
Package attnres implements attention over residual sources on the host and CUDA.
Package batch provides continuous token-level batch scheduling, RadixAttention prefix KV trees, and speculative batch verification cycles.
Package batch provides continuous token-level batch scheduling, RadixAttention prefix KV trees, and speculative batch verification cycles.
Package ckpt provides zero-copy SafeTensors loading, typed checkpoint tensor binding, NVIDIA ModelOpt quantized weight metadata decoding, multi-rank loading strategy chains with mutation-aware rollback, speculative draft publication gating, role-scoped shard selection, and cold-load quantization scale validation.
Package ckpt provides zero-copy SafeTensors loading, typed checkpoint tensor binding, NVIDIA ModelOpt quantized weight metadata decoding, multi-rank loading strategy chains with mutation-aware rollback, speculative draft publication gating, role-scoped shard selection, and cold-load quantization scale validation.
Package hostemu runs CUDA kernel source on the host CPU, for testing kernels where no GPU is available.
Package hostemu runs CUDA kernel source on the host CPU, for testing kernels where no GPU is available.
kv
SPDX-License-Identifier: Apache-2.0
SPDX-License-Identifier: Apache-2.0
tier
Package tier implements a three-tier asynchronous KV-cache offloader across GPU VRAM, pinned CPU RAM, and NVMe SSD storage without stalling the decode loop.
Package tier implements a three-tier asynchronous KV-cache offloader across GPU VRAM, pinned CPU RAM, and NVMe SSD storage without stalling the decode loop.
Package kvquant implements a pure-Go CPU reference for NVFP4 and MXFP4 KV-cache quantization and single-query decode attention.
Package kvquant implements a pure-Go CPU reference for NVFP4 and MXFP4 KV-cache quantization and single-query decode attention.
Package logprob records per-token log-probabilities of scored sequences and compares records from different engines or paths.
Package logprob records per-token log-probabilities of scored sequences and compares records from different engines or paths.
moe
Package moe provides Mixture-of-Experts routing, token permutation, grouped GEMM epilogues, NVFP4 expert weight streaming, Engram memory lookup, and Two-Batch Overlap (TBO) expert-parallel kernels.
Package moe provides Mixture-of-Experts routing, token permutation, grouped GEMM epilogues, NVFP4 expert weight streaming, Engram memory lookup, and Two-Batch Overlap (TBO) expert-parallel kernels.
ep
Package ep implements a single-host and loopback Mixture-of-Experts (MoE) expert-parallel router with rank-deduped all-to-all dispatch and combine, capacity-factor overflow policies, and live Expert Parallelism Load Balancer (EPLB) weight shuffling.
Package ep implements a single-host and loopback Mixture-of-Experts (MoE) expert-parallel router with rank-deduped all-to-all dispatch and combine, capacity-factor overflow policies, and live Expert Parallelism Load Balancer (EPLB) weight shuffling.
mxfp8gemm
Package mxfp8gemm multiplies MXFP8 matrices group by group, as a mixture-of-experts layer does, on the tensor cores of sm_100a and sm_103a: each group of rows of x, the tokens routed to one expert, by that expert's weights.
Package mxfp8gemm multiplies MXFP8 matrices group by group, as a mixture-of-experts layer does, on the tensor cores of sm_100a and sm_103a: each group of rows of x, the tokens routed to one expert, by that expert's weights.
Package quant provides block-scaled quantization formats, weight prepacking, and fused normalization/activation quantization CUDA kernels (Q4_0, Q8_0, Q8_1, OCP FP8 E4M3FN, MXFP8, MXFP4, NVFP4 E2M1, UE8M0, Q2_K, IQ2_XXS, U2).
Package quant provides block-scaled quantization formats, weight prepacking, and fused normalization/activation quantization CUDA kernels (Q4_0, Q8_0, Q8_1, OCP FP8 E4M3FN, MXFP8, MXFP4, NVFP4 E2M1, UE8M0, Q2_K, IQ2_XXS, U2).
calibrate
Package calibrate implements post-training NVFP4 and INT4 weight and activation calibration, NVIDIA ModelOpt safetensors export, exact float64 teacher-forced perplexity and KL-divergence evaluation, and VRAM/latency reporting.
Package calibrate implements post-training NVFP4 and INT4 weight and activation calibration, NVIDIA ModelOpt safetensors export, exact float64 teacher-forced perplexity and KL-divergence evaluation, and VRAM/latency reporting.
Package ref provides CPU float64 reference oracles, graph interpreters, differential trace accumulators, and numerical parity verifiers for neural network and tensor kernels under nvidia/x/nn and nvidia/x/ir.
Package ref provides CPU float64 reference oracles, graph interpreters, differential trace accumulators, and numerical parity verifiers for neural network and tensor kernels under nvidia/x/nn and nvidia/x/ir.
Package sample provides GPU token-sampling kernels including argmax, temperature scaling, top-k, top-p (nucleus), min-p, and Philox Gumbel-max.
Package sample provides GPU token-sampling kernels including argmax, temperature scaling, top-k, top-p (nucleus), min-p, and Philox Gumbel-max.
Package serve provides OpenAI-compatible HTTP inference serving and SGLang gRPC worker endpoints.
Package serve provides OpenAI-compatible HTTP inference serving and SGLang gRPC worker endpoints.
cert
Package cert records what has been checked about a serving image and checks the record against what is loaded.
Package cert records what has been checked about a serving image and checks the record against what is loaded.
disagg
Package disagg implements single-host disaggregated prefill and decode serving over loopback framed KV transfers.
Package disagg implements single-host disaggregated prefill and decode serving over loopback framed KV transfers.
Package shortconv implements static causal depthwise convolution over BF16 input rows on the host.
Package shortconv implements static causal depthwise convolution over BF16 input rows on the host.
Package spec provides speculative decoding verification, draft-tree mask construction, multi-token prediction (MTP) paged attention, EAGLE-3/MCTS reasoning trees, early-exit confidence probes, and adaptive flight buckets.
Package spec provides speculative decoding verification, draft-tree mask construction, multi-token prediction (MTP) paged attention, EAGLE-3/MCTS reasoning trees, early-exit confidence probes, and adaptive flight buckets.
dfly
Package dfly reads DFly2 drafter checkpoints and checks their compatibility with a paired DeepSeek V4.1 target before device execution.
Package dfly reads DFly2 drafter checkpoints and checks their compatibility with a paired DeepSeek V4.1 target before device execution.
paralleldraft
Package paralleldraft implements the model-agnostic parts of parallel ("diffusion") speculative drafters such as DFlash, DSpark and DNeo.
Package paralleldraft implements the model-agnostic parts of parallel ("diffusion") speculative drafters such as DFlash, DSpark and DNeo.
Package train provides reverse-mode autograd, optimizer state update kernels (AdamW, Muon/Newton-Schulz, RL policy updates), block/multi-GPU reductions, sparse-teacher distillation, DualPipe bidirectional schedules, activation rematerialization, and float64 finite-difference gradient checking.
Package train provides reverse-mode autograd, optimizer state update kernels (AdamW, Muon/Newton-Schulz, RL policy updates), block/multi-GPU reductions, sparse-teacher distillation, DualPipe bidirectional schedules, activation rematerialization, and float64 finite-difference gradient checking.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL