falcon : fix regex
This commit is contained in:
parent
3a461dbff3
commit
3275e60f57
1 changed files with 1 additions and 2 deletions
|
@ -12212,14 +12212,13 @@ struct llm_tokenizer_bpe {
|
||||||
"\\s?\\p{L}+",
|
"\\s?\\p{L}+",
|
||||||
"\\s?\\p{P}+",
|
"\\s?\\p{P}+",
|
||||||
"[一-龥ࠀ-一가-]+",
|
"[一-龥ࠀ-一가-]+",
|
||||||
"\\p{N}+",
|
"\\p{N}",
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case LLAMA_VOCAB_PRE_TYPE_FALCON:
|
case LLAMA_VOCAB_PRE_TYPE_FALCON:
|
||||||
word_collection = unicode_regex_split(text, {
|
word_collection = unicode_regex_split(text, {
|
||||||
"[\\p{P}\\$\\+<=>\\^~\\|]+",
|
"[\\p{P}\\$\\+<=>\\^~\\|]+",
|
||||||
"'s|'t|'re|'ve|'m|'ll|'d| ?\\p{L}+| ?\\p{N}+| ?[^\\s\\p{L}\\p{N}]+|\\s+(?!\\S)",
|
"'s|'t|'re|'ve|'m|'ll|'d| ?\\p{L}+| ?\\p{N}+| ?[^\\s\\p{L}\\p{N}]+|\\s+(?!\\S)",
|
||||||
"\\p{N}+",
|
|
||||||
"[0-9][0-9][0-9]",
|
"[0-9][0-9][0-9]",
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue