From bdc9eff635cbea670722e672fd329ac35a01a812 Mon Sep 17 00:00:00 2001 From: hoshi-hiyouga Date: Mon, 22 Jan 2024 23:27:39 +0800 Subject: [PATCH] Update patcher.py --- src/llmtuner/model/patcher.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/llmtuner/model/patcher.py b/src/llmtuner/model/patcher.py index 892a9165..c537a6d2 100644 --- a/src/llmtuner/model/patcher.py +++ b/src/llmtuner/model/patcher.py @@ -285,6 +285,7 @@ def patch_model( _prepare_model_for_training(model, model_args) if getattr(model.config, "model_type", None) == "mixtral" and is_deepspeed_zero3_enabled(): + require_version("deepspeed>=0.13.0", "To fix: pip install deepspeed>=0.13.0") from deepspeed.utils import set_z3_leaf_modules from transformers.models.mixtral.modeling_mixtral import MixtralSparseMoeBlock set_z3_leaf_modules(model, [MixtralSparseMoeBlock])