Skip to content

Commit 68ed309

Browse files
authored
fix arguments bug (#395)
1 parent d83f5a1 commit 68ed309

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

README_CN.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ torch.cuda.empty_cache()
196196
app_ui_main(infer_args)
197197
```
198198

199-
200199
### 特性
201200
- 支持的SFT方法: [lora](https://arxiv.org/abs/2106.09685), [qlora](https://arxiv.org/abs/2305.14314), [longlora](https://arxiv.org/abs/2309.12307), [qalora](https://arxiv.org/abs/2309.14717), 全参数微调, 部分参数微调.
202201
- 支持的特性: 模型量化, DDP, 模型并行, gradient checkpointing, 支持推送ModelScope Hub, 自定义数据集, 多模态和Agent SFT, 多轮对话, DPO, 自我认知微调, ...

swift/llm/utils/argument.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,8 @@ def __post_init__(self) -> None:
387387
elif not support_gradient_checkpointing and self.gradient_checkpointing:
388388
logger.warning(
389389
f'{self.model_type} not support gradient_checkpointing.')
390+
if self.neftune_noise_alpha <= 0:
391+
self.neftune_noise_alpha = None
390392

391393

392394
@dataclass
@@ -540,8 +542,6 @@ def __post_init__(self) -> None:
540542
self.stream = False
541543
logger.info('Setting self.stream: False')
542544
self.infer_media_type = template_info.get('infer_media_type', 'none')
543-
if self.neftune_noise_alpha <= 0:
544-
self.neftune_noise_alpha = None
545545

546546
@staticmethod
547547
def check_ckpt_dir_correct(ckpt_dir) -> bool:

0 commit comments

Comments
 (0)