Skip to content

feat: add Tinker-compatible training API - #2007

Open
yushengsu-thu wants to merge 1 commit into
radixark:mainfrom
yushengsu-thu:codex/tinker-api
Open

feat: add Tinker-compatible training API#2007
yushengsu-thu wants to merge 1 commit into
radixark:mainfrom
yushengsu-thu:codex/tinker-api

Conversation

@yushengsu-thu

Copy link
Copy Markdown
Collaborator

Summary

  • add a self-hosted data plane compatible with the official Tinker SDK ServiceClient, TrainingClient, and SamplingClient routes
  • back forward/backward, optimizer steps, exact training-state checkpoints, and retained gradients with Megatron multi-LoRA
  • expose immutable named and ephemeral SGLang LoRA sampling snapshots, base-model sampling, auth, readiness, docs, and a runnable SDK smoke test

Compatibility

  • supports encoded-text LoRA training, CE/importance-sampling/PPO/CISPO/DRO/custom losses, top-k logprobs, Adam, module groups, seeds, unload, telemetry, and weights info
  • supports DP and TP; validates and rejects unsupported PP, CP, BSHD, colocation, full fine-tuning, and non-LoRA modes at startup
  • implements the official SDK core data plane, not hosted account/project/billing/admin control-plane APIs

Validation

  • pytest -q tests/fast: 4081 passed, 22 skipped; one Ray dashboard test collided with an already-running external Ray cluster and passed in isolation after stopping that cluster
  • targeted final regression suite: 96 passed
  • official Tinker SDK 0.24.0 end-to-end smoke passed with DP=2 and TP=2, including exact optimizer/retained-gradient restore and all sampling modes
  • Ruff format/lint, compileall, shell syntax, docs JSON, and git diff --check passed

Tested dependency heads

  • Miles main: 2cb59235176a170480765e762e85a952e6ba72b7
  • SGLang sglang-miles: 3003d70f680d41c59d1b7acbf65cb47795dfd19e
  • Megatron-Bridge bridge: 7f0fb3456f8ffe47599b5fd167b454605d85f932

Copilot AI review requested due to automatic review settings July 30, 2026 16:37
@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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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