Skip to content

Navigation Menu

Sign in
Appearance settings

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 filesBrowse files
committed
feat: Update llama.cpp
1 parent df2b5b5 commit 97fb860
Copy full SHA for 97fb860

File tree

Expand file treeCollapse file tree

3 files changed

+23
-2
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+23
-2
lines changed

‎llama_cpp/llama_cpp.py

Copy file name to clipboardExpand all lines: llama_cpp/llama_cpp.py
+21Lines 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

Copy file name to clipboardExpand all lines: tests/test_llama.py
+1-1Lines 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

Copy file name to clipboard

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.