Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
fixed the inference issue for chatglm2
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhenzhong1 committed Jan 18, 2024
1 parent 89cc9eb commit 1d29a9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neural_speed/models/model_utils/model_files.h
Original file line number Diff line number Diff line change
Expand Up @@ -962,8 +962,9 @@ struct gguf_loader {
scores = (const float*)gguf_get_arr_data(ctx_gguf, score_idx);
}

uint32_t default_n_vocab = 32000;
const uint32_t n_vocab = gguf_get_arr_n(ctx_gguf, token_idx);
if (hparams.n_vocab != n_vocab) {
if ((hparams.n_vocab == default_n_vocab) && (hparams.n_vocab != n_vocab)) {
hparams.n_vocab = n_vocab;
}

Expand Down

0 comments on commit 1d29a9c

Please sign in to comment.