Skip to content

Commit 05fe235

Browse files
committed
Address review comments
1 parent 7112a71 commit 05fe235

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

convert_hf_to_gguf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2791,7 +2791,7 @@ def get_vocab_base(self) -> tuple[list[str], list[int], str]:
27912791
for i in range(vocab_size):
27922792
if i not in reverse_vocab:
27932793
tokens.append(f"[PAD{i}]")
2794-
toktypes.append(gguf.TokenType.USER_DEFINED)
2794+
toktypes.append(gguf.TokenType.UNUSED)
27952795
elif reverse_vocab[i] in added_vocab:
27962796
tokens.append(reverse_vocab[i])
27972797
# Check if it's a special token - treat special tokens as CONTROL tokens

examples/diffusion/diffusion-cli.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,12 @@ static std::string format_input_text(const std::string & prompt, bool use_chat_t
2121
auto chat_templates = common_chat_templates_init(model, "");
2222

2323
common_chat_templates_inputs inputs;
24-
// Create user message
2524
common_chat_msg user_msg;
2625
user_msg.role = "user";
2726
user_msg.content = prompt;
2827
inputs.add_generation_prompt = true;
2928
inputs.messages.push_back(user_msg);
3029

31-
// Apply chat template
3230
auto result = common_chat_templates_apply(chat_templates.get(), inputs);
3331

3432
return result.prompt;
@@ -90,12 +88,10 @@ int main(int argc, char ** argv) {
9088

9189
common_params params;
9290

93-
// Use the standard common_params_parse with LLAMA_EXAMPLE_DIFFUSION
9491
if (!common_params_parse(argc, argv, params, LLAMA_EXAMPLE_DIFFUSION)) {
9592
return 1;
9693
}
9794

98-
// Print diffusion parameters
9995
const char * alg_names[] = { "ORIGIN", "MASKGIT_PLUS", "TOPK_MARGIN", "ENTROPY" };
10096
const char * alg_name = (params.diffusion.algorithm >= 0 && params.diffusion.algorithm <= 3) ?
10197
alg_names[params.diffusion.algorithm] :
@@ -117,7 +113,6 @@ int main(int argc, char ** argv) {
117113
return 1;
118114
}
119115

120-
// Create context
121116
llama_context_params ctx_params = llama_context_default_params();
122117
ctx_params.n_ctx = params.n_ctx;
123118
ctx_params.n_batch = params.n_batch;

examples/diffusion/diffusion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ llama_token * diffusion_generate(
3636
const llama_token * input_tokens,
3737
int32_t n_input,
3838
int32_t max_length,
39-
struct diffusion_params params,
40-
int32_t * n_generated);
39+
struct diffusion_params params,
40+
int32_t * n_generated);
4141

4242
#ifdef __cplusplus
4343
}

0 commit comments

Comments
 (0)