Skip to content

feat: add Kimi K3 DSpark disaggregated reproduction - #735

Draft
maocheng23 wants to merge 18 commits into
sgl-project:mainfrom
maocheng23:agent/kimi-k3-dspark-disaggregated-recipe
Draft

feat: add Kimi K3 DSpark disaggregated reproduction#735
maocheng23 wants to merge 18 commits into
sgl-project:mainfrom
maocheng23:agent/kimi-k3-dspark-disaggregated-recipe

Conversation

@maocheng23

Copy link
Copy Markdown
Collaborator

Motivation

Migrate the prior four-node colocated Kimi K3 V1C continual DSpark run to current SpecForge as a two-node disaggregated job: one TP8 capture server plus one four-rank FSDP trainer.

The recipe preserves the observable training contract: five auxiliary layers, weights-only warm start, regenerated prompt order, effective global batch 128, constant LR, DSpark loss weights, 64K context, and checkpoint semantics.

Modifications

  • Add configurable LR schedules, including the constant schedule required by the reproduced run, with checkpoint compatibility tests.
  • Add an independent prompt_seed so online prompt order is reproducible without coupling it to model/trainer RNG.
  • Add dedicated DSpark server capture wiring and a versioned SGLang patch with Mooncake metadata transport.
  • Validate the full K3 patch against the current public K3 SGLang branch tip 9acd9cba39f522da71c6d9b9695f2ceb41d36b18; retain the older target name as a compatibility alias.
  • Carry the K3-specific 64K correctness guards: int64 token offsets, scale-stable residual scoring, and the old-fork Marlin grid.y fallback.
  • Add the typed Kimi K3 V1C config and an executable two-node disaggregated recipe, including routable Mooncake bind settings, five-minute leases, watermarks, and a one-update smoke procedure.

Upstream SGLang main currently has no kimi_k3.py; this recipe therefore targets the latest public K3 serving branch rather than claiming upstream-main K3 support.

Related Issues

N/A

Accuracy Test

Completed:

  • 94 targeted unit/integration tests: PASS.
  • Repository pre-commit suite: PASS.
  • K3 SGLang patch git apply --check against 9acd9cb: PASS.
  • RunPod trainer-side config plan: PASS (one producer + four FSDP consumers).
  • Prepared data verification: 4 smoke rows and 462 full rows; full-data SHA-256 6d50e6bb9ee59095eed91bfba035081efef9fea43bece9ad5dd01c6648a8ef24.

Pending before marking ready:

  • TP8 64K capture -> Mooncake -> four-rank finite optimizer update -> checkpoint E2E smoke.
  • Full-run loss/accuracy/tau trajectory comparison with the prior V1C run.

Benchmark & Profiling

No performance claim yet. Throughput and numerical-parity evidence will be added after the RunPod E2E gate.

Checklist

  • Format code with the repository pre-commit configuration.
  • Add unit tests for scheduler, prompt ordering, capture contracts, topology, and model loading.
  • Update documentation and add a complete example recipe.
  • Add RunPod E2E accuracy and throughput evidence before requesting final review.
  • No credentials are stored in config or documentation.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

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