Skip to content

Fix Mobius test-model export and llama.cpp discrepancy checks - #2623

Open
Tommaso Adani (tadani3) wants to merge 2 commits into
mainfrom
tommasoadani/mobius-bugfixes
Open

Fix Mobius test-model export and llama.cpp discrepancy checks#2623
Tommaso Adani (tadani3) wants to merge 2 commits into
mainfrom
tommasoadani/mobius-bugfixes

Conversation

@tadani3

Copy link
Copy Markdown
Contributor

Describe your changes

Fix olive run --test for workflows using MobiusBuilder.

  • Export the saved reduced test model instead of the original Hugging Face model.
  • Honor the two-layer model generated for discrepancy checks, avoiding full-model downloads and exports.
  • Materialize test weights when the test-model directory contains only configuration.
  • Raise a clear error when test_model_config is set without test_model_path.
  • Preserve the original Hugging Face model ID for normal exports.
  • Forward --test_llama_path to enable llama.cpp conversion and benchmarking.
  • Add regression tests for both fixes.

Checklist before requesting a review

  • Add unit tests for this change.
  • Make sure all tests can pass.
  • Update documents if necessary. No documentation changes required.
  • Lint and apply fixes to your code by running lintrunner -a.
  • Is this a user-facing change? If yes, give a description of this change to be included in the release notes.

Release note: Fixed olive run --test to honor reduced two-layer models used by discrepancy checks when exporting with Mobius, and to honor --test_llama_path for llama.cpp benchmarking.

(Optional) Issue link

N/A

Copilot AI lite review requested due to automatic review settings August 13, 2026 18:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 MobiusBuilder to export from the persisted test_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 run to forward --test_llama_path into 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants