Repository navigation
Studio: keep AI Assist label names and system prompt when the dataset format is Alpaca - #11597
Merged
Lyxot merged 4 commits intoSep 23, 2026
Merged
Conversation
… format is Alpaca
Member
|
Confirmed that main's Alpaca mapping in dataset_utils.py drops the AI Assist system prompt and label names, and blanks a 0 label, so Alpaca training data comes out wrong. Will get this reviewed. |
_extract_column_value returned a raw int for single-element list cells, so the ChatML AI Assist mapping crashed on columns like [[0], [1, 2]]. Each scalar and list element now goes through cell_text before label lookup, which also blanks None cells and lets the Alpaca mapping drop its extra cell_text wrapper.
Collaborator
|
Pushed 12bb473 on top of this PR:
|
Collaborator
|
Staging run for head
|
shaojun
pushed a commit
to shaojun/unsloth
that referenced
this pull request
Sep 29, 2026
… format is Alpaca (unslothai#11597) * Studio: keep AI Assist label names and system prompt when the dataset format is Alpaca * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Map each label in a list cell to its AI Assist name * fix(studio): render every mapped cell as text before label lookup _extract_column_value returned a raw int for single-element list cells, so the ChatML AI Assist mapping crashed on columns like [[0], [1, 2]]. Each scalar and list element now goes through cell_text before label lookup, which also blanks None cells and lets the Alpaca mapping drop its extra cell_text wrapper. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Lyxot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the Alpaca format, the label names (0 to negative, 1 to positive) and the system prompt that AI Assist suggests are lost. With label names the mapping fails and training stops with "Chat template failed on all rows". With only a system prompt, training goes ahead without it and nothing tells you.
Alpaca mapping now handles these like the default format does. Label numbers become their names and the system prompt is added at the start of the instruction. Columns that share a role are joined instead of dropped, and a label of 0 no longer shows up blank.