pytorch / torchtune

PyTorch native finetuning library
https://pytorch.org/torchtune/main/
BSD 3-Clause "New" or "Revised" License
4.39k stars 448 forks source link

Llama Vision PEFT #1937

Open pbontrager opened 4 weeks ago

pbontrager commented 4 weeks ago

Context

What is the purpose of this PR? Is it to

Please link to any issues this PR addresses. #1779

Changelog

What are the changes made in this PR?

Test plan

Please make sure to do each of the following if applicable to your PR. If you're unsure about any one of these just ask and we will happily help. We also have a contributing page for some guidance on contributing.

from peft import PeftModel
from transformers import MllamaForConditionalGeneration 

model_id = "meta-llama/Llama-3.2-11B-Vision-Instruct"
peft_model_dir = "/tmp/Llama-3.2-11B-Vision-Instruct/"

model = MllamaForConditionalGeneration.from_pretrained(model_id)
peft_model = PeftModel.from_pretrained(model, peft_model_dir)
pytorch-bot[bot] commented 4 weeks ago

:link: Helpful Links

:test_tube: See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/1937

Note: Links to docs will display an error until the docs builds have been completed.

:white_check_mark: No Failures

As of commit 8d960b5dc5a8fb78c92229b0b1c257cf33d47784 with merge base e1caa9f82fea24d728f9b244a9dd1957f5ed7465 (image): :green_heart: Looks good so far! There are no failures yet. :green_heart:

This comment was automatically generated by Dr. CI and updates every 15 minutes.