]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
llama : support glm3 and glm4 (#8031)
authortoyer <redacted>
Sun, 7 Jul 2024 12:52:10 +0000 (20:52 +0800)
committerGitHub <redacted>
Sun, 7 Jul 2024 12:52:10 +0000 (15:52 +0300)
commit905942abdba5ba0b28a1b0805e51e4f818c54bc9
treee72f40a8f32b311ab756eb32abad06659fa9d0d5
parentb5040086d436e7345e4fa33a5b9558060c75603f
llama : support glm3 and glm4 (#8031)

* add chatglm3-6b model support huggingface model:
 https://hf-mirror.com/THUDM/chatglm3-6b

Signed-off-by: XingXing Qiao <redacted>
* remove .rotary_pos_emb.inv_freq and unuse code for chatglm3 model

Signed-off-by: XingXing Qiao <redacted>
* fix lint error

Signed-off-by: XingXing Qiao <redacted>
* optimize convert-hf-to-gguf.py for chatglm model

Signed-off-by: XingXing Qiao <redacted>
* support glm-4-9b-chat

Signed-off-by: XingXing Qiao <redacted>
* fix eos tokens to glm4

* remove unused log

* add preprocess to chatglm3 and chatglm4

* add eos_id_list to llama.cpp

* fix code style

* fix code style

* fix conflicts

* fix conflicts

* Revert "add eos_id_list to llama.cpp"

This reverts commit 3a4d5790bfdc205c5b658204239f168fc21cc1a8.

* set <|endoftext|> as eos and <|user|> as eot

* fix chat template bug

* add comment to glm prefix and suffix

* fix conflicts and add rope_ratio & ChatGLMForConditionalGeneration

* fix chat template bug

* fix codestyle

* fix conflicts

* modified the general name of glm model

* fix conflicts

* remove prefix and suffix

* use normal glm4 chattempalte & use LLM_FFN_SWIGLU in phi3

* fix: resolve Flake8 errors in `convert-hf-to-gguf.py`

- Fix E302 by adding two blank lines before top-level function definitions
- Replace print statements to fix NP100
- Fix E303 by ensuring only one blank line between lines of code

* fix rope ratio to solve incorrect answers

* fix by comments

---------

Signed-off-by: XingXing Qiao <redacted>
Co-authored-by: XingXing Qiao <redacted>
Co-authored-by: Umpire2018 <redacted>
convert_hf_to_gguf.py
gguf-py/gguf/constants.py
gguf-py/gguf/tensor_mapping.py
include/llama.h
src/llama.cpp
tests/test-chat-template.cpp