mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-02-04 23:52:32 +01:00
minja: fix vigogne (https://github.com/google/minja/pull/22)
This commit is contained in:
parent
e3c475cd12
commit
cc50356470
@ -1305,12 +1305,10 @@ struct ArgumentsExpression {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static std::string strip(const std::string & s) {
|
static std::string strip(const std::string & s) {
|
||||||
static std::regex trailing_spaces_regex("^\\s+|\\s+$");
|
auto start = s.find_first_not_of(" \t\n\r");
|
||||||
return std::regex_replace(s, trailing_spaces_regex, "");
|
if (start == std::string::npos) return "";
|
||||||
// auto start = s.find_first_not_of(" \t\n\r");
|
auto end = s.find_last_not_of(" \t\n\r");
|
||||||
// if (start == std::string::npos) return "";
|
return s.substr(start, end - start + 1);
|
||||||
// auto end = s.find_last_not_of(" \t\n\r");
|
|
||||||
// return s.substr(start, end - start + 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string html_escape(const std::string & s) {
|
static std::string html_escape(const std::string & s) {
|
||||||
|
@ -68,7 +68,6 @@ int main(void) {
|
|||||||
/* .expected_output_jinja= */ "[INST] <<SYS>>\nYou are a helpful assistant\n<</SYS>>\n\nHello [/INST] Hi there </s>[INST] Who are you [/INST] I am an assistant </s>[INST] Another question [/INST]",
|
/* .expected_output_jinja= */ "[INST] <<SYS>>\nYou are a helpful assistant\n<</SYS>>\n\nHello [/INST] Hi there </s>[INST] Who are you [/INST] I am an assistant </s>[INST] Another question [/INST]",
|
||||||
/* .bos_token= */ "",
|
/* .bos_token= */ "",
|
||||||
/* .eos_token= */ "</s>",
|
/* .eos_token= */ "</s>",
|
||||||
/* .supported_with_jinja= */ false, // Mysteriously fails on windows-latest in llama.cpp's CI, although that template works fine in Minja's CI on windows-latest
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
/* .name= */ "mlabonne/AlphaMonarch-7B",
|
/* .name= */ "mlabonne/AlphaMonarch-7B",
|
||||||
|
Loading…
Reference in New Issue
Block a user