Don't display the endoftext token.

This commit is contained in:
Adam Treat 2023-04-09 01:22:12 -04:00
parent c430ed12c6
commit 16d2160d40

View File

@ -740,7 +740,8 @@ void GPTJ::prompt(const std::string &prompt, std::function<bool(const std::strin
// add it to the context // add it to the context
embd.push_back(id); embd.push_back(id);
resp.push_back(id); if (id != 50256)
resp.push_back(id);
} else { } else {
// if here, it means we are still processing the input prompt // if here, it means we are still processing the input prompt
for (int k = i; k < embd_inp.size(); k++) { for (int k = i; k < embd_inp.size(); k++) {