Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions llama_cpp/llama_cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,13 @@


# enum llama_vocab_type {
# LLAMA_VOCAB_TYPE_NONE = 0, // For models without vocab
# LLAMA_VOCAB_TYPE_SPM = 1, // LLaMA tokenizer based on byte-level BPE with byte fallback
# LLAMA_VOCAB_TYPE_BPE = 2, // GPT-2 tokenizer based on byte-level BPE
# LLAMA_VOCAB_TYPE_WPM = 3, // BERT tokenizer based on WordPiece
# LLAMA_VOCAB_TYPE_UGM = 4, // T5 tokenizer based on Unigram
# LLAMA_VOCAB_TYPE_RWKV = 5, // RWKV tokenizer based on greedy tokenization
# LLAMA_VOCAB_TYPE_NONE = 0, // For models without vocab
# LLAMA_VOCAB_TYPE_SPM = 1, // LLaMA tokenizer based on byte-level BPE with byte fallback
# LLAMA_VOCAB_TYPE_BPE = 2, // GPT-2 tokenizer based on byte-level BPE
# LLAMA_VOCAB_TYPE_WPM = 3, // BERT tokenizer based on WordPiece
# LLAMA_VOCAB_TYPE_UGM = 4, // T5 tokenizer based on Unigram
# LLAMA_VOCAB_TYPE_RWKV = 5, // RWKV tokenizer based on greedy tokenization
# LLAMA_VOCAB_TYPE_PLAMO2 = 6, // PLaMo-2 tokenizer based on Aho-Corasick with dynamic programming
# };
LLAMA_VOCAB_TYPE_NONE = 0
"""For models without vocab"""
Expand All @@ -198,6 +199,8 @@
"""T5 tokenizer based on Unigram"""
LLAMA_VOCAB_TYPE_RWKV = 5
"""RWKV tokenizer based on greedy tokenization"""
LLAMA_VOCAB_TYPE_PLAMO2 = 6
"""PLaMo-2 tokenizer based on Aho-Corasick with dynamic programming"""


# NOTE: Deprecated and will be removed in the future. (already gone in llama.cpp)
Expand Down Expand Up @@ -2171,7 +2174,7 @@ def llama_kv_self_seq_add(
# // - lazily on next llama_decode()
# // p0 < 0 : [0, p1]
# // p1 < 0 : [p0, inf)
# DEPRECATED(void llama_kv_self_seq_div(
# DEPRECATED(LLAMA_API void llama_kv_self_seq_div(
# struct llama_context * ctx,
# llama_seq_id seq_id,
# llama_pos p0,
Expand Down
2 changes: 1 addition & 1 deletion vendor/llama.cpp