Chat Template Processing Error with Orca AgentInstruct Dataset in Axolotl #2279
-
|
Dataset: microsoft/orca-agentinstruct-1M-v1 Problem Description: The below is my config file: import yaml yaml_string = """ load_in_8bit: true chat_template: llama3
sequence_len: 2048 adapter: lora
wandb_project: gradient_accumulation_steps: 2 train_on_inputs: false gradient_checkpointing: true warmup_steps: 1 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Hello! datasets:
- path: microsoft/orca-agentinstruct-1M-v1
type: chat_template
split: rag
- conversation_column: messages
+ field_messages: messages
message_field_role: role
message_field_content: contentWe don't have a I took a look at this split in particular. Their dataset is a bit weird. Instead of https://huggingface.co/datasets/microsoft/orca-agentinstruct-1M-v1/viewer/default/rag?row=0 You'll need to do a small patch to axolotl if you want to get this to work. axolotl/src/axolotl/prompt_strategies/chat_template.py Lines 431 to 433 in 8fb72cb Add this above the for loop if isinstance(prompt[self.messages], str):
parsed_messages = json.loads(prompt[self.messages])
else:
parsed_messages = prompt[self.messages]
assert isinstance(parsed_messages, list), f"Expected list, got {type(parsed_messages)}"
for message in parsed_messages:I would also recommend adding: datasets:
- path: ...
drop_system_message: trueto drop the system message as I notice a lot are empty (didn't check if all are empty) and would cause Axolotl to warn out of these empty turns. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the suggestions, it worked. |
Beta Was this translation helpful? Give feedback.
Hello!
datasets: - path: microsoft/orca-agentinstruct-1M-v1 type: chat_template split: rag - conversation_column: messages + field_messages: messages message_field_role: role message_field_content: contentWe don't have a
conversation_columnfield, it's calledfield_messages, although the default should work for this dataset.I took a look at this split in particular. Their dataset is a bit weird.
Instead of
messages: List[dict](list of conversation), it'smessages: str(stringified list).https://huggingface.co/datasets/microsoft/orca-agentinstruct-1M-v1/viewer/default/rag?row=0
You'll need to do a small patch to axolotl if you want to get this to work.
axolo…