Insert single space in front of the prompt
- this is to match original llama tokenizer behavior
This commit is contained in:
parent
7e1041a730
commit
7566d1ab9b
1 changed files with 2 additions and 0 deletions
2
main.cpp
2
main.cpp
|
@ -845,6 +845,8 @@ int main(int argc, char ** argv) {
|
|||
|
||||
std::vector<float> logits;
|
||||
|
||||
// Add a space in front of the first character to match OG llama tokenizer behavior
|
||||
params.prompt.insert(0, 1, ' ');
|
||||
// tokenize the prompt
|
||||
std::vector<gpt_vocab::id> embd_inp = ::llama_tokenize(vocab, params.prompt, true);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue