File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -7595,7 +7595,8 @@ def set_vocab(self):
75957595 special_vocab = gguf .SpecialVocab (self .dir_model , load_merges = False )
75967596 special_vocab .add_to_gguf (self .gguf_writer )
75977597 # FIX for BOS token: Overwrite incorrect id read from config.json
7598- self .gguf_writer .add_bos_token_id (127958 ) # <|bos|>
7598+ if self .hparams ['hidden_size' ] == 4096 :
7599+ self .gguf_writer .add_bos_token_id (127958 ) # only for 7b dense, fix <|bos|> token
75997600
76007601 def set_gguf_parameters (self ):
76017602 super ().set_gguf_parameters ()
@@ -7620,7 +7621,7 @@ def set_gguf_parameters(self):
76207621 self .gguf_writer .add_context_length (256 * 1024 ) # 256k context length
76217622
76227623 # if any of our assumptions about the values are wrong, something has changed and this may need to be updated
7623- assert alpha == 50 and base == 10000.0 and self .hparams ["max_position_embeddings" ] in [32 * 1024 , 256 * 1024 ] , \
7624+ assert base == 10000.0 and self .hparams ["max_position_embeddings" ] in [32 * 1024 , 256 * 1024 ] , \
76247625 "HunYuan dynamic RoPE scaling assumptions changed, please update the logic or context length manually"
76257626
76267627 _experts : list [dict [str , Tensor ]] | None = None
You can’t perform that action at this time.
0 commit comments