Skip to content

llama : add llama_lora_adapter_clear - #8653

Merged
ngxson merged 1 commit into
ggml-org:masterfrom
ngxson:xsn/llama_lora_adapter_clear
Jul 24, 2024
Merged

llama : add llama_lora_adapter_clear#8653
ngxson merged 1 commit into
ggml-org:masterfrom
ngxson:xsn/llama_lora_adapter_clear

Conversation

@ngxson

@ngxson ngxson commented Jul 23, 2024

Copy link
Copy Markdown
Collaborator

Ref discussion: #8636 (comment)

llama_lora_adapter_clear() can be used when user want to switch the adapter, but don't know which adapters are loaded into llama_context to be removed.

For simple task switching application, user can write their own code based on this function:

void switch_my_adapter(struct llama_context * ctx, struct llama_lora_adapter * adapter) {
  llama_lora_adapter_clear(ctx);
  llama_lora_adapter_set(ctx, adapter, 1.0);
}

@ngxson
ngxson requested a review from ggerganov July 23, 2024 17:45
@ngxson ngxson mentioned this pull request Jul 23, 2024
4 tasks
@zhipenghan

Copy link
Copy Markdown

Thank you for implementing this change. Now, users can manage adaptors outside of the library as if the existing adaptors were invisible.

@ngxson
ngxson merged commit b115105 into ggml-org:master Jul 24, 2024
@ngxson

ngxson commented Jul 24, 2024

Copy link
Copy Markdown
Collaborator Author

Oops sorry I didn't modify the merge commit message to specify module name

arthw pushed a commit to arthw/llama.cpp that referenced this pull request Jul 27, 2024
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
phibya pushed a commit to ziee-ai/llama.cpp that referenced this pull request May 29, 2026
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
fukuro-kun pushed a commit to fukuro-kun/fukuro-llama-cpp-turboquant that referenced this pull request Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants