From 31258f00d0a57c4927a323219ccf4d86aba04844 Mon Sep 17 00:00:00 2001 From: Jintao Huang Date: Mon, 17 Nov 2025 11:30:58 +0800 Subject: [PATCH 1/2] update peft version --- README.md | 2 +- README_CN.md | 2 +- docs/source/GetStarted/SWIFT-installation.md | 2 +- docs/source/Megatron-SWIFT/Quick-start.md | 2 +- docs/source_en/GetStarted/SWIFT-installation.md | 2 +- docs/source_en/Megatron-SWIFT/Quick-start.md | 2 +- requirements/framework.txt | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 455ff142d3..5f909279b2 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ Running Environment: | torch | >=2.0 | 2.8.0 | | | transformers | >=4.33 | 4.57.1 | | | modelscope | >=1.23 | | | -| peft | >=0.11,<0.18 | | | +| peft | >=0.11,<0.19 | | | | flash_attn | | 2.8.1/3.0.0b1 | | | trl | >=0.15,<0.25 | 0.23.1 | RLHF | | deepspeed | >=0.14 | 0.17.6 | Training | diff --git a/README_CN.md b/README_CN.md index 08a7f1b93d..7706c5b780 100644 --- a/README_CN.md +++ b/README_CN.md @@ -130,7 +130,7 @@ pip install -e . | torch | >=2.0 | 2.8.0 | | | transformers | >=4.33 | 4.57.1 | | | modelscope | >=1.23 | | | -| peft | >=0.11,<0.18 | | | +| peft | >=0.11,<0.19 | | | | flash_attn | | 2.8.1/3.0.0b1 | | | trl | >=0.15,<0.25 | 0.23.1 | RLHF | | deepspeed | >=0.14 | 0.17.6 | 训练 | diff --git a/docs/source/GetStarted/SWIFT-installation.md b/docs/source/GetStarted/SWIFT-installation.md index c19bf42334..82a7fe69d6 100644 --- a/docs/source/GetStarted/SWIFT-installation.md +++ b/docs/source/GetStarted/SWIFT-installation.md @@ -106,7 +106,7 @@ modelscope-registry.us-west-1.cr.aliyuncs.com/modelscope-repo/modelscope:ubuntu2 | torch | >=2.0 | 2.8.0 | | | transformers | >=4.33 | 4.57.1 | | | modelscope | >=1.23 | | | -| peft | >=0.11,<0.18 | | | +| peft | >=0.11,<0.19 | | | | flash_attn | | 2.8.1/3.0.0b1 | | | trl | >=0.15,<0.25 | 0.23.1 | RLHF | | deepspeed | >=0.14 | 0.17.6 | 训练 | diff --git a/docs/source/Megatron-SWIFT/Quick-start.md b/docs/source/Megatron-SWIFT/Quick-start.md index faff26ecec..0b7230b8e7 100644 --- a/docs/source/Megatron-SWIFT/Quick-start.md +++ b/docs/source/Megatron-SWIFT/Quick-start.md @@ -71,7 +71,7 @@ modelscope-registry.us-west-1.cr.aliyuncs.com/modelscope-repo/modelscope:ubuntu2 | flash_attn | | 2.8.1/3.0.0b1 | | | transformers | >=4.33 | 4.57.1 | | | modelscope | >=1.23 | | | -| peft | >=0.11,<0.18 | | LoRA | +| peft | >=0.11,<0.19 | | LoRA | | trl | >=0.15,<0.25 | | RLHF | diff --git a/docs/source_en/GetStarted/SWIFT-installation.md b/docs/source_en/GetStarted/SWIFT-installation.md index da512f4f84..6ed4f4e289 100644 --- a/docs/source_en/GetStarted/SWIFT-installation.md +++ b/docs/source_en/GetStarted/SWIFT-installation.md @@ -107,7 +107,7 @@ More images can be found [here](https://modelscope.cn/docs/intro/environment-set | torch | >=2.0 | 2.8.0 | | | transformers | >=4.33 | 4.57.1 | | | modelscope | >=1.23 | | | -| peft | >=0.11,<0.18 | | | +| peft | >=0.11,<0.19 | | | | flash_attn | | 2.8.1 /3.0.0b1 | | | trl | >=0.15,<0.25 | 0.23.1 | RLHF | | deepspeed | >=0.14 | 0.17.6 | Training | diff --git a/docs/source_en/Megatron-SWIFT/Quick-start.md b/docs/source_en/Megatron-SWIFT/Quick-start.md index 94123c8c4e..287366bf12 100644 --- a/docs/source_en/Megatron-SWIFT/Quick-start.md +++ b/docs/source_en/Megatron-SWIFT/Quick-start.md @@ -71,7 +71,7 @@ Recommended Operating Environment: | flash_attn | | 2.8.1/3.0.0b1 | | | transformers | >=4.33 | 4.57.1 | | | modelscope | >=1.23 | | | -| peft | >=0.11,<0.18 | | LoRA | +| peft | >=0.11,<0.19 | | LoRA | | trl | >=0.15,<0.25 | | RLHF | diff --git a/requirements/framework.txt b/requirements/framework.txt index 61c7f1cddd..fbe52b3f12 100644 --- a/requirements/framework.txt +++ b/requirements/framework.txt @@ -21,7 +21,7 @@ omegaconf openai oss2 pandas -peft>=0.11,<0.18 +peft>=0.11,<0.19 pillow PyYAML>=5.4 requests From f9f82312b157c0a5f56f004ba4ef47d740361c10 Mon Sep 17 00:00:00 2001 From: Jintao Huang Date: Mon, 17 Nov 2025 14:42:58 +0800 Subject: [PATCH 2/2] fix multinode write_conflict mcore_bridge --- swift/megatron/model/gpt_bridge.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swift/megatron/model/gpt_bridge.py b/swift/megatron/model/gpt_bridge.py index b86c16e188..40aff04568 100644 --- a/swift/megatron/model/gpt_bridge.py +++ b/swift/megatron/model/gpt_bridge.py @@ -14,7 +14,7 @@ from transformers.modeling_utils import custom_object_save from swift.llm import deep_getattr, get_model_tokenizer, safe_snapshot_download, save_checkpoint -from swift.utils import disable_safe_ddp_context_use_barrier, get_logger, is_last_rank +from swift.utils import get_logger, is_last_rank from ..tuners import LoraParallelLinear from ..utils import SafetensorLazyLoader, StreamingSafetensorSaver @@ -65,7 +65,7 @@ def __init__(self, disable_tqmd: bool = False): self.ep_rank = mpu.get_expert_model_parallel_rank() def _init_meta_hf_model(self): - with torch.device('meta'), disable_safe_ddp_context_use_barrier(): + with torch.device('meta'): self.hf_model, self.processor = get_model_tokenizer( self.args.model_dir, model_type=self.args.hf_model_type, return_dummy_model=True)