Skip to content

Commit a70dd6f

Browse files
authored
fix: sampler vocab size. (#241)
1 parent a5a1a2f commit a70dd6f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/app.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ void runInferenceApp(AppCliArgs *args, void (*handler)(AppInferenceContext *cont
234234

235235
Tokenizer tokenizer(args->tokenizerPath);
236236
if (tokenizer.vocabSize != header.vocabSize)
237-
printf("Tokenizer vocab size does not match the model vocab size: %d != %d\n", tokenizer.vocabSize, header.vocabSize);
237+
printf("Tokenizer vocab size (%d) does not match the model vocab size (%d)\n", tokenizer.vocabSize, header.vocabSize);
238238

239-
Sampler sampler(header.vocabSize, args->temperature, args->topp, args->seed);
239+
Sampler sampler(tokenizer.vocabSize, args->temperature, args->topp, args->seed);
240240

241241
LlmNet net = buildLlmNet(&header, nNodes, args->nBatches);
242242
std::unique_ptr<LlmNet, void(*)(LlmNet *)> netPtr(&net, releaseLlmNet);

src/nn/nn-vulkan-test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,6 @@ void testCast_F32_Q80() {
421421
for (NnUint i = 0; i < N_BATCHES * dim; i++) {
422422
const float expectedV = (float)(i + 1);
423423
const float change = (yF32[i] - expectedV) / expectedV;
424-
printf("cast %f %f\n", expectedV, yF32[i]);
425424
assertFloat(i, change, 0.0, 0.009f);
426425
}
427426
printOk("testCast_F32_Q80");

0 commit comments

Comments
 (0)