Skip to content

Add DeepSeek V4 Flash support for ART Megatron#745

Merged
FurtherAI merged 684 commits into
mainfrom
austin/dsv4
Jul 8, 2026
Merged

Add DeepSeek V4 Flash support for ART Megatron#745
FurtherAI merged 684 commits into
mainfrom
austin/dsv4

Conversation

@FurtherAI

@FurtherAI FurtherAI commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds production DeepSeek V4 Flash support for ART Megatron, excluding context parallelism. This requires roughly 8 H200 training GPUs with streaming weight offloading enabled and 4 for inference. This can fit ~16K tokens and the trainer should run at ~4K tok/s. This is not particularly impressive MFU due to the complex kernels, but with shared prefix packing, overall this is decent.

The initial non-LoRA model implementation is adapted from Miles' DSV4 training implementation, with ART-specific integration for Megatron Bridge, model support, tokenizer behavior, validation, and rollout serving.

  • Add art.megatron.dsv4 model code, including DSV4 attention/compression/indexer components, RoPE, hyper-connection, bridge glue, and tokenizer/encoding support.
  • Add ART Megatron DSV4 model-support handler and registry integration.
  • Add DSV4 LoRA wrapping/export support for ART training.
  • Add native vLLM runtime patches for DSV4 LoRA serving.
  • Add DSV4-aware workflow resource/topology handling for large-model validation stages.
  • Extend validation coverage for DSV4 real-path correctness, routing replay, train/inference mismatch, native vLLM LoRA, and length trainability.
  • Add support for using ART vLLM launched separately or on another node (external vLLM runtime).

Notes

  • DSV4 context parallelism is intentionally not enabled in this PR. DSV4 currently runs with cp=1 in model-support topologies.
  • Native LoRA serving is the target inference path.
  • Train/inference mismatch is higher than standard bf16 models because vLLM serves DSV4 through quantized kernels while ART trains in bf16. After debugging implementation issues, the remaining gap appears consistent with vLLM quantization/runtime variance rather than LoRA export or training-path errors.
  • Observed DSV4 train/inference mismatch is roughly in the high-teens mean absolute percent range with KL around the configured DSV4 threshold, compared with much tighter metrics for non-quantized/bf16-aligned model families.

Validation

  • Full DSV4 model-support workflow passed before merging latest main.
  • After merging latest main, targeted high-risk DSV4 stages were rerun and passed:
    • final real-path correctness topology
    • length trainability

FurtherAI added 30 commits June 2, 2026 11:21
@FurtherAI FurtherAI marked this pull request as ready for review July 8, 2026 16:19
@FurtherAI FurtherAI merged commit da093e8 into main Jul 8, 2026
4 checks passed
@FurtherAI FurtherAI deleted the austin/dsv4 branch July 8, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant