You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Validate aligned inputs and answer types in the public mapper
src/mobius/models/decision.py:811
This public answer mapper does not validate its aligned inputs: unequal lengths are silently truncated by zip, extra probabilities can index past keys, an empty choice reaches max() on an empty range, and an unknown type falls through as a score. Add the same non-empty/equal-length and type validation used by clm_answer, plus the two-value invariant for noul.
Validate components against merged model roles
src/mobius/tasks/_base.py:334
Validation reads only components.roles(), while __init_subclass__ explicitly merges subclass model_roles. A task using plain component paths plus explicit roles therefore still fails here; in a mixed spec, an unclassified extra component can instead pass the count check, get built, and default to decoder optimization. Validate all component names against the merged self.model_roles so both supported declaration styles enforce the same invariant.
Fail parity validation for incomplete explicitly configured exports
tests/kev_parity_test.py:325
Once MOBIUS_DECISION_EXPORT_ROOT is explicitly set, an incomplete package should fail this parity test rather than skip it. As written, a broken export reports only a skip, so the opt-in validation can appear clean without exercising either exported graph.
Unlike clm_answer, this public mapper does not validate key/probability cardinality. A short noul distribution raises IndexError, while mismatched choice inputs can truncate the returned distribution or index past keys. Reject mismatched/empty inputs and require exactly two noul probabilities.
Provenance marks mutable revisions as reproducible
src/mobius/models/decision.py:1062
Any nonblank value, including a movable branch such as main, is stamped with reproducible=true by ModelProvenance.as_metadata(). This contradicts the documented <sha> contract and can make an export impossible to reproduce later. Require and normalize an immutable 40-hex revision before stamping it.
Head mapping can overwrite validated base checkpoint weights
src/mobius/models/decision.py:1086
map_clm_checkpoint() also accepts top-level encoder.* and flattened head tensors, and this update runs after the separately supplied base mapping. Consequently, an otherwise valid head checkpoint can silently override base weights or the validated nested head tensors. Restrict this production path to the fields validated by validate_clm_checkpoint().
Head mapper imports unvalidated backbone tensors
src/mobius/models/decision.py:1138
map_kev_checkpoint() imports top-level backbone.*/model.* tensors as well as the validated pointer head. Because this update follows the merged-base mapping, such entries in head_checkpoint silently replace the caller's merged base. Limit the production helper to the validated head state dict.
build() ignores overridden model_roles
src/mobius/tasks/_base.py:327
__init_subclass__ merges an explicit model_roles override into the derived role map, but build() ignores that map and re-reads only roles embedded in ComponentConfig. A subclass using plain component paths plus model_roles is therefore rejected, and an explicit role override can disagree with the role used for validation. Use the derived self.model_roles values for the declared component names here.
The claimed FP16/BF16 grouped-softmax regression is not exercised: both parity fixtures build FLOAT graphs, and the reduced-precision unit test only inspects projection-head casts. Add FLOAT16 and BFLOAT16 scorer/pointer coverage with nontrivial groups, asserting finite outputs and per-group sums of one, so mask/sentinel/Exp dtype regressions cannot pass CI.
@xiaoyu-work Can you take a look? I think there might be some overlapping work here that you already done (multi-component)?
This branch has not been deployed
No deployments
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
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
Add generic multi-component model packaging to Mobius and implement model-specific export support for CLM-v0.1-8B and KEV-4B.
Changes
Commits
b9c45ca6Add multi-component decision model exportse619d3baTest and document decision model packages89e98d5cHarden CLM and KEV export contractsValidation
Notes