unsloth/studio/backend/models
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
..
.gitkeep fix: restore models directory files deleted during restructure 2026-02-02 19:36:30 +00:00
__init__.py Add AGPL-3.0 SPDX headers to all source files 2026-03-09 20:17:45 +00:00
auth.py Add AGPL-3.0 SPDX headers to all source files 2026-03-09 20:17:45 +00:00
data_recipe.py Add AGPL-3.0 SPDX headers to all source files 2026-03-09 20:17:45 +00:00
datasets.py feat: Dataset Conversion Advisor — multi-pass LLM for non-conversational datasets 2026-03-10 15:39:56 +00:00
export.py Add AGPL-3.0 SPDX headers to all source files 2026-03-09 20:17:45 +00:00
inference.py Add AGPL-3.0 SPDX headers to all source files 2026-03-09 20:17:45 +00:00
models.py Add AGPL-3.0 SPDX headers to all source files 2026-03-09 20:17:45 +00:00
responses.py Add AGPL-3.0 SPDX headers to all source files 2026-03-09 20:17:45 +00:00
training.py feat: Dataset Conversion Advisor — multi-pass LLM for non-conversational datasets 2026-03-10 15:39:56 +00:00
users.py Add AGPL-3.0 SPDX headers to all source files 2026-03-09 20:17:45 +00:00