-
Notifications
You must be signed in to change notification settings - Fork 333
extend modelbuilder to build Olmo3, SmolLM3 and other models #2078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Xavier Dupré (xadupre)
wants to merge
93
commits into
main
Choose a base branch
from
xadupre/mbext
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
93 commits
Select commit
Hold shift + click to select a range
43c7e8e
first commit to update modelbuilder
xadupre bd2366e
lint
xadupre fb7f0c3
dependency
xadupre b6a8cc8
fix import issues
xadupre 4306fb1
Potential fix for pull request finding 'CodeQL / Empty except'
xadupre 0518fde
fix
xadupre d6950e8
fix import issues
xadupre 19d40c2
ls
xadupre 04cfac0
Potential fix for pull request finding 'CodeQL / Signature mismatch i…
xadupre bf8f708
fix: handle None data_path in conftest, fix CodeQL signature mismatch…
Copilot 52364b4
lint
xadupre e9b5000
Update test/python/models/fast/test_random_granite.py
xadupre c0bccd4
Update test/python/models/fast/test_random_gemma.py
xadupre d41f845
Update test/python/models/fast/test_random_gemma3.py
xadupre b787806
Update .github/workflows/modelbuilder_fast_tests.yml
xadupre 5d6f67e
Update src/python/py/models/builders/base.py
xadupre 0b169f8
address review: restore formatting, fix gemma3 VLM model_type, remove…
Copilot ccee173
fix: add comment for FP16 CPU GQA exclusion, rename config var in wor…
Copilot e069371
Merge branch 'main' of https://github.com/microsoft/onnxruntime-genai…
xadupre 0a5351f
fix style
xadupre 56a4bab
Apply suggestion from @kunal-vaishnavi
xadupre 1962cd8
fix
xadupre 3db7e03
Merge branch 'xadupre/mbext' of https://github.com/microsoft/onnxrunt…
xadupre 0c71fa6
fix gqa
xadupre 960c525
rename ExtTestCase into ModelBuilderTestCase
xadupre 49997a8
fix CodeQL: remove incorrect Model inheritance from Ministral3VisionE…
Copilot 02b1186
remove unnecessary tests
xadupre 40af7a8
rename a file
xadupre 90b0d77
use gqa fir wen35
xadupre 2c5f71f
add og tests
xadupre 263033e
nemotron_h
xadupre 3681b46
Potential fix for pull request finding 'CodeQL / Potentially uninitia…
xadupre 29b111e
remove undesired changes
xadupre a691f94
fix
xadupre 7cfd93e
fix nemotron model type
xadupre 67df491
style
xadupre 3bb036c
merge
xadupre 7240182
remove transformers 4.57
xadupre c556000
zero
xadupre 7356997
Update src/python/py/models/builders/mistral.py
xadupre f5bb55e
add onnxscript
xadupre 63e622b
Merge branch 'xadupre/mbext' of https://github.com/microsoft/onnxrunt…
xadupre 2c91a48
fix
xadupre 5fdef15
fix: use os.path.join for cross-platform paths; remove unreachable co…
Copilot e918502
fix: cleanup path should use 'output' not 'output_dir' in get_dirs
Copilot c14803a
big refactoring
xadupre e6475b3
Merge branch 'xadupre/mbext' of https://github.com/microsoft/onnxrunt…
xadupre ccc8118
fixes
xadupre 799963d
fix
xadupre 60002b7
refactor: replace PvVersion class with packaging.version.Version
Copilot 2194011
fix
xadupre 7233274
style
xadupre b251a1e
style
xadupre f869a6d
fix import
xadupre a6a6dcb
crash
xadupre bc1c9ce
fix
xadupre 347b8da
fix
xadupre b3d133b
donotremove
xadupre 1ac7e60
fix
xadupre 7918593
add missing patch
xadupre fb4010c
more tests
xadupre 0ec2f77
fix
xadupre a194ffc
revert
xadupre 423ec5f
better
xadupre 15cc2b2
nemotron
xadupre 076ad4a
remove a decorator
xadupre 913dd2e
add more comments
xadupre 34bf6c3
removing unused imports
xadupre 7fd7752
remove unused imports
xadupre 012ad6d
Potential fix for pull request finding 'CodeQL / Overwriting attribut…
xadupre 4b25fbd
switch to 1.26
xadupre 0ec2843
Merge branch 'xadupre/mbext' of https://github.com/microsoft/onnxrunt…
xadupre 4ea3aaf
use transformers 5.6
xadupre 9d103cb
mistral
xadupre 84c7135
Merge branch 'main' of https://github.com/microsoft/onnxruntime-genai…
xadupre 00117a1
fix name
xadupre aa6596d
Merge branch 'main' of https://github.com/microsoft/onnxruntime-genai…
xadupre 132f1a1
Merge remote-tracking branch 'origin/main' into xadupre/mbext
Copilot 79e7fdb
remove local_functions.py and use nightly ORT in fast tests workflow
Copilot d603515
use nightly onnxruntime-genai in fast tests workflow alongside nightl…
Copilot 1a7cd8a
Merge branch 'main' into xadupre/mbext
xadupre 18109bf
fix nemotronh
xadupre c0f11e6
Initialize q/k/v path
hanbitmyths aaa7684
Merge branch 'main' of https://github.com/microsoft/onnxruntime-genai…
xadupre 76e6c7d
Merge branch 'main' of https://github.com/microsoft/onnxruntime-genai…
xadupre e4c3cad
Merge branch 'main' of https://github.com/microsoft/onnxruntime-genai…
xadupre 273d3fb
Merge branch 'main' - add LFM2 support and resolve builder.py conflict
Copilot fae7874
Merge branch 'main' of https://github.com/microsoft/onnxruntime-genai…
xadupre 8790306
Merge branch 'main' into xadupre/mbext - resolve requirements.txt con…
Copilot f977a04
Merge branch 'main' into xadupre/mbext - resolve base.py conflict
Copilot daab5e0
remove extra-index-url
xadupre 2b694c6
Merge branch 'main' into xadupre/mbext - resolve builder.py conflict …
Copilot d7b7be8
Merge branch 'main' into xadupre/mbext - resolve conflicts (add Qwen3…
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| name: Fast Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: ["main"] | ||
| pull_request: | ||
| branches: ["main"] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| tests: | ||
| name: ci (${{ matrix.os }}, py${{ matrix.python-version }}, torch-${{ matrix.torch-version || 'stable' }}, transformers-${{ matrix.transformers-version || 'latest' }}) | ||
| runs-on: ${{ matrix.os }} | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: ["ubuntu-latest"] | ||
| python-version: ["3.13"] | ||
| transformers-version: ["4.57", "5.5"] | ||
| torch-version: ["2.11"] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.13" | ||
|
xadupre marked this conversation as resolved.
Outdated
|
||
|
|
||
| # we install torch first to avoid downloading any CUDA dependency | ||
|
|
||
| - name: Install nightly pytorch (cpu) | ||
| if: matrix.torch-version == 'nightly' | ||
| run: pip install --pre --upgrade torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu | ||
|
|
||
|
xadupre marked this conversation as resolved.
|
||
| - name: Install pytorch 2.11 (Linux/Windows) | ||
| if: matrix.torch-version == '2.11' && matrix.os != 'macos-latest' | ||
| run: pip install torch==2.11.0+cpu torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu | ||
|
|
||
| - name: Install dependencies | ||
| run: pip install torch "transformers==${{ matrix.transformers-version }}" tokenizers pandas openpyxl pytest huggingface_hub onnx onnxscript optree onnxruntime onnxruntime-genai peft py-cpuinfo pytest-cov pytest-subtests tabulate | ||
|
|
||
| - name: Run fast tests | ||
| run: DOCLEAN=1 PYTHONPATH=./src/python/py pytest test/python/models/fast -v --cov=modelbuilder --cov-report=xml --cov-report=term-missing | ||
|
xadupre marked this conversation as resolved.
Outdated
xadupre marked this conversation as resolved.
Outdated
|
||
|
|
||
| # Code to upload coverage report. | ||
| # - name: Upload coverage reports to Codecov | ||
| # uses: codecov/codecov-action@v5 | ||
| # with: | ||
| # token: ${{ secrets.CODECOV_TOKEN }} | ||
| # flags: modelbuilder-fast-tests | ||
|
|
||
| - name: Upload stats artifact | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
|
xadupre marked this conversation as resolved.
|
||
| with: | ||
| name: stats-${{ matrix.os }}-py${{ matrix.python-version }}-torch${{ matrix.torch-version }}-transformers${{ matrix.transformers-version }} | ||
| path: stats/ | ||
| if-no-files-found: ignore | ||
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.