lora: count lora nodes in graph_max_nodes (#18469)

* lora: count lora nodes in graph_max_nodes

* 3 nodes per weight

* 4 nodes

* keep track n_lora_nodes from llama_model

* fix assert

* rm redundant header

* common: load adapters before context creation

* use 6 nodes
This commit is contained in:
Xuan-Son Nguyen 2025-12-30 15:53:12 +01:00 committed by GitHub
parent c32fa21db8
commit cd78e57c3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 46 additions and 23 deletions

View file

@ -607,6 +607,8 @@ extern "C" {
//
// Load a LoRA adapter from file
// The adapter is valid as long as the associated model is not freed
// All adapters must be loaded before context creation
LLAMA_API struct llama_adapter_lora * llama_adapter_lora_init(
struct llama_model * model,
const char * path_lora);