Skip to content

lora: count lora nodes in graph_max_nodes#18469

Merged
ngxson merged 8 commits intomasterfrom
xsn/lora_n_nodes
Dec 30, 2025
Merged

lora: count lora nodes in graph_max_nodes#18469
ngxson merged 8 commits intomasterfrom
xsn/lora_n_nodes

Conversation

@ngxson
Copy link
Contributor

@ngxson ngxson commented Dec 29, 2025

Fix #18050

Fix #18466

Supersede #18375

Copy link
Member

@CISC CISC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable.

Copy link
Member

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, this note does not seem correct, so we should remove it:

llama.cpp/include/llama.h

Lines 632 to 634 in f14f4e4

// Manually free a LoRA adapter
// NOTE: loaded adapters will be free when the associated model is deleted
LLAMA_API void llama_adapter_lora_free(struct llama_adapter_lora * adapter);

@ngxson
Copy link
Contributor Author

ngxson commented Dec 30, 2025

Ah ok, llama_model_free does not automatically free the adapters associated with it. I will fix that in another PR.

@ngxson ngxson merged commit cd78e57 into master Dec 30, 2025
66 of 68 checks passed
srogmann pushed a commit to srogmann/llama.cpp that referenced this pull request Jan 1, 2026
* 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
@ggerganov ggerganov deleted the xsn/lora_n_nodes branch January 12, 2026 12:16
blime4 referenced this pull request in blime4/llama.cpp Feb 5, 2026
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants