-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mpt: utf-8 support, perplexity testing, repeat penalty sampling #184
Conversation
@@ -64,6 +64,105 @@ struct mpt_model { | |||
std::map<std::string, struct ggml_tensor *> tensors; | |||
}; | |||
|
|||
struct mpt_params { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is in cpp, is it possible to extend the struct gpt_params
?
} | ||
|
||
|
||
std::vector<std::pair<double, gpt_vocab::id>> logits_id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logit is float. Maybe use std::pair<float, gpt_vocab::id>
?
also in llama.cpp/examples/main/main.cpp line 423 implements similar approach that makes use of the |
examples/mpt/perplexity.cpp
Outdated
ggml_free(model.ctx); | ||
|
||
return 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to duplicate main.cpp
in perplexity.cpp
.
Just add a --perplexity
CLI argument to main.cpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Follow up to pr #179 . Fixes issues #170 , #55 .
A better solution that will not affect the other examples that uses gpt_tokenize