Open-source NVFP4/MXFP8 expert kernels for Inkling 2 Small on 8x B300, batch invariant

#15
by Jr23xd23 - opened

Hi, thanks for releasing Inkling 2 Small in its native NVFP4.

We wrote CUDA kernels that run the checkpoint as trained on NVIDIA B300: the NVFP4 experts of layers 0 to 39 on Blackwell's block-scaled FP4 tensor cores, and the MXFP8 experts of layers 40 to 47 on the FP8 ones. Everything is Apache 2.0.

Repo: https://github.com/RightNow-AI/inkling-b300-kernels
Write-up: https://www.rightnowai.co/blog/bit-identical-fp4-moe-kernels-on-blackwell

Results on 8 B300 GPUs, checkpoint revision 885d78bf:

  • Batch invariance holds. The same prompts at 64 rows per step and 1 row per step give identical logits, 0 of 599 rows differ.
  • NVFP4 experts are sharded across all 8 GPUs with an exact row-max exchange, so the activation quantizer still matches the reference bit for bit
  • The w13 expert GEMM at one token is 5.1x faster on NVFP4 and 7.5x on MXFP8 than our own first kernel, with the same bits.
  • Mean next-token log-prob difference from vLLM nightly at TP 8 is 0.025 nats (0.13 at p95)

Sharing in case it is useful to others serving this model:)

Sign up or log in to comment