Skip to content
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

feat: add support for multiple column shareGPT #1161

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Erland366
Copy link

@Erland366 Erland366 commented Oct 21, 2024

Given this problem from user on discord : https://discord.com/channels/1179035537009545276/1297912272596897833

I am thinking maybe we can support multiple column shareGPT by convert the multiple column into JSON string. Later, we can parse it back to Python so user can retrieve the result. The function behavior will not change at all if user only give one column

Here's the example :

image

Notice in this one column example, we do not use any JSON format here (behavior unchanged)

image
image

I also created parse_multicolumn_output so the user can immediately take the output into dictionary (JSON). Because we need to cut the .eos_token and the generation_prompt (the one that tokenizer add if we use add_generation_prompt=True) before we can eval

Here's also the whole colab example which is using Titanic Kaggle dataset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant