unsloth/studio/backend/utils/datasets
Roland Tannous 202780c32c feat: Dataset Conversion Advisor — multi-pass LLM for non-conversational datasets
Non-conversational HF datasets (e.g. stanfordnlp/snli) were naively mapped
column→role, producing poor training results. The AI Assist button now runs
a 3-pass advisor using Qwen 7B that:
1. Fetches the HF dataset card/README to understand the dataset purpose
2. Classifies the dataset type and determines if conversion is needed
3. Generates a system prompt, user/assistant templates with {column}
   placeholders, and label mappings (e.g. 0→entailment)
4. Validates the conversion quality (score ≥7/10 required)

Architecture: advisor metadata flows as __-prefixed keys in
custom_format_mapping (e.g. __system_prompt, __user_template,
__assistant_template, __label_mapping). The existing _apply_user_mapping()
detects these keys and routes to template-based conversation construction.
No __ keys = existing simple mode (backwards compatible).

Backend: upgraded llm_assist.py (7B default, multi-pass advisor,
HF card fetching), extended API models, added _apply_template_mapping()
to dataset_utils.py.

Frontend: extended store with advisor state fields, wired AI Assist
to store templates/system prompt, inject __ metadata in training request,
show advisor notification banner in mapping card.
2026-03-10 15:39:56 +00:00
..
__init__.py feat: add ShareGPT+image VLM format support and improve image column detection 2026-03-10 01:27:36 +00:00
chat_templates.py Add AGPL-3.0 SPDX headers to all source files 2026-03-09 20:17:45 +00:00
data_collators.py Add AGPL-3.0 SPDX headers to all source files 2026-03-09 20:17:45 +00:00
dataset_utils.py feat: Dataset Conversion Advisor — multi-pass LLM for non-conversational datasets 2026-03-10 15:39:56 +00:00
format_conversion.py feat: add LLM-assisted dataset detection using ephemeral GGUF helper 2026-03-10 09:20:45 +00:00
format_detection.py fix: probe image column candidates when multiple exist 2026-03-10 01:38:33 +00:00
llm_assist.py feat: Dataset Conversion Advisor — multi-pass LLM for non-conversational datasets 2026-03-10 15:39:56 +00:00
model_mappings.py Add AGPL-3.0 SPDX headers to all source files 2026-03-09 20:17:45 +00:00
vlm_processing.py debug: switch to print() for subprocess visibility 2026-03-10 12:49:01 +00:00