mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2024-10-01 01:06:10 -04:00
Add new reverse prompt for new localdocs context feature.
This commit is contained in:
parent
54fc980cb5
commit
9bfff8bfcb
@ -983,7 +983,7 @@ void GPTJ::prompt(const std::string &prompt,
|
||||
std::string cachedResponse;
|
||||
std::vector<gpt_vocab::id> cachedTokens;
|
||||
std::unordered_set<std::string> reversePrompts
|
||||
= { "### Instruction", "### Prompt", "### Response", "### Human", "### Assistant" };
|
||||
= { "### Instruction", "### Prompt", "### Response", "### Human", "### Assistant", "### Context" };
|
||||
|
||||
// predict next tokens
|
||||
int32_t totalPredictions = 0;
|
||||
|
@ -179,7 +179,7 @@ void LLamaModel::prompt(const std::string &prompt,
|
||||
std::string cachedResponse;
|
||||
std::vector<llama_token> cachedTokens;
|
||||
std::unordered_set<std::string> reversePrompts
|
||||
= { "### Instruction", "### Prompt", "### Response", "### Human", "### Assistant" };
|
||||
= { "### Instruction", "### Prompt", "### Response", "### Human", "### Assistant", "### Context" };
|
||||
|
||||
// predict next tokens
|
||||
int32_t totalPredictions = 0;
|
||||
|
@ -908,7 +908,7 @@ void MPT::prompt(const std::string &prompt,
|
||||
std::string cachedResponse;
|
||||
std::vector<int> cachedTokens;
|
||||
std::unordered_set<std::string> reversePrompts
|
||||
= { "### Instruction", "### Prompt", "### Response", "### Human", "### Assistant" };
|
||||
= { "### Instruction", "### Prompt", "### Response", "### Human", "### Assistant", "### Context" };
|
||||
|
||||
// predict next tokens
|
||||
int32_t totalPredictions = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user