Repository navigation
Conversation
- Fixed-chain speculator base with EAGLE3 and Qwen3.5 MTP draft models, target-native speculation, and method-keyed draft weight registry - Block speculative verification: paged CuTe verification attention, SM90 GDR verify and commit kernels with persistent pipelining - Unified parameterized batch-op pipeline; executor forward split into target pass and speculative round; host batch ops moved engine-side - Scheduler: unified required admission, simplified rollback, submitted rows carry producer-set effects instead of a kind tag - Op-level pytest suites: verification attention, draft carry, speculative sampling, speculative sequence, target hidden projection, copy
bltcn
added a commit
to bltcn/lmdeploy
that referenced
this pull request
Oct 3, 2026
…ixes Inherited CI blockers from InternLM#5006 (this PR is stacked on it): - unit_test (exit 2, collection error): 3 top-level 'import _turbomind' fail under CI 'pip install -e .' because the bare module name is not on sys.path. Switch to 'from lmdeploy.turbomind import _tm' (canonical, matches test_linear.py) and function-level imports to the package name. - lint (ruff): F841 dead var, F401 unused imports, I001 import sorting. Verified in CI-matched env (0.18.0 + cu12.8 + built _tm.so + torch): 308 tests collected, 0 collection errors (was 213 collected, 2 errors).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds speculative decoding to the TurboMind backend, built on a new fixed-chain speculator framework with two draft methods:
mtp— Qwen3.5 MTP draft layers, weights read directly from the target checkpointeagle3— Qwen3 EAGLE3 with a sidecar draft model; added to bootstrap the MTP integration, not optimized for performance (linear chain verification only, no tree verification)What's included
Draft model framework (
src/turbomind/models/speculative/)eagle3/: EAGLE3 draft model, weight mapping, and target hidden-state projection with dedicated kernels — serves as the integration vehicle for the speculative pipeline rather than a performance-optimized path; verification is linear-chain only, no tree verificationqwen3_5_mtp/: Qwen3.5 MTP draft model, weights, and target final-hidden extractionVerification path
generation/target_verification)kernels/attention/verification/): SM80 path, SM90 WGMMA pipelines, paged KV, and cross-CTA reduceEngine and scheduler refactor
Model(formerlyBatchComponents) owns target, vision, and speculative modelssrc/turbomind/engine/README.mdPython surface (
lmdeploy/)spec_decode.pymethod registry plusqwen3_5_mtp/qwen3_eagle3model and weight builders, wired throughspeculative_configTests
scripts/test_turbomind_model.pyextended for speculative smoke testingUsage