cfg value

This commit is contained in:
Dan Saunders
2025-09-23 11:29:41 -04:00
parent d3e1b0ef1a
commit 3277d44d71
4 changed files with 95 additions and 6 deletions

View File

@@ -190,10 +190,14 @@ class PatchManager:
apply_mistral_tokenizer_image_patch()
if self.cfg.model_config_type == "deepseek_v3":
if self.cfg.moe_kernels and self.cfg.model_config_type == "deepseek_v3":
from axolotl.monkeypatch.deepseek_v3 import patch_deepseek_v3_moe
patch_deepseek_v3_moe()
elif self.cfg.model_config_type == "deepseek_v3" and not self.cfg.moe_kernels:
LOG.info(
"Skipping DeepSeek V3 Triton MoE kernels; enable with `moe_kernels: true`"
)
def _apply_fp8_patches(self):
"""Apply patches for FP8 support."""

View File

@@ -106,6 +106,12 @@ class AxolotlInputConfig(
"description": "Don't upcast the embeddings to float32 when using PEFT. Useful for low-VRAM GPUs"
},
)
moe_kernels: bool = Field(
default=False,
json_schema_extra={
"description": "Enable Axolotl's vendored MoE kernels when supported (e.g., DeepSeek V3)"
},
)
reinit_weights: bool | None = Field(
default=None,
json_schema_extra={