llama: refactoring: move model to class member of llm_graph_context (#31733)

This commit is contained in:
Xuan-Son Nguyen authored and GitHub committed 2026-11-05 15:41:03 +01:00
1 parent 468fde90e8
commit e0f96a1a12
174 files changed
+663 -743

No files matched your search

+3 -3
View File
@@ -58,14 +58,14 @@ void llama_model_phi3::load_arch_tensors(llama_model_loader &) {
std::unique_ptr<llm_graph_context> llama_model_phi3::build_arch_graph(const llm_graph_params & params) const {
if (hparams.swa_type != LLAMA_SWA_TYPE_NONE) {
return std::make_unique<graph<true>> (*this, params);
return std::make_unique<graph<true>> (params);
} else {
return std::make_unique<graph<false>>(*this, params);
return std::make_unique<graph<false>>(params);
}
}
template<bool iswa>
llama_model_phi3::graph<iswa>::graph(const llama_model & model, const llm_graph_params & params) : llm_graph_context(params) {
llama_model_phi3::graph<iswa>::graph(const llm_graph_params & params) : llm_graph_context(params) {
const int64_t n_embd_head = hparams.n_embd_head_v();
GGML_ASSERT(n_embd_head == hparams.n_embd_head_k());