Distribute and run LLMs with a single file.
C++ cross-platformggufllama-cpplocal-ailocal-inferencelocal-llmopen-source-aisingle-file-executablespeech-to-text
Support bos token in llava-cli
Justine Tunney9de5686d344d
diff --git a/llama.cpp/llava/llava-cli.cpp b/llama.cpp/llava/llava-cli.cppindex e30f8c01..8167e6de 100644--- a/llama.cpp/llava/llava-cli.cpp+++ b/llama.cpp/llava/llava-cli.cpp@@ -149,9 +149,10 @@ static void process_prompt(struct llava_context * ctx_llava, struct llava_image_int n_past = 0;const int max_tgt_len = params->n_predict < 0 ? 256 : params->n_predict;+ const bool add_bos = llama_should_add_bos_token(llama_get_model(ctx_llava->ctx_llama));// llava chat format is "<system_prompt>\nUSER:<image_embeddings>\n<textual_prompt>\nASSISTANT:"- 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);+ 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, add_bos);llava_eval_image_embed(ctx_llava->ctx_llama, image_embed, params->n_batch, &n_past);eval_string(ctx_llava->ctx_llama, (prompt + "\nASSISTANT:").c_str(), params->n_batch, &n_past, false);