modelscope / modelscope/ms-swift

微调Qwen3.5 27B后做推理,提示Writing model shards: 8%,然后退出

Open
#8,217 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug stale
Dominant language
Python
Stars
15.7k
Forks
1.7k
Avg merge
1d 16h
Merged PRs (30d)
136

Description

Checklist / 检查清单
  • I have searched existing issues, and this is a new bug report. / 我已经搜索过现有的 issues,确认这是一个新的 bug report。
Bug Description / Bug 描述

以下是部分输出:
The fast path is not available because one of the required library is not installed. Falling back to torch implementation. To install follow https://github.com/fla-org/flash-linear-attention#installation and https://github.com/Dao-AILab/causal-conv1d
Loading weights: 100%|███████████| 1184/1184 [01:41<00:00, 11.70it/s, Materializing param=model.visual.pos_embed.weight]
[INFO:swift] default_system: 'You are a helpful assistant.'
[INFO:swift] max_length: 262144
[INFO:swift] response_prefix: '\n'
[INFO:swift] agent_template: qwen3_5
[INFO:swift] norm_bbox: norm1000
[INFO:swift] Setting ROOT_IMAGE_DIR: None. You can adjust this hyperparameter through the environment variable: ROOT_IMAGE_DIR.
[INFO:swift] Setting QWENVL_BBOX_FORMAT: legacy. You can adjust this hyperparameter through the environment variable: QWENVL_BBOX_FORMAT.
[INFO:swift] Merge LoRA...
[INFO:swift] Saving merged weights...
[2026-03-06 10:22:46,337] [INFO] [real_accelerator.py:260:get_accelerator] Setting ds_accelerator to cuda (auto detect)
[2026-03-06 10:26:09,175] [INFO] [logging.py:107:log_dist] [Rank -1] [TorchCheckpointEngine] Initialized with serialization = False
Writing model shards: 8%|█████▏ | 1/12 [00:30<05:36, 30.63s/it]
然后就退出了

How to Reproduce / 如何复现

比较容易复现,微调完lora,执行推理就会出现

Additional Information / 补充信息

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing inference after LoRA fine-tuning and inspect the transition from “Merge LoRA...” and “Saving merged weights...” to the “Writing model shards” message. The issue names no files or tests, so collect the complete exit output and environment details before tracing the model-shard saving path; done means identifying why the process exits and confirming inference completes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.