Skip to content

[tml] Inkling native LoRA support - #2122

Merged
Zhichenzzz merged 1 commit into
mainfrom
zhichen/feat-lora
Aug 3, 2026
Merged

[tml] Inkling native LoRA support#2122
Zhichenzzz merged 1 commit into
mainfrom
zhichen/feat-lora

Conversation

@Zhichenzzz

Copy link
Copy Markdown
Contributor

Stacked on #1683 (Inkling model + full-parameter RL); this PR adds the LoRA layer on top.

Adapter-only GRPO on the same backend and parallel stack: per-module adapters following Inkling's released LoRA schema (attention, dense MLP, shared-outer routed experts, shared experts, lm head; r=32 all-linear by default). After each step the exporter assembles a serving-ready adapter from the distributed training state (one flat all_gather per TP/EP group + PP broadcast) and hands it to the colocated SGLang engine over CUDA IPC — the frozen base is never re-transferred (weight update 49.4s → 2.5s, train step ~85% of full-parameter). Includes --lora-train-only, warm starts via --lora-adapter-path, the launcher's --train-mode lora, and the 4-layer LoRA CI test with engine-side sha256 verification.

Validated: 4-node Inkling-Small LoRA runs with steadily rising reward and aime25 (wandb 5kb81l5d, hxrf9erh); 4-layer CI green.

https://www.lmsys.org/blog/2026-07-15-inkling-day0-support

@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.

@Zhichenzzz
Zhichenzzz changed the base branch from zhichen/feat to main August 3, 2026 20:57
Adapter-only GRPO on the same backend and parallel stack as full-parameter
training. The adapter follows Inkling's released LoRA schema (attention,
dense MLP, shared-outer routed experts, shared experts, lm head; r=32
all-linear by default), applied per-module by the plugin at model build.
After each step the exporter assembles the serving-ready adapter from the
distributed training state (one flat all_gather per TP/EP group, PP
broadcast) and hands it to the colocated SGLang engine over CUDA IPC; the
frozen base is never re-transferred. Includes --lora-train-only (train the
adapter, roll out the frozen base), warm starts from released safetensors
adapters via --lora-adapter-path, the launcher's lora train-mode, and the
4-layer LoRA CI test with engine-side sha256 verification.
@Zhichenzzz
Zhichenzzz merged commit 92ccb87 into main Aug 3, 2026
41 checks passed
@Zhichenzzz
Zhichenzzz deleted the zhichen/feat-lora branch August 3, 2026 21:15
Zhichenzzz added a commit that referenced this pull request Aug 3, 2026
Brings the Inkling model family and its native LoRA (#2122) onto the plugin
branch. Resolution notes:

- model.py keeps the generic resolve_lora_provider path; the 'inkling in
  custom_model_provider_path' special-cases are replaced by provider dispatch:
  resolve_lora_provider now routes Inkling checkpoints to
  miles_plugins.models.inkling.lora (which gains the provider-protocol
  aliases), and uses_builtin_native_lora_provider agrees with that dispatch.
- sglang_engine keeps the plugin-normalized target pathway and adopts main's
  ['all'] sentinel for Inkling plus the adapter startup-preload behavior.
- the --lora-train-only rename from main is reverted to --debug-lora-train-only
  per review; main's loadable-checkpoint guard in model.py is kept.
- lora_utils keeps the native dist-ckpt save/load; main's rank-shard renames
  applied to the pre-refactor format and are superseded.
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.

2 participants