transformers - 💡(How to fix) Fix Loading checkpoint trained on v4.57 cannot be reload after upgraded to v5.2 & v5.3 [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
huggingface/transformers#44556Fetched 2026-04-08 00:27:43
View on GitHub
Comments
2
Participants
2
Timeline
4
Reactions
0
Timeline (top)
commented ×2closed ×1labeled ×1
RAW_BUFFERClick to expand / collapse

System Info

I have trained models using Qwen3 using v4.57 but the ckpt loading will hang forever after Loading weights: 100%|██████████| 708/708 [00:09<00:00, 78.04it/s] .

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

Using from_pretrained function, provided with local_path.

The program hangs there forever.

Expected behavior

The model should be able to load

extent analysis

Fix Plan

1. Update Qwen3 to the latest version

Update the Qwen3 library to the latest version (v4.58 or later) to ensure you have the latest bug fixes and improvements.

2. Check for incompatible dependencies

Verify that all dependencies are compatible with the latest Qwen3 version. You can do this by running pip freeze and checking for any outdated packages.

3. Use from_pretrained with a remote URL

Try loading the checkpoint using a remote URL instead of a local path. This can help identify if the issue is specific to local file loading.

from_pretrained("path/to/model", local_files_only=False)

4. Disable caching

Disable caching to ensure that the model is reloaded from scratch. You can do this by setting cache_dir to None.

from_pretrained("path/to/model", local_files_only=False, cache_dir=None)

5. Check for file system issues

Verify that the file system is not causing the issue. Try loading the checkpoint on a different file system or disk.

Verification

  • Try loading the checkpoint using the latest Qwen3 version and a remote URL.
  • Verify that the model loads successfully without hanging.
  • If the issue persists, try disabling caching and checking for file system issues.

Example Code

import torch
from qwen3 import AutoModelForSequenceClassification

model = AutoModelForSequenceClassification.from_pretrained(
    "path/to/model",
    local_files_only=False,
    cache_dir=None
)

Extra Tips

  • Always use the latest version of Qwen3 to ensure you have the latest bug fixes and improvements.
  • Verify that all dependencies are compatible with the latest Qwen3 version.
  • Use remote URLs instead of local paths to load checkpoints.
  • Disable caching to ensure that the model is reloaded from scratch.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The model should be able to load

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

transformers - 💡(How to fix) Fix Loading checkpoint trained on v4.57 cannot be reload after upgraded to v5.2 & v5.3 [2 comments, 2 participants]