Repository navigation
feat: add native typed decision training components - #314
Open
Liuchenbing-2026 wants to merge 2 commits into
Open
Liuchenbing-2026 wants to merge 2 commits into
Liuchenbing-2026 wants to merge 2 commits into
Conversation
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 typed-decision training and scoring through Twinkle's TransformersModel, InputProcessor, Loss, metric and PEFT interfaces. Decision outputs are probabilities over each question's legal candidates, rather than generated answers.
The components cover generic tokenizer-derived verbalizers, JEV verbalizer heads, Clef joint schema heads, OmniJev cached option branches and StartLux candidate projections. The local recipe supports soft-label cross-entropy, Brier and ordered RPS presets, explicit Open-Jev normalization, training-only augmentation, adapter/head persistence and per-question accuracy. An offline tiny checkpoint/data generator makes the training/recovery path reproducible without model downloads. Community Components entries and a cookbook describe setup and scope.
Scope is intentionally explicit: the recipe is single-device; packing and sequence/context parallelism are rejected. Clef image encoding is not included. Full JEV/Clef/OmniJev released-checkpoint numerical and visual benchmark validation is pending; the tests below do not establish those models' benchmark scores.
This branch includes the persistent-buffer checkpoint fix submitted separately in #313; it is required for complete saved-head state. AI assistance was used for implementation and tests; source attribution is retained in reused numerical modules.
Experiment results
python -m pytest tests/decision tests/transformers/test_adapter_persistent_buffers.py -q --confcutdir=tests: 30 passed.rtol=atol=1e-12on CPU.pre-commit run --all-files: passed.