diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index cb8f4ec8a..d38818982 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -40,8 +40,8 @@ endif() set(TARGET common) -add_library(${TARGET} OBJECT - base64.hpp +add_library(${TARGET} STATIC +base64.hpp common.h common.cpp sampling.h diff --git a/examples/llava/llava-cli.cpp b/examples/llava/llava-cli.cpp index 8ae5c4124..4b4136cc0 100644 --- a/examples/llava/llava-cli.cpp +++ b/examples/llava/llava-cli.cpp @@ -52,14 +52,13 @@ static void process_prompt(struct llava_context * ctx_llava, struct llava_image_ const int max_tgt_len = params->n_predict < 0 ? 256 : params->n_predict; // llava chat format is "USER: \n\nASSISTANT:" - // GG: are we sure that the should be a trailing whitespace at the end of this string? printf("evaluating system prompt\n"); - eval_string(ctx_llava->ctx_llama, "A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions.\nUSER: ", params->n_batch, &n_past); + eval_string(ctx_llava->ctx_llama, "A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions.\nUSER:", params->n_batch, &n_past, true); printf("evaluating image embed\n"); llava_eval_image_embed(ctx_llava->ctx_llama, image_embed, params->n_batch, &n_past); printf("evaluating prompt\n"); - eval_string(ctx_llava->ctx_llama, prompt, params->n_batch, &n_past); - eval_string(ctx_llava->ctx_llama, "\nASSISTANT:", params->n_batch, &n_past); + eval_string(ctx_llava->ctx_llama, prompt, params->n_batch, &n_past, false); + eval_string(ctx_llava->ctx_llama, "\nASSISTANT:", params->n_batch, &n_past, false); printf("awaiting response\n"); // generate the response