-
Notifications
You must be signed in to change notification settings - Fork 17
Adds INT2 (2-bit signed) and UINT2 (2-bit unsigned) data type #251
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
Merged
justinchuby
merged 13 commits into
onnx:main
from
vraspar:copilot/fix-issue-250-handling
Dec 16, 2025
Merged
Adds INT2 (2-bit signed) and UINT2 (2-bit unsigned) data type #251
justinchuby
merged 13 commits into
onnx:main
from
vraspar:copilot/fix-issue-250-handling
Dec 16, 2025
Conversation
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
Co-authored-by: vraspar <51386888+vraspar@users.noreply.github.com>
…them yet Co-authored-by: vraspar <51386888+vraspar@users.noreply.github.com>
Co-authored-by: vraspar <51386888+vraspar@users.noreply.github.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #251 +/- ##
==========================================
- Coverage 77.33% 77.30% -0.04%
==========================================
Files 40 40
Lines 5042 5097 +55
Branches 1009 1027 +18
==========================================
+ Hits 3899 3940 +41
- Misses 853 860 +7
- Partials 290 297 +7 ☔ View full report in Codecov by Sentry. |
justinchuby
reviewed
Nov 11, 2025
Member
|
@vraspar could you check the test errors? Thanks |
Co-authored-by: vraspar <51386888+vraspar@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
justinchuby
approved these changes
Dec 16, 2025
vraspar
commented
Dec 16, 2025
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
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.
Adds INT2 (2-bit signed) and UINT2 (2-bit unsigned) data types following ONNX spec PR #7446. These complement existing INT4/UINT4 support with similar packed representation.
Changes
Enums (
_enums.py)Packing (
_type_casting.py)pack_2bitx4()/unpack_2bitx4()for 4-values-per-byte packingCore (
_core.py)Serialization (
serde.py)Torch adapters (
tensor_adapters.py)Example
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.