diff options
author | nopperl <54780682+nopperl@users.noreply.github.com> | 2024-05-07 19:39:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-07 21:39:43 +0200 |
commit | b6aa6702030320a3d5fbc2508307af0d7c947e40 (patch) | |
tree | 9a6f9ec0bb711e3a94a83347dc7da6442e2aa0a2 /llama.cpp | |
parent | 260b7c65296fba0568eeb1ff05244ea0be206b54 (diff) |
Fix OLMo HF to GGUF conversion (#6910)
Diffstat (limited to 'llama.cpp')
-rw-r--r-- | llama.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -4389,6 +4389,9 @@ static void llm_load_vocab( } else if ( tokenizer_pre == "command-r") { vocab.type_pre = LLAMA_VOCAB_PRE_TYPE_COMMAND_R; + } else if ( + tokenizer_pre == "olmo") { + vocab.type_pre = LLAMA_VOCAB_PRE_TYPE_OLMO; } else { throw std::runtime_error(format("unknown pre-tokenizer type: '%s'", tokenizer_pre.c_str())); } @@ -12248,6 +12251,7 @@ struct llm_tokenizer_bpe { }); break; case LLAMA_VOCAB_PRE_TYPE_GPT2: + case LLAMA_VOCAB_PRE_TYPE_OLMO: word_collection = unicode_regex_split(text, { "'s|'t|'re|'ve|'m|'ll|'d| ?\\p{L}+| ?\\p{N}+| ?[^\\s\\p{L}\\p{N}]+|\\s+(?!\\S)", }); |