You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// llava chat format is "<system_prompt>USER: <image_embeddings>\n<textual_prompt>\nASSISTANT:"
58
55
// GG: are we sure that the should be a trailing whitespace at the end of this string?
56
+
printf("evaluating system prompt\n");
59
57
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);
// make sure that the correct mmproj was used, i.e., compare apples to apples
43
+
int n_llama_embd = llama_n_embd(llama_get_model(ctx_llama));
44
+
auto n_image_embd = clip_n_mmproj_embd(ctx_clip);
45
+
if (n_image_embd != n_llama_embd) {
46
+
printf("%s: embedding dim of the multimodal projector (%d) is not equal to that of LLaMA (%d). Make sure that you use the correct mmproj file.\n", __func__, n_image_embd, n_llama_embd);
47
+
returnfalse;
48
+
}
49
+
returntrue;
50
+
}
51
+
52
+
staticboolllava_image_embed_make_with_clip_img(clip_ctx * ctx_clip, int n_threads, const clip_image_u8 * img, float ** image_embd_out, int * n_img_pos_out) {
// make sure that the correct mmproj was used, i.e., compare apples to apples
59
-
int n_llama_embd = llama_n_embd(llama_get_model(ctx_llama));
60
-
if (n_image_embd != n_llama_embd) {
61
-
printf("%s: embedding dim of the multimodal projector (%d) is not equal to that of LLaMA (%d). Make sure that you use the correct mmproj file.\n", __func__, n_image_embd, n_llama_embd);
0 commit comments