-
Notifications
You must be signed in to change notification settings - Fork 774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[post training] support more data format #717
base: main
Are you sure you want to change the base?
Conversation
"chat_sharegpt": ShareGPTToMessages, | ||
"chat_openai": OpenAIToMessages, | ||
} | ||
|
||
|
||
EXPECTED_DATASET_SCHEMA = DatasetSchema( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be helpful to use DataSchemaValidatorMixin for data schema validation https://github.com/meta-llama/llama-stack/blob/main/llama_stack/providers/utils/common/data_schema_validator.py#L65
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Synced offline: we can keep logic for validation in common utils, but there's no value in having them as mixin. Refactor in #720
|
||
from torchtune.models.llama3 import llama3_tokenizer, lora_llama3_8b | ||
from torchtune.models.llama3._tokenizer import Llama3Tokenizer | ||
from torchtune.models.llama3_2 import lora_llama3_2_3b | ||
from torchtune.modules.transforms import Transform | ||
|
||
|
||
class ColumnName(Enum): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this enum class should be merged with
class ColumnName(Enum): | |
input_query = "input_query" | |
expected_answer = "expected_answer" | |
chat_completion_input = "chat_completion_input" | |
completion_input = "completion_input" | |
generated_answer = "generated_answer" | |
context = "context" |
What does this PR do?
Support instruct format (with input and output columns) and chat format (multi turn conversations with conversations / messages column) in post training
We believe this is important for Llama stack post training APIs alpha release and a great enhancement to user experience
Test