Skip to content

Commit

Permalink
Add ChatGLM model type & tokenizer to pybind (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
li-plus authored Jun 13, 2024
1 parent 598b38e commit 1003af9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chatglm_pybind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ PYBIND11_MODULE(_C, m) {
.value("CHATGLM", ModelType::CHATGLM)
.value("CHATGLM2", ModelType::CHATGLM2)
.value("CHATGLM3", ModelType::CHATGLM3)
.value("CHATGLM4", ModelType::CHATGLM4)
.value("BAICHUAN7B", ModelType::BAICHUAN7B)
.value("BAICHUAN13B", ModelType::BAICHUAN13B)
.value("INTERNLM", ModelType::INTERNLM);
Expand Down Expand Up @@ -143,6 +144,10 @@ PYBIND11_MODULE(_C, m) {

py::class_<ChatGLM3Tokenizer, BaseTokenizer>(m, "ChatGLM3Tokenizer");

// ===== ChatGLM4 =====

py::class_<ChatGLM4Tokenizer, BaseTokenizer>(m, "ChatGLM4Tokenizer");

// ===== Baichuan7B/13B =====

py::class_<BaichuanTokenizer, BaseTokenizer>(m, "BaichuanTokenizer");
Expand Down

0 comments on commit 1003af9

Please sign in to comment.