Model#
XTuner v1’s TrainEngine supports a variety of Transformer architectures through different TransformerConfig subclasses. The documentation below summarizes the currently supported models (RL-related configs are excluded).
Base Config Classes#
The following table lists the base config classes that define each model family. They provide the from_hf interface for loading pretrained weights from HuggingFace.
Base Config Class |
Model Family |
Architecture Type |
HuggingFace Counterpart |
|---|---|---|---|
|
Qwen2 Dense |
Dense |
|
|
Qwen3 Dense |
Dense |
|
|
DeepSeek-V3 |
MoE |
|
|
GPT-OSS |
MoE |
|
|
Qwen3 MoE |
MoE |
|
Concrete Model Configs#
The following table lists the concrete model configs that inherit from the base classes above. Each config corresponds to a specific model scale or variant.
Config Class |
Base Class / Family |
Architecture Type |
Scale / Notes |
|---|---|---|---|
|
|
Dense |
~7B parameters |
|
|
Dense |
~8B parameters |
|
|
Dense |
~4B parameters |
|
|
Dense |
~0.6B parameters |
|
|
Dense (VL backbone) |
~4B parameters, for multimodal |
|
|
Dense (VL backbone) |
~8B parameters, for multimodal |
|
— |
MoE |
~671B total / ~37B activated |
|
|
MoE |
~21B total / ~3.6B activated |
|
|
MoE |
~117B total / ~5.8B activated |
|
|
MoE |
~30B total / ~3B activated |
|
|
MoE |
~235B total / ~22B activated |
|
|
MoE |
FoPE (Frequency-based Position Embedding) variant |
|
|
MoE (VL backbone) |
~30B total, for multimodal |
|
|
MoE (VL backbone) |
~235B total, for multimodal |
|
|
MoE (VL backbone) |
~35B total / ~3B activated, for multimodal |
Compose Models#
In addition to pure text models, XTuner also supports multimodal compose models that combine a vision encoder, a projector, and a language model. These configs inherit from BaseComposeConfig rather than TransformerConfig directly, but they wrap the text configs listed above.
Compose Base Config Classes#
Base Config Class |
Model Family |
Modality |
Description |
|---|---|---|---|
|
Qwen3-VL |
Image / Video + Text |
VL model based on Qwen3 text backbone |
|
InternVL |
Image + Text |
VL model based on InternViT + Qwen3 |
|
InternS1 |
Image + Text |
Science multimodal model based on InternViT + Qwen3 |
Concrete Compose Model Configs#
Config Class |
Compose Base / Family |
Text Config |
Scale / Notes |
|---|---|---|---|
|
|
|
~30B total, MoE VL |
|
|
|
~235B total, MoE VL |
|
|
|
~4B parameters, Dense VL |
|
|
|
~8B parameters, Dense VL |
|
|
|
~35B total / ~3B activated, MoE VL |
|
|
|
~8B parameters, Dense VL |
|
|
|
~30B total, MoE VL |
|
|
|
~1B parameters, Dense VL |
|
|
|
~235B total, MoE multimodal |
|
|
|
~8B parameters, Dense multimodal |
Inheritance Hierarchy#
The following diagram shows the complete inheritance hierarchy of all config classes supported by TrainEngine, including both TransformerConfig and BaseComposeConfig branches.
XTunerBaseModelConfig
├── TransformerConfig
│ ├── Dense Models
│ │ ├── Qwen2DenseConfig
│ │ │ └── Qwen2Dense7BConfig
│ │ └── Qwen3DenseConfig
│ │ ├── Qwen3Dense8BConfig
│ │ │ └── Qwen3VLTextDense8BConfig
│ │ ├── Qwen3Dense4BConfig
│ │ │ └── Qwen3VLTextDense4BConfig
│ │ └── Qwen3Dense0P6BConfig
│ └── MoE Models (via MoEConfig)
│ ├── DeepSeekV3Config
│ ├── GptOssConfig
│ │ ├── GptOss21BA3P6Config
│ │ └── GptOss117BA5P8Config
│ ├── Qwen3MoEConfig
│ │ ├── Qwen3MoE30BA3Config
│ │ │ └── Qwen3VLTextMoE30BA3Config
│ │ ├── Qwen3MoE235BA22Config
│ │ │ └── Qwen3VLTextMoE235BA22Config
│ │ └── Qwen3MoEFoPEConfig
│ └── Qwen3_5_VLTextMoEConfig
│ └── Qwen3_5_VLTextMoE35BA3BConfig
└── BaseComposeConfig
├── Qwen3VLBaseConfig
│ ├── Qwen3VLMoE30BA3Config
│ ├── Qwen3VLMoE235BA22Config
│ ├── Qwen3VLDense4BConfig
│ ├── Qwen3VLDense8BConfig
│ └── Qwen3_5_BaseConfig
│ └── Qwen3_5_VLMoE35BA3Config
├── InternVLBaseConfig
│ ├── InternVL3P5Dense8BConfig
│ ├── InternVL3P5MoE30BA3Config
│ └── InternVL3P5Dense1BConfig
└── InternS1BaseConfig
├── InternS1Config
└── InternS1MiniConfig