Skip to content

Commit 0d5375d

Browse files
authored
llama : move enum llama_vocab_pre_type to implementation (#14631)
ggml-ci
1 parent 576c82e commit 0d5375d

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

include/llama.h

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -79,47 +79,6 @@ extern "C" {
7979
LLAMA_VOCAB_TYPE_RWKV = 5, // RWKV tokenizer based on greedy tokenization
8080
};
8181

82-
// pre-tokenization types
83-
enum llama_vocab_pre_type {
84-
LLAMA_VOCAB_PRE_TYPE_DEFAULT = 0,
85-
LLAMA_VOCAB_PRE_TYPE_LLAMA3 = 1,
86-
LLAMA_VOCAB_PRE_TYPE_DEEPSEEK_LLM = 2,
87-
LLAMA_VOCAB_PRE_TYPE_DEEPSEEK_CODER = 3,
88-
LLAMA_VOCAB_PRE_TYPE_FALCON = 4,
89-
LLAMA_VOCAB_PRE_TYPE_MPT = 5,
90-
LLAMA_VOCAB_PRE_TYPE_STARCODER = 6,
91-
LLAMA_VOCAB_PRE_TYPE_GPT2 = 7,
92-
LLAMA_VOCAB_PRE_TYPE_REFACT = 8,
93-
LLAMA_VOCAB_PRE_TYPE_COMMAND_R = 9,
94-
LLAMA_VOCAB_PRE_TYPE_STABLELM2 = 10,
95-
LLAMA_VOCAB_PRE_TYPE_QWEN2 = 11,
96-
LLAMA_VOCAB_PRE_TYPE_OLMO = 12,
97-
LLAMA_VOCAB_PRE_TYPE_DBRX = 13,
98-
LLAMA_VOCAB_PRE_TYPE_SMAUG = 14,
99-
LLAMA_VOCAB_PRE_TYPE_PORO = 15,
100-
LLAMA_VOCAB_PRE_TYPE_CHATGLM3 = 16,
101-
LLAMA_VOCAB_PRE_TYPE_CHATGLM4 = 17,
102-
LLAMA_VOCAB_PRE_TYPE_VIKING = 18,
103-
LLAMA_VOCAB_PRE_TYPE_JAIS = 19,
104-
LLAMA_VOCAB_PRE_TYPE_TEKKEN = 20,
105-
LLAMA_VOCAB_PRE_TYPE_SMOLLM = 21,
106-
LLAMA_VOCAB_PRE_TYPE_CODESHELL = 22,
107-
LLAMA_VOCAB_PRE_TYPE_BLOOM = 23,
108-
LLAMA_VOCAB_PRE_TYPE_GPT3_FINNISH = 24,
109-
LLAMA_VOCAB_PRE_TYPE_EXAONE = 25,
110-
LLAMA_VOCAB_PRE_TYPE_CHAMELEON = 26,
111-
LLAMA_VOCAB_PRE_TYPE_MINERVA = 27,
112-
LLAMA_VOCAB_PRE_TYPE_DEEPSEEK3_LLM = 28,
113-
LLAMA_VOCAB_PRE_TYPE_GPT4O = 29,
114-
LLAMA_VOCAB_PRE_TYPE_SUPERBPE = 30,
115-
LLAMA_VOCAB_PRE_TYPE_TRILLION = 31,
116-
LLAMA_VOCAB_PRE_TYPE_BAILINGMOE = 32,
117-
LLAMA_VOCAB_PRE_TYPE_LLAMA4 = 33,
118-
LLAMA_VOCAB_PRE_TYPE_PIXTRAL = 34,
119-
LLAMA_VOCAB_PRE_TYPE_SEED_CODER = 35,
120-
LLAMA_VOCAB_PRE_TYPE_HUNYUAN = 36,
121-
};
122-
12382
enum llama_rope_type {
12483
LLAMA_ROPE_TYPE_NONE = -1,
12584
LLAMA_ROPE_TYPE_NORM = 0,

src/llama-vocab.h

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,47 @@
66
#include <vector>
77
#include <memory>
88

9+
// pre-tokenization types
10+
enum llama_vocab_pre_type {
11+
LLAMA_VOCAB_PRE_TYPE_DEFAULT = 0,
12+
LLAMA_VOCAB_PRE_TYPE_LLAMA3 = 1,
13+
LLAMA_VOCAB_PRE_TYPE_DEEPSEEK_LLM = 2,
14+
LLAMA_VOCAB_PRE_TYPE_DEEPSEEK_CODER = 3,
15+
LLAMA_VOCAB_PRE_TYPE_FALCON = 4,
16+
LLAMA_VOCAB_PRE_TYPE_MPT = 5,
17+
LLAMA_VOCAB_PRE_TYPE_STARCODER = 6,
18+
LLAMA_VOCAB_PRE_TYPE_GPT2 = 7,
19+
LLAMA_VOCAB_PRE_TYPE_REFACT = 8,
20+
LLAMA_VOCAB_PRE_TYPE_COMMAND_R = 9,
21+
LLAMA_VOCAB_PRE_TYPE_STABLELM2 = 10,
22+
LLAMA_VOCAB_PRE_TYPE_QWEN2 = 11,
23+
LLAMA_VOCAB_PRE_TYPE_OLMO = 12,
24+
LLAMA_VOCAB_PRE_TYPE_DBRX = 13,
25+
LLAMA_VOCAB_PRE_TYPE_SMAUG = 14,
26+
LLAMA_VOCAB_PRE_TYPE_PORO = 15,
27+
LLAMA_VOCAB_PRE_TYPE_CHATGLM3 = 16,
28+
LLAMA_VOCAB_PRE_TYPE_CHATGLM4 = 17,
29+
LLAMA_VOCAB_PRE_TYPE_VIKING = 18,
30+
LLAMA_VOCAB_PRE_TYPE_JAIS = 19,
31+
LLAMA_VOCAB_PRE_TYPE_TEKKEN = 20,
32+
LLAMA_VOCAB_PRE_TYPE_SMOLLM = 21,
33+
LLAMA_VOCAB_PRE_TYPE_CODESHELL = 22,
34+
LLAMA_VOCAB_PRE_TYPE_BLOOM = 23,
35+
LLAMA_VOCAB_PRE_TYPE_GPT3_FINNISH = 24,
36+
LLAMA_VOCAB_PRE_TYPE_EXAONE = 25,
37+
LLAMA_VOCAB_PRE_TYPE_CHAMELEON = 26,
38+
LLAMA_VOCAB_PRE_TYPE_MINERVA = 27,
39+
LLAMA_VOCAB_PRE_TYPE_DEEPSEEK3_LLM = 28,
40+
LLAMA_VOCAB_PRE_TYPE_GPT4O = 29,
41+
LLAMA_VOCAB_PRE_TYPE_SUPERBPE = 30,
42+
LLAMA_VOCAB_PRE_TYPE_TRILLION = 31,
43+
LLAMA_VOCAB_PRE_TYPE_BAILINGMOE = 32,
44+
LLAMA_VOCAB_PRE_TYPE_LLAMA4 = 33,
45+
LLAMA_VOCAB_PRE_TYPE_PIXTRAL = 34,
46+
LLAMA_VOCAB_PRE_TYPE_SEED_CODER = 35,
47+
LLAMA_VOCAB_PRE_TYPE_HUNYUAN = 36,
48+
};
49+
950
struct LLM_KV;
1051
struct llama_model_loader;
1152

0 commit comments

Comments
 (0)