cd /news/large-language-models/one-more-measured-note-for-transform… · home › topics › large-language-models › article
[ARTICLE · art-179966] src=discuss.huggingface.co ↗ pub= topic=large-language-models verified=true sentiment=· neutral

One more measured note for transformers — the torchao docs example's string form

Hugging Face shipped a fix for 19 English model documentation pages in Transformers 5.25.0 via PR #51425, resolving issue #51096, which flagged examples still calling the deprecated "int4_weight_only" string for torchao quantization. A static comparison of the documentation's Python code blocks found 19 direct calls using the old string in 5.24.1 and none in 5.25.0; the old string API remains intentionally rejected, and the replacement is TorchAoConfig(Int4WeightOnlyConfig(group_size=128)), which preserves the original group size. The verification covered documentation and source code, not a new runtime test of torchao or the 19 models.

key takeaway

Replace the rejected "int4_weight_only" string with TorchAoConfig(Int4WeightOnlyConfig(group_size=128)) to keep the original group size; the fix landed in Transformers 5.25.0 across 19 documentation pages.

read1 min views16 publishedDec 2, 2026

For this example, I was able to confirm that the documentation has been corrected in the new release:

The affected examples have been updated in Transformers 5.25.0. PR #51425 fixes the 19 English model documentation pages identified in #51096, and the change is included in the 5.25.0 release.

My static comparison of the English model documentation’s Python code blocks found 19 direct calls using the old "int4_weight_only" string in 5.24.1 and none in 5.25.0. I also checked the changes to all 19 files in the PR.

For anyone using an older copy of one of those examples, the replacement is:

from transformers import TorchAoConfig
from torchao.quantization import Int4WeightOnlyConfig

quantization_config = TorchAoConfig(
    Int4WeightOnlyConfig(group_size=128)
)

This preserves the original group size. In an otherwise compatible environment that already supports the object-based API, the snippet can be corrected locally without necessarily upgrading Transformers.

The fix is to the documentation: the old string API is still intentionally rejected. My additional verification here was of the documentation and source code, not a new runtime test of torchao or of all 19 models. The original constructor-level measurements are particularly useful because they isolate the problem before model .

For the original report, the main update is that the documentation correction has shipped in 5.25.0. The older examples can also be corrected locally in a compatible environment, and any subsequent backend or model-specific failure can be investigated separately.

── more in #large-language-models 4 stories · sorted by recency
── more on @hugging face 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/one-more-measured-no…] indexed:0 read:1min 2026-12-02 · —