Skip to content

chore(typing): Add type checking to src/transformers/quantizers#44412

Merged
tarekziade merged 43 commits intomainfrom
tarekziade-typing-quantizers
Mar 11, 2026
Merged

chore(typing): Add type checking to src/transformers/quantizers#44412
tarekziade merged 43 commits intomainfrom
tarekziade-typing-quantizers

Conversation

@tarekziade
Copy link
Copy Markdown
Collaborator

@tarekziade tarekziade commented Mar 3, 2026

What does this PR do?

Extends type checking to src/transformers/quantizers

@tarekziade tarekziade force-pushed the tarekziade-typing-quantizers branch from 7f3d268 to 8049911 Compare March 3, 2026 14:55
@tarekziade tarekziade changed the title chore(typing): Add type checking to src/transformers/generation chore(typing): Add type checking to src/transformers/quantizers Mar 3, 2026
@tarekziade
Copy link
Copy Markdown
Collaborator Author

Based on the #44233 branch

@tarekziade tarekziade self-assigned this Mar 3, 2026
@tarekziade tarekziade force-pushed the tarekziade-typing-quantizers branch 2 times, most recently from 87ac38b to ea21220 Compare March 5, 2026 17:45


MIN_GPTQ_VERSION = "1.4.3"
MIN_OPTIMUM_VERSION = "1.24.0"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

using cleaner constants, also not sure why we had 1.24.0 and 1.23.99 checks so I cleaned it up after checking optimum releases that exist

@tarekziade tarekziade requested a review from vasqu March 5, 2026 18:39
Copy link
Copy Markdown
Contributor

@vasqu vasqu left a comment

Choose a reason for hiding this comment

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

Just some smaller stuff, noticed one inconsistency

cc @SunMarc if you also have time to take a quick look

Comment thread src/transformers/utils/import_utils.py Outdated
Comment thread src/transformers/quantizers/quantizer_aqlm.py Outdated
Comment thread src/transformers/quantizers/quantizer_bnb_4bit.py Outdated
Comment thread src/transformers/quantizers/quantizer_bnb_8bit.py Outdated
Comment thread src/transformers/quantizers/quantizer_torchao.py Outdated
Comment thread src/transformers/quantizers/quantizer_torchao.py Outdated
@tarekziade tarekziade force-pushed the tarekziade-typing-quantizers branch 2 times, most recently from 5714a08 to b202c77 Compare March 6, 2026 15:35
@tarekziade tarekziade requested a review from vasqu March 6, 2026 15:43
@tarekziade tarekziade force-pushed the tarekziade-typing-quantizers branch from dbe048c to ee5781d Compare March 9, 2026 11:15
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Copy Markdown
Contributor

@vasqu vasqu left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for iterating. Would be nice if you could take a look at the aqlm test or at least check if it was indeed broken before

Comment thread src/transformers/quantizers/quantizer_aqlm.py
Comment thread src/transformers/quantizers/quantizer_bnb_4bit.py Outdated
@tarekziade tarekziade force-pushed the tarekziade-typing-quantizers branch from 9cbadfa to 7e6c53f Compare March 10, 2026 10:20
@tarekziade
Copy link
Copy Markdown
Collaborator Author

run-slow: fbgemm_fp8, finegrained_fp8, gptq, higgs, hqq, metal, mxfp4, sinq

@github-actions
Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs:

models: []
quantizations: ["quantization/fbgemm_fp8", "quantization/finegrained_fp8", "quantization/gptq", "quantization/higgs", "quantization/hqq", "quantization/metal", "quantization/mxfp4", "quantization/sinq"]

@github-actions
Copy link
Copy Markdown
Contributor

CI Results

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 167c0a3a workflow commit (merge commit)
PR 7e6c53f4 branch commit (from PR)
main 5a098a1e base commit (on main)

⚠️ Quantization CI failed to report results

The test failure analysis could not be completed. Please check the workflow run for details.

@tarekziade
Copy link
Copy Markdown
Collaborator Author

run-slow: aqlm

Comment thread src/transformers/quantizers/quantizer_bnb_4bit.py Outdated
@tarekziade
Copy link
Copy Markdown
Collaborator Author

run-slow: fbgemm_fp8, finegrained_fp8, gptq, higgs, hqq, metal, mxfp4, sinq

@github-actions
Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs:

models: []
quantizations: ["quantization/fbgemm_fp8", "quantization/finegrained_fp8", "quantization/gptq", "quantization/higgs", "quantization/hqq", "quantization/metal", "quantization/mxfp4", "quantization/sinq"]

@github-actions
Copy link
Copy Markdown
Contributor

CI Results

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN e9ad717f workflow commit (merge commit)
PR dacbfde5 branch commit (from PR)
main 1cbb9c2e base commit (on main)

⚠️ Quantization CI failed to report results

The test failure analysis could not be completed. Please check the workflow run for details.

@tarekziade
Copy link
Copy Markdown
Collaborator Author

run-slow: aqlm_integration

@github-actions
Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs:

models: []
quantizations: ["quantization/aqlm_integration"]

@tarekziade
Copy link
Copy Markdown
Collaborator Author

run-slow: fbgemm_fp8, finegrained_fp8, gptq, higgs, hqq, metal, mxfp4, sinq

@github-actions
Copy link
Copy Markdown
Contributor

CI Results

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN e9ad717f workflow commit (merge commit)
PR dacbfde5 branch commit (from PR)
main 1cbb9c2e base commit (on main)

⚠️ No test being reported (jobs are skipped or cancelled)!

@github-actions
Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs:

models: []
quantizations: ["quantization/fbgemm_fp8", "quantization/finegrained_fp8", "quantization/gptq", "quantization/higgs", "quantization/hqq", "quantization/metal", "quantization/mxfp4", "quantization/sinq"]

@tarekziade tarekziade force-pushed the tarekziade-typing-quantizers branch from ce0ca96 to d29ec94 Compare March 11, 2026 07:33
@tarekziade
Copy link
Copy Markdown
Collaborator Author

run-slow: fbgemm_fp8, finegrained_fp8, gptq, higgs, hqq, metal, mxfp4, sinq

@github-actions
Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: fbgemm_fp8, finegrained_fp8, gptq, higgs, hqq, metal, mxfp4, sinq

@tarekziade
Copy link
Copy Markdown
Collaborator Author

run-slow: fbgemm_fp8, finegrained_fp8, gptq, higgs, hqq, metal, mxfp4, sinq

@github-actions
Copy link
Copy Markdown
Contributor

Workflow Run ⚙️💔 This comment contains run-slow, but unknown error occurred and the workflow run aborted!

@github-actions
Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs:

models: []
quantizations: ["quantization/fbgemm_fp8", "quantization/finegrained_fp8", "quantization/gptq", "quantization/higgs", "quantization/hqq", "quantization/metal", "quantization/mxfp4", "quantization/sinq"]

@github-actions
Copy link
Copy Markdown
Contributor

CI Results

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 2cc9a71c workflow commit (merge commit)
PR 331b3687 branch commit (from PR)
main 42ff4f32 base commit (on main)

✅ No failing test specific to this PR 🎉 👏 !

@tarekziade tarekziade added this pull request to the merge queue Mar 11, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 11, 2026
@tarekziade tarekziade added this pull request to the merge queue Mar 11, 2026
Merged via the queue into main with commit 8464284 Mar 11, 2026
30 checks passed
@tarekziade tarekziade deleted the tarekziade-typing-quantizers branch March 11, 2026 08:32
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.

5 participants