model: move load_hparams and load_tensors to per-model definition (#22004)

* git-friendly migration

* add build_graph

* nits

* exclude old code from build

* wip

* add llm_arch_model_i

* prepare downstream functions

* nits

* nits

* wip

* wip

* add back create_tensor_qkv

* fix files missing include

* enforce one llm_build per arch

* cmake: use glob

* missing model params

* nits

* wip

* wip (2)

* wip (3)

* test-llama-archs is happy

* improve switch case

* move more stuff into llm_arch_model_i

* fix downstream code

* nits

* nits (2)

* fix order

* llama_model_base

* LLAMA_LOAD_LOCALS

* small fix

* fix build errors

* auto

* rm migration script and ifdef
This commit is contained in:
Xuan-Son Nguyen
2026-05-04 12:36:59 +02:00
committed by GitHub
parent c84e6d6db5
commit 994118a183
129 changed files with 10667 additions and 8117 deletions
+6
View File
@@ -0,0 +1,6 @@
#include "models.h"
std::unique_ptr<llm_graph_context> llama_model_llama_embed::build_arch_graph(const llm_graph_params & params) const {
return std::make_unique<graph<true>>(*this, params);
}