File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ class LLMModelType:
12
12
qwen2_moe = 'qwen2_moe'
13
13
qwq_preview = 'qwq_preview'
14
14
qwq = 'qwq'
15
+ qwen3 = 'qwen3'
16
+ qwen3_moe = 'qwen3_moe'
15
17
16
18
qwen2_gte = 'qwen2_gte'
17
19
Original file line number Diff line number Diff line change @@ -487,8 +487,36 @@ def _get_cast_dtype(self) -> torch.dtype:
487
487
get_model_tokenizer_with_flash_attn ,
488
488
architectures = ['Qwen2MoeForCausalLM' ],
489
489
requires = ['transformers>=4.40' ],
490
+ ))
491
+
492
+ register_model (
493
+ ModelMeta (
494
+ LLMModelType .qwen3 ,
495
+ [
496
+ ModelGroup ([
497
+ # Model('Qwen/Qwen3-0.6B-Base', 'Qwen/Qwen3-0.6B-Base'),
498
+ ]),
499
+ ],
500
+ TemplateType .qwen ,
501
+ get_model_tokenizer_with_flash_attn ,
502
+ architectures = ['Qwen3ForCausalLM' ],
503
+ requires = ['transformers>=4.51' ],
490
504
model_arch = ModelArch .llama ))
491
505
506
+ register_model (
507
+ ModelMeta (
508
+ LLMModelType .qwen3_moe ,
509
+ [
510
+ ModelGroup ([
511
+ # Model('Qwen/Qwen3-15B-A2B-Base', 'Qwen/Qwen3-15B-A2B-Base'),
512
+ ]),
513
+ ],
514
+ TemplateType .qwen ,
515
+ get_model_tokenizer_with_flash_attn ,
516
+ architectures = ['Qwen3MoeForCausalLM' ],
517
+ requires = ['transformers>=4.51' ],
518
+ ))
519
+
492
520
493
521
def patch_qwen_vl_utils (vision_process ):
494
522
if hasattr (vision_process , '_patch' ):
You can’t perform that action at this time.
0 commit comments