torchtune icon indicating copy to clipboard operation
torchtune copied to clipboard

Lora Generate?

Open bdytx5 opened this issue 1 year ago • 1 comments

Does the generation script support using lora adapters after fine tuning?

bdytx5 avatar Apr 19 '24 19:04 bdytx5

Hi @bdytx5 thanks for the issue! If you fine-tune the model in torchtune, then prior to saving the final checkpoint torchtune will merge the adapter weights back with the original model weights for more efficient inference. So then you can just pass the final checkpoint directly to the generation script and it'll already have the adapter weights in there. If it helps you can also check our end-to-end tutorial which goes into this a bit.

ebsmothers avatar Apr 19 '24 21:04 ebsmothers

Thanks!

bdytx5 avatar Apr 21 '24 19:04 bdytx5

Closing this issue. @bdytx5 please feel free to open if this didn't help.

kartikayk avatar Apr 21 '24 20:04 kartikayk