File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Original file line number Diff line number Diff line change @@ -1747,6 +1747,25 @@ def prepare_tensors(self):
1747
1747
raise ValueError (f"Unprocessed experts: { experts } " )
1748
1748
1749
1749
1750
+ @Model .register ("Mistral3ForConditionalGeneration" )
1751
+ class Mistral3Model (LlamaModel ):
1752
+ model_arch = gguf .MODEL_ARCH .LLAMA
1753
+
1754
+ # we need to merge the text_config into the root level of hparams
1755
+ def __init__ (self , * args , ** kwargs ):
1756
+ hparams = Model .load_hparams (kwargs ["dir_model" ])
1757
+ if "text_config" in hparams :
1758
+ hparams = {** hparams , ** hparams ["text_config" ]}
1759
+ kwargs ["hparams" ] = hparams
1760
+ super ().__init__ (* args , ** kwargs )
1761
+
1762
+ def modify_tensors (self , data_torch : Tensor , name : str , bid : int | None ):
1763
+ name = name .replace ("language_model." , "" )
1764
+ if "multi_modal_projector" in name or "vision_tower" in name :
1765
+ return []
1766
+ return super ().modify_tensors (data_torch , name , bid )
1767
+
1768
+
1750
1769
@Model .register ("DeciLMForCausalLM" )
1751
1770
class DeciModel (Model ):
1752
1771
model_arch = gguf .MODEL_ARCH .DECI
You can’t perform that action at this time.
0 commit comments