We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 41c793f + 8520eb8 commit 656df1cCopy full SHA for 656df1c
finetune/data/tokenize.py
@@ -311,6 +311,10 @@ def tokenize_instruct(
311
is_first=msg_idx == first_user_idx,
312
system_prompt=sample.system_prompt,
313
)
314
+ if isinstance(curr_tokens, tuple):
315
+ # Versions of mistral_common>1.3.4 return a tuple of tokens (text), tokens (image), spans (image)
316
+ curr_tokens = curr_tokens[0]
317
+
318
curr_masks = [False] * len(curr_tokens) # only predict bot answers
319
elif isinstance(message, ToolMessage):
320
curr_tokens = instruct_tokenizer.encode_tool_message(
0 commit comments