Skip to content

Commit 7177eb8

Browse files
committed
speculative-simple : fix warnings
1 parent 5ea6fc5 commit 7177eb8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/speculative-simple/speculative-simple.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ int main(int argc, char ** argv) {
7070
std::vector<llama_token> inp;
7171
inp = common_tokenize(ctx_tgt, params.prompt, true, true);
7272

73-
if (llama_n_ctx(ctx_tgt) < (int) inp.size()) {
73+
if (llama_n_ctx(ctx_tgt) < (uint32_t) inp.size()) {
7474
LOG_ERR("%s: the prompt exceeds the context size (%d tokens, ctx %d)\n", __func__, (int) inp.size(), llama_n_ctx(ctx_tgt));
7575

7676
return 1;
7777
}
7878

79-
if (llama_n_batch(ctx_tgt) < (int) inp.size()) {
79+
if (llama_n_batch(ctx_tgt) < (uint32_t) inp.size()) {
8080
LOG_ERR("%s: the prompt exceeds the batch size (%d tokens, batch %d)\n", __func__, (int) inp.size(), llama_n_batch(ctx_tgt));
8181

8282
return 1;
@@ -154,7 +154,7 @@ int main(int argc, char ** argv) {
154154
// evaluate the target model on [id_last, draft0, draft1, ..., draftN-1]
155155
{
156156
// do not waste time on small drafts
157-
if (draft.size() < n_draft_min) {
157+
if (draft.size() < (size_t) n_draft_min) {
158158
draft.clear();
159159
}
160160

0 commit comments

Comments
 (0)