Skip to content

Commit

Permalink
fix arguments bug (modelscope#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jintao-Huang authored Feb 6, 2024
1 parent d83f5a1 commit 68ed309
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ torch.cuda.empty_cache()
app_ui_main(infer_args)
```


### 特性
- 支持的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), 全参数微调, 部分参数微调.
- 支持的特性: 模型量化, DDP, 模型并行, gradient checkpointing, 支持推送ModelScope Hub, 自定义数据集, 多模态和Agent SFT, 多轮对话, DPO, 自我认知微调, ...
Expand Down
4 changes: 2 additions & 2 deletions swift/llm/utils/argument.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ def __post_init__(self) -> None:
elif not support_gradient_checkpointing and self.gradient_checkpointing:
logger.warning(
f'{self.model_type} not support gradient_checkpointing.')
if self.neftune_noise_alpha <= 0:
self.neftune_noise_alpha = None


@dataclass
Expand Down Expand Up @@ -540,8 +542,6 @@ def __post_init__(self) -> None:
self.stream = False
logger.info('Setting self.stream: False')
self.infer_media_type = template_info.get('infer_media_type', 'none')
if self.neftune_noise_alpha <= 0:
self.neftune_noise_alpha = None

@staticmethod
def check_ckpt_dir_correct(ckpt_dir) -> bool:
Expand Down

0 comments on commit 68ed309

Please sign in to comment.