Fix Mobius test-model export and llama.cpp discrepancy checks - #2623
Open
Tommaso Adani (tadani3) wants to merge 2 commits into
Open
Fix Mobius test-model export and llama.cpp discrepancy checks#2623Tommaso Adani (tadani3) wants to merge 2 commits into
Tommaso Adani (tadani3) wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes olive run --test workflows that export models with MobiusBuilder by ensuring the export path honors the reduced “test model” directory (including the two-layer model used for discrepancy checks) and by wiring --test_llama_path through so llama.cpp benchmarking/conversion can be enabled in test runs.
Changes:
- Updated
MobiusBuilderto export from the persistedtest_model_path(and materialize missing test weights when the directory is config-only), while preserving the original Hugging Face model ID for normal exports. - Updated
olive runto forward--test_llama_pathinto discrepancy-check pass injection. - Added regression tests covering Mobius test-model export behavior and CLI forwarding of llama.cpp settings.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/passes/onnx/test_mobius_model_builder.py | Adds regression tests ensuring Mobius uses the saved test-model directory, materializes missing weights, and errors when misconfigured. |
| test/cli/test_cli.py | Extends CLI test coverage to assert --test_llama_path is forwarded into injected passes/config. |
| olive/passes/onnx/mobius_model_builder.py | Switches Mobius export to use the reduced test-model directory when test_model_config is active, with validation and weight materialization. |
| olive/cli/run.py | For olive run --test, forwards --test_llama_path to add_discrepancy_check_pass. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Describe your changes
Fix
olive run --testfor workflows usingMobiusBuilder.test_model_configis set withouttest_model_path.--test_llama_pathto enable llama.cpp conversion and benchmarking.Checklist before requesting a review
lintrunner -a.Release note: Fixed
olive run --testto honor reduced two-layer models used by discrepancy checks when exporting with Mobius, and to honor--test_llama_pathfor llama.cpp benchmarking.(Optional) Issue link
N/A