llama : re-enable manual LoRA adapter free (#19983)

* Re-enable manual LoRA adapter free

* Remove stale "all adapters must be loaded before context creation" stale comments
This commit is contained in:
Pop Flamingo
2026-03-18 12:03:26 +02:00
committed by GitHub
parent f4049ad735
commit 312cf03328
5 changed files with 19 additions and 12 deletions
+3 -1
View File
@@ -61,6 +61,8 @@ struct llama_adapter_lora_weight {
};
struct llama_adapter_lora {
llama_model * model = nullptr;
// map tensor name to lora_a_b
std::unordered_map<std::string, llama_adapter_lora_weight> ab_map;
@@ -75,7 +77,7 @@ struct llama_adapter_lora {
// activated lora (aLoRA)
std::vector<llama_token> alora_invocation_tokens;
llama_adapter_lora() = default;
explicit llama_adapter_lora(llama_model * model) : model(model) {}
~llama_adapter_lora() = default;
llama_adapter_lora_weight * get_weight(ggml_tensor * w);