Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add merge-lora arg for model id #2788

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

drbh
Copy link
Collaborator

@drbh drbh commented Nov 29, 2024

This PR fixes an issue when loading a lora adapter via --model-id and not --lora-adapters.

context
Prior to multi lora, if an adapter was specified as the model id, TGI would automatically merge the base model with the adapter weights and resave the merged model under the adapter id. Multi-lora requires the weights to be unmerged - so it can dynamically apply the adapter at runtime. If the adapter is mutated/merged than it no longer can be used with multi-lora. Due to this fact, merging by default was disabled with multi lora. In order to merge weights a --merge-lora flag must be used when calling download-weights. This PR removes that requirement and will automatically merge the weights if no adapters are supplies. NOTE*** once merged the adapter will no longer be useable with mutli-lora (and you'll need to redownload the adapter only)

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.

1 participant