llama : cont

ggml-ci
This commit is contained in:
Georgi Gerganov 2025-01-13 14:56:52 +02:00
parent f78b396ee7
commit e4550fbafc
No known key found for this signature in database
GPG key ID: 449E073F9DC10735
19 changed files with 128 additions and 79 deletions

View file

@ -342,7 +342,8 @@ static bool cb_eval(struct ggml_tensor * t, bool ask, void * user_data) {
}
static bool get_hidden_layers(llama_context * ctx, std::vector<llama_token> & tokens) {
llama_kv_cache_clear(ctx);
llama_kv_cache * kv = llama_get_kv_cache(ctx);
llama_kv_cache_clear(kv);
if (llama_decode(ctx, llama_batch_get_one(tokens.data(), tokens.size()))) {
fprintf(stderr, "%s : failed to eval\n", __func__);
return false;