llama : second attempt to refactor vision API

This commit is contained in:
Xuan Son Nguyen 2025-01-18 20:56:35 +01:00
parent 2a458d1a9d
commit 0a81051ae2
20 changed files with 695 additions and 145 deletions

View file

@ -6,6 +6,7 @@
#include "llama-model.h"
#include "llama-kv-cache.h"
#include "llama-adapter.h"
#include "llama-vision.h"
#include "ggml-cpp.h"
@ -107,6 +108,9 @@ struct llama_context {
struct ggml_tensor * inp_pos_bucket; // I32 [n_batch|n_kv, n_batch]
struct ggml_tensor * inp_embd_enc; // F32 [n_embd, n_outputs_enc]
struct ggml_tensor * inp_KQ_mask_cross; // F32 [n_outputs_enc, n_batch]
// vision
clip_context vctx;
};
// TODO: make these methods of llama_context