Skip to content

Commit

Permalink
fix #4917
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyouga authored Jul 22, 2024
1 parent c333e2f commit 26082fc
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/llamafactory/model/patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ def patch_config(
if getattr(config, "model_type", None) == "qwen2" and is_trainable and model_args.flash_attn == "fa2":
setattr(config, "use_cache", False) # qwen2 does not support use_cache when using flash attn

if getattr(config, "model_type", None) == "chatglm":
require_version("transformers==4.41.2", "To fix: pip install transformers==4.41.2")

# deepspeed zero3 is not compatible with low_cpu_mem_usage
init_kwargs["low_cpu_mem_usage"] = model_args.low_cpu_mem_usage and (not is_deepspeed_zero3_enabled())

Expand Down

0 comments on commit 26082fc

Please sign in to comment.