mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-11-12 03:49:09 +00:00
fix: use tokenizer-specific pre-tokenization rules (#1975)
This commit is contained in:
1 parent
07a85c74cb
commit
59c23bce0d
9 files changed
+92
-1021
No files matched your search
@@ -46,7 +46,9 @@ void GemmaTokenizer::load_from_merges(const std::string& merges_utf8_str, const
|
||||
bpe_len = rank;
|
||||
}
|
||||
|
||||
GemmaTokenizer::GemmaTokenizer(const std::string& merges_utf8_str, const std::string& vocab_utf8_str) {
|
||||
GemmaTokenizer::GemmaTokenizer(const std::string& merges_utf8_str, const std::string& vocab_utf8_str)
|
||||
: BPETokenizer("") {
|
||||
// Gemma replaces spaces with metaspace before its literal-space Split, so no regex boundaries apply.
|
||||
byte_level_bpe = false;
|
||||
byte_fallback = true;
|
||||
add_bos_token = true;
|
||||
|
||||
Reference in new issue
Block a user