Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 0c3dad3

Browse files
committed
Update torchtune pin to Llama 3.2 Release
1 parent f7aef8a commit 0c3dad3

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

install/install_requirements.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ REQUIREMENTS_TO_INSTALL=(
9090
# Rely on the latest tochtune for flamingo support
9191
(
9292
set -x
93-
$PIP_EXECUTABLE install git+https://github.com/pytorch/torchtune.git@18efc81dda1c537bb7c25058ff059b4623ccff58
93+
$PIP_EXECUTABLE install git+https://github.com/pytorch/torchtune.git@d002d45e3ec700fa770d9dcc61b02c59e2507bf6
9494
)
9595

9696
if [[ -x "$(command -v nvidia-smi)" ]]; then

torchchat/usages/openai_api.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@
1717

1818
import torch
1919

20-
from torchtune.models.llama3_2_vision._convert_weights import padded_collate
21-
from torchtune.models.llama3_2_vision._model_builders import llama3_2_vision_transform
22-
2320
from PIL import Image
24-
from torchtune.data import Message
21+
22+
from torchtune.data import Message, padded_collate
23+
from torchtune.models.llama3_2_vision._model_builders import llama3_2_vision_transform
2524

2625
from torchchat.cli.download import is_model_downloaded, load_model_configs
2726
from torchchat.generate import Generator, GeneratorArgs
@@ -374,7 +373,9 @@ def chunked_completion(self, completion_request: CompletionRequest):
374373
images.append(Image.open(BytesIO(base64_decoded)))
375374
print("images:", len(images), flush=True)
376375
if len(images) > 0:
377-
transform = llama3_2_vision_transform(str(self.tokenizer_args.tokenizer_path))
376+
transform = llama3_2_vision_transform(
377+
str(self.tokenizer_args.tokenizer_path)
378+
)
378379
torchtune_messages = self._openai_messages_to_torchtune(
379380
completion_request.messages
380381
)

0 commit comments

Comments
 (0)