Skip to content

[dev] Megatron Lite (1/4): shared primitive core - #5424

Closed
ISEEKYAN wants to merge 1 commit into
NVIDIA:devfrom
ISEEKYAN:dev-mlite-1-prim-core
Closed

[dev] Megatron Lite (1/4): shared primitive core#5424
ISEEKYAN wants to merge 1 commit into
NVIDIA:devfrom
ISEEKYAN:dev-mlite-1-prim-core

Conversation

@ISEEKYAN

Copy link
Copy Markdown
Contributor

Summary

First of a 4-PR foundation series that extends the experimental/lite (Megatron Lite) stack on dev. This PR lands the shared primitive core that the rest of the series — and the Lite model implementations that follow — build on.

What's included

  • Primitive package: primitive/utils/ (packaged from utils.py, plus rotary/rope/packed_seq/moe helpers), primitive/modules/ (dispatcher, experts, router, moe, mrope, mtp, gqa, gated_delta_net, mlp), primitive/parallel/ (cp, thd, pp, pipeline, state), primitive/optimizers/fsdp2, primitive/ckpt/ (dcp, distckpt), and bundle/data/train_step.
  • Runtime contracts (runtime/contracts/: config, data, loss) — the model-agnostic config/data/loss contracts the primitive layer depends on.
  • Foundation kernel shims used directly by primitives: primitive/kernels/{__init__, swiglu, jit}.
  • model/protocol_utils.py shared scaffolding, plus the corresponding primitive unit/smoke tests.

Series

Megatron Lite foundation (4 PRs), merged in order:

  • 1/4 shared primitive core ← this PR
  • 2/4 runtime layering guard (variable-leakage governance)
  • 3/4 fused kernels
  • 4/4 shared attention primitives

Model additions (Kimi K2 / GLM5 / DeepSeek-V4) follow as separate PRs on top of this foundation.

@copy-pr-bot

copy-pr-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ISEEKYAN
ISEEKYAN marked this pull request as ready for review June 24, 2026 14:29
@ISEEKYAN
ISEEKYAN requested review from a team as code owners June 24, 2026 14:29
Signed-off-by: Yan Bai <bayan@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants