Repository navigation
feat: add Intern-Decision text training cookbook on Ascend - #295
Draft
Liuchenbing-2026 wants to merge 5 commits into
Draft
Liuchenbing-2026 wants to merge 5 commits into
Liuchenbing-2026 wants to merge 5 commits into
Conversation
Signed-off-by: liuchenbing <chenliumail@163.com>
Signed-off-by: liuchenbing <chenliumail@163.com>
Signed-off-by: liuchenbing <chenliumail@163.com>
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.
PR type
PR information
Add a text-only Qwen3.5-4B Intern-Decision training cookbook for four Ascend NPUs. Joint questions use a complete JSON skeleton and
<decision>markers; answer tokens appear only in labels. Unlike HF causal loss, Twinkle's external cross-entropy does not shift labels, so this adapter shifts supervision exactly once during encoding.The cookbook contains a decision processor that selects supervised output positions while retaining full-vocabulary cross-entropy, deterministic case-level preparation, frozen-vision/full-language training, validation accounting, and save/reload checks. FSDP2 optimizer state is saved with PyTorch distributed checkpointing; resharding before export preserves optimizer parameter identities. The final model is saved before validation so a later validation error does not discard completed training.
The cookbook is listed in Community Components and uses the existing TransformersModel/InputProcessor APIs rather than adding a duplicate Qwen architecture. Repository-wide dependencies are unchanged: the earlier NumPy lower-bound relaxation has been removed. Historical device validation used NumPy 1.26.4 through an explicit no-deps install, outside the upstream NumPy >=2.0 requirement; a dependency-compliant NPU run remains pending. The guide distinguishes that limitation, and launch paths/device assignment are configurable.
No datasets, weights, private machine details or raw predictions are committed. Public Typed Decisions cases are split independently for training, validation and calibration; the test split is not used for training or selection. This is an Intern-Decision method reproduction, not StartLux training or a reproduction of the unpublished original training corpus. AI assistance was used in implementation, testing and documentation.
Experiment results
Checks on the PR source:
rtol=atol=1e-12.Historical four-NPU validation at
6e4a8bc3acec1323f7e7ba5bb0935263800876e0: short training, optimizer-state resume, 120-step training, final model reload and seven-suite evaluation completed. Optimizer moments and step restoration were checked exactly in a separate four-rank test. The trained model remained below the official aggregate quality target; final metrics and raw predictions remain local.Keep this PR draft pending upstream CI/review and device validation of the final PR head. Full training was not repeated for this submission. Images, sequence parallelism, cross-example packing and 35B training are outside the validated scope.