Unsloth Zoo

2026.4.6 · active · verified Sun Apr 12

Unsloth Zoo provides a collection of plug-and-play utilities and example modules designed to work with the Unsloth library for efficient LLM fine-tuning. It includes components for dataset loading, SFT (Supervised Fine-Tuning) trainers, tokenizer utilities, and metrics. As of version 2026.4.6, it aims to simplify and standardize common LLM fine-tuning workflows built on Unsloth, with frequent updates aligning with Unsloth's development.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to load a dataset using Unsloth Zoo's data loading utilities. It configures a dataset using a `DatasetConfig` and then loads it with `load_dataset`, showcasing a common first step in preparing data for fine-tuning.

from unsloth_zoo.data.configs import DatasetConfig
from unsloth_zoo.data.loader import load_dataset

# Configure a dataset, e.g., using a predefined template
config = DatasetConfig(dataset_name="alpaca_template")

# Load the dataset
dataset = load_dataset(config)

print(f"Loaded dataset with {len(dataset)} examples.")
if len(dataset) > 0:
    print("First example:")
    print(dataset[0])

view raw JSON →