ESFT (Expert Specialized Fine-Tuning) is an open-source fine-tuning method and codebase released by DeepSeek AI for Mixture-of-Experts language models. Rather than updating the whole model, it specializes only the experts that matter for a target task. The repository has about 754 stars on GitHub and was last updated in May 2025.
Large MoE models such as DeepSeek’s own route each token through a small subset of expert networks. Standard fine-tuning updates everything, which is expensive and can erode the model’s general abilities. ESFT instead scores experts by their relevance to the downstream task’s data, then fine-tunes only the most relevant ones while freezing the rest. The goal is stronger task performance with far fewer trainable parameters and less catastrophic forgetting of general knowledge. The repository provides the reference implementation of the method under an MIT license, aimed at researchers and engineers who adapt MoE models to specialized domains.
The repository packages the method as ready-to-run training code, so teams can reproduce the expert-selection and specialization workflow on their own task data, measure the gains against full fine-tuning, and only then commit serious compute to a production run.
ESFT is free and open source under the MIT license. Anyone can download the code from GitHub and use it in research or commercial model development; the only costs are your own training compute and the base models you fine-tune.
ESFT is for ML engineers and researchers who fine-tune open MoE models such as DeepSeek’s for domain-specific tasks like math, code or enterprise data. It is especially relevant to teams that need task specialization without the cost and regression risk of full-model fine-tuning.