8000 feat: Update llama.cpp · surtweig/llama-cpp-python@97fb860 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 97fb860

Browse files
committed
feat: Update llama.cpp
1 parent df2b5b5 commit 97fb860

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

llama_cpp/llama_cpp.py

Copy file name to clipboard
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,27 @@ def byref(obj: CtypesCData, offset: Optional[int] = None) -> CtypesRef[CtypesCDa
284284
"""BERT tokenizer based on WordPiece"""
285285

286286

287+
# // pre-tokenization types
288+
# enum llama_vocab_pre_type {
289+
# LLAMA_VOCAB_PRE_TYPE_DEFAULT = 0,
290+
# LLAMA_VOCAB_PRE_TYPE_LLAMA3 = 1,
291+
# LLAMA_VOCAB_PRE_TYPE_DEEPSEEK_LLM = 2,
292+
# LLAMA_VOCAB_PRE_TYPE_DEEPSEEK_CODER = 3,
293+
# LLAMA_VOCAB_PRE_TYPE_FALCON = 4,
294+
# LLAMA_VOCAB_PRE_TYPE_MPT = 5,
295+
# LLAMA_VOCAB_PRE_TYPE_STARCODER = 6,
296+
# LLAMA_VOCAB_PRE_TYPE_GPT2 = 7,
297+
# };
298+
LLAMA_VOCAB_PRE_TYPE_DEFAULT = 0
299+
LLAMA_VOCAB_PRE_TYPE_LLAMA3 = 1
300+
LLAMA_VOCAB_PRE_TYPE_DEEPSEEK_LLM = 2
301+
LLAMA_VOCAB_PRE_TYPE_DEEPSEEK_CODER = 3
302+
LLAMA_VOCAB_PRE_TYPE_FALCON = 4
303+
LLAMA_VOCAB_PRE_TYPE_MPT = 5
304+
LLAMA_VOCAB_PRE_TYPE_STARCODER = 6
305+
LLAMA_VOCAB_PRE_TYPE_GPT2 = 7
306+
307+
287308
# // note: these values should be synchronized with ggml_rope
288309
# // TODO: maybe move this enum to ggml.h (ggml_rope_type)
289310
# enum llama_rope_type {

tests/test_llama.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import llama_cpp
88

9-
MODEL = "./vendor/llama.cpp/models/ggml-vocab-llama.gguf"
9+
MODEL = "./vendor/llama.cpp/models/ggml-vocab-llama-spm.gguf"
1010

1111

1212
def test_llama_cpp_tokenization():

vendor/llama.cpp

0 commit comments

Comments
 (0)
0