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):
7595
7595
special_vocab = gguf .SpecialVocab (self .dir_model , load_merges = False )
7596
7596
special_vocab .add_to_gguf (self .gguf_writer )
7597
7597
# 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
7599
7600
7600
7601
def set_gguf_parameters (self ):
7601
7602
super ().set_gguf_parameters ()
@@ -7620,7 +7621,7 @@ def set_gguf_parameters(self):
7620
7621
self .gguf_writer .add_context_length (256 * 1024 ) # 256k context length
7621
7622
7622
7623
# 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 ] , \
7624
7625
"HunYuan dynamic RoPE scaling assumptions changed, please update the logic or context length manually"
7625
7626
7626
7627
_experts : list [dict [str , Tensor ]] | None = None
You can’t perform that action at this time.
0 commit comments