[feat] Add model stability measurement (EA, CA, IV, CR) for k-samples mode #997
+172
−3
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
This PR adds model stability measurement capabilities to
lmms-eval, enabling users to assess model consistency by running multiple samples per question.Motivation
Same accuracy does not mean same reliability:
Model A and B have the same Expected Accuracy, but Model A is 3× more stable (lower IV).
Changes
New CLI Parameter
lmms-eval --model xxx --tasks xxx -n 5 # or --num_samples 5When
n > 1, enables k-samples mode and computes stability metrics.New Metrics
Example Output
Files Changed
lmms_eval/api/metrics.pyexpected_accuracy,consensus_accuracy,internal_variance,consistency_ratefunctionslmms_eval/evaluator_utils.pycalculate_stability_metrics()methodlmms_eval/evaluator.pynum_samples > 1, call stability calculationlmms_eval/__main__.py-n/--num_samplesCLI parameterlmms_eval/utils.pyTest Results
--num_samples 3on VideoMMEcicdtest