File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -7533,6 +7533,7 @@ class HunYuanModel(TextModel):
7533
7533
def set_vocab (self ):
7534
7534
if (self .dir_model / "tokenizer.json" ).is_file ():
7535
7535
self ._set_vocab_gpt2 ()
7536
+ self .gguf_writer .add_add_bos_token (True )
7536
7537
else :
7537
7538
from transformers import AutoTokenizer
7538
7539
tokenizer = AutoTokenizer .from_pretrained (self .dir_model , trust_remote_code = True )
Original file line number Diff line number Diff line change @@ -712,9 +712,7 @@ int32_t llm_chat_apply_template(
712
712
std::string role (chat[i]->role );
713
713
if (i == 0 ) {
714
714
if (role == " system" ) {
715
- ss << " <|hy_begin▁of▁sentence|>" << chat[i]->content << " <|hy_place▁holder▁no▁3|>" ;
716
- } else {
717
- ss << " <|hy_begin▁of▁sentence|>" ;
715
+ ss << chat[i]->content << " <|hy_place▁holder▁no▁3|>" ;
718
716
}
719
717
}
720
718
You can’t perform that action at this time.
0 commit comments