mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-03 04:02:49 +08:00
Merge pull request #3276 from liu-zichen/fix_mixtral
fix: turn on output_router_logits of mixtral Former-commit-id: 0e0942d388bdb0122001a7f8e081315059d5d327
This commit is contained in:
commit
1bdf7e4b9d
@ -316,7 +316,7 @@ def patch_config(
|
|||||||
if getattr(config, "model_type", None) == "qwen2" and is_trainable and model_args.flash_attn:
|
if getattr(config, "model_type", None) == "qwen2" and is_trainable and model_args.flash_attn:
|
||||||
setattr(config, "use_cache", False) # qwen2 does not support use_cache when using flashattn
|
setattr(config, "use_cache", False) # qwen2 does not support use_cache when using flashattn
|
||||||
|
|
||||||
if getattr(config, "model_type", None) == "qwen2_moe" and is_trainable:
|
if getattr(config, "model_type", None) in ["mixtral", "qwen2_moe"] and is_trainable:
|
||||||
setattr(config, "output_router_logits", True)
|
setattr(config, "output_router_logits", True)
|
||||||
|
|
||||||
init_kwargs["torch_dtype"] = model_args.compute_dtype
|
init_kwargs["torch_dtype"] = model_args.compute_dtype
|
||||||
|
Loading…
x
Reference in New Issue
Block a user