summaryrefslogtreecommitdiff
path: root/llama.cpp
diff options
context:
space:
mode:
authorBartowski <ckealty1182@gmail.com>2024-05-26 08:28:35 -0400
committerGitHub <noreply@github.com>2024-05-26 15:28:35 +0300
commitc429b33beb35f13934a4dfbe0c138d30b45e5d54 (patch)
tree1f2dd835f2fd1f266ca327a85123bf54214b68e7 /llama.cpp
parent9146d36fe7e3e911a07438c07efc1bae082f6390 (diff)
llama : add Smaug 70B support (#7402)
Diffstat (limited to 'llama.cpp')
-rw-r--r--llama.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llama.cpp b/llama.cpp
index 989d27b9..f67cb7e2 100644
--- a/llama.cpp
+++ b/llama.cpp
@@ -4593,6 +4593,9 @@ static void llm_load_vocab(
} else if (
tokenizer_pre == "dbrx") {
vocab.type_pre = LLAMA_VOCAB_PRE_TYPE_DBRX;
+ } else if (
+ tokenizer_pre == "smaug-bpe") {
+ vocab.type_pre = LLAMA_VOCAB_PRE_TYPE_SMAUG;
} else {
throw std::runtime_error(format("unknown pre-tokenizer type: '%s'", tokenizer_pre.c_str()));
}
@@ -12512,6 +12515,7 @@ struct llm_tokenizer_bpe {
});
break;
case LLAMA_VOCAB_PRE_TYPE_DBRX:
+ case LLAMA_VOCAB_PRE_TYPE_SMAUG:
word_collection = unicode_regex_split(text, {
// same as llama3
"(?:'[sS]|'[tT]|'[rR][eE]|'[vV][eE]|'[mM]|'[lL][lL]|'[dD])|[^\\r\\n\\p{L}\\p{N}]?\\p{L}+|\\p{N}{1,3}| ?[^\\s\\p{L}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",