llama-model : add Glm4Model implementation for GLM-4-0414 (#12867)

* GLM-4-0414

* use original one

* Using with tensor map

* fix bug

* change order

* change order

* format with flask8
This commit is contained in:
Yuxuan Zhang 2025-04-11 18:10:10 +08:00 committed by GitHub
parent 0c50923944
commit 06bb53ad9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 273 additions and 4 deletions

View file

@ -1572,6 +1572,7 @@ void llama_vocab::impl::load(llama_model_loader & ml, const LLM_KV & kv) {
pre_type = LLAMA_VOCAB_PRE_TYPE_PORO;
clean_spaces = false;
} else if (
tokenizer_pre == "glm4" ||
tokenizer_pre == "chatglm-bpe") {
pre_type = LLAMA_VOCAB_PRE_TYPE_CHATGLM4;
special_bos_id = LLAMA_TOKEN_NULL;