summaryrefslogtreecommitdiff
path: root/finetuning.py
diff options
context:
space:
mode:
authorpks <pks@pks.rocks>2025-11-30 23:01:21 +0100
committerpks <pks@pks.rocks>2025-11-30 23:01:21 +0100
commit8ea0f677ae427f36453ff6be70bea553e8a95e31 (patch)
tree6abc57102d7f5bbcec1d5e847509c5cc62ee2e80 /finetuning.py
parentde93c258d3ac6816c9956210d911cdd628fd18db (diff)
WIP
Diffstat (limited to 'finetuning.py')
-rwxr-xr-xfinetuning.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/finetuning.py b/finetuning.py
index 853eb81..62f506c 100755
--- a/finetuning.py
+++ b/finetuning.py
@@ -32,8 +32,8 @@ def add_chat_text(example, processor):
return example
-def collate(batch, processor, max_length): # FIXME: Support batch_size > 1
- images = [i["image"] for i in batch]
+def collate(batch, processor, max_length):
+ images = [[i["image"]] for i in batch]
texts = [i["text"] for i in batch]
processor_output = processor(
text=texts,