Skip to main content
NVIDIA
Explore
Models
Skills
Blueprints
GPUs
Docs
Help Center
Getting Started
  1. Create and verify your account to unlock full access to NVIDIA NIM APIs.
ResourcesDeveloper ForumsContact Support
FAQs
    View All Playbooks
    View All Playbooks

    onboarding

    • Set Up Local Network Access
    • Open WebUI with Ollama

    data science

    • Single-cell RNA Sequencing
    • Portfolio Optimization
    • CUDA-X Data Science
    • Build Knowledge Graphs with txt2kg
    • Optimized JAX

    tools

    • DGX Dashboard
    • RAG Application in AI Workbench
    • Set up Tailscale on Your Spark
    • VS Code
    • Connect Three DGX Spark in a Ring Topology
    • Connect Multiple DGX Spark through a Switch

    fine tuning

    • FLUX.1 Dreambooth LoRA Fine-tuning
    • LLaMA Factory
    • Fine-tune with NeMo
    • Fine-tune with Pytorch
    • Unsloth on DGX Spark

    use case

    • Run Hermes Agent with a Local LLM
    • cuTile Kernels
    • CLI Coding Agent
    • Run NemoClaw with a Local LLM
    • 🦞 Set Up Example NemoClaw Agents 🦞
    • Live VLM WebUI
    • Install and Use Isaac Sim and Isaac Lab
    • Vibe Coding in VS Code
    • Build and Deploy a Multi-Agent Chatbot
    • Connect Two Sparks
    • NCCL for Multiple Sparks
    • Build a Video Search and Summarization (VSS) Agent
    • Spark & Reachy Photo Booth
    • Secure AI Agents with OpenShell
    • Run OpenClaw with a Local LLM

    inference

    • Generate Images and Videos with ComfyUI
    • Serve LLMs with vLLM
    • Speculative Decoding
    • Run models with llama.cpp on DGX Spark
    • Nemotron Model Family on DGX Spark
    • Serve LLMs with SGLang
    • TRT LLM for Inference
    • Quantize Models to NVFP4 with NVIDIA Model Optimizer
    • Multi-modal Inference
    • NIM on Spark
    • LM Studio on DGX Spark

    Unsloth on DGX Spark

    1 HR

    Optimized fine-tuning with Unsloth

    • DGX
    • Spark
    View on GitHub
    OverviewOverviewInstructionsInstructionsTroubleshootingTroubleshooting

    Step 1
    Verify prerequisites

    Confirm your NVIDIA Spark device has the required CUDA toolkit and GPU resources available.

    nvcc --version
    

    The output should show CUDA 13.0.

    nvidia-smi
    

    The output should show a summary of GPU information.

    Step 2
    Get the container image

    docker pull nvcr.io/nvidia/pytorch:25.11-py3
    

    Step 3
    Launch Docker

    docker run --gpus all --ulimit memlock=-1 -it --ulimit stack=67108864 --entrypoint /usr/bin/bash --rm nvcr.io/nvidia/pytorch:25.11-py3
    

    Step 4
    Install dependencies inside Docker

    pip install transformers peft hf_transfer "datasets==4.3.0" "trl==0.26.1"
    pip install --no-deps unsloth unsloth_zoo bitsandbytes
    

    Step 5
    Create Python test script

    Curl the test script here into the container.

    curl -O https://raw.githubusercontent.com/NVIDIA/dgx-spark-playbooks/refs/heads/main/nvidia/unsloth/assets/test_unsloth.py
    

    We will use this test script to validate the installation with a simple fine-tuning task.

    Step 6
    Run the validation test

    Execute the test script to verify Unsloth is working correctly.

    python test_unsloth.py
    

    Expected output in the terminal window:

    • "Unsloth: Will patch your computer to enable 2x faster free finetuning"
    • Training progress bars showing loss decreasing over 60 steps
    • Final training metrics showing completion

    Step 7
    Next steps

    Test with your own model and dataset by updating the test_unsloth.py file:

    # Replace line 32 with your model choice
    model_name = "unsloth/Meta-Llama-3.1-8B-bnb-4bit"
    
    # Load your custom dataset in line 8
    dataset = load_dataset("your_dataset_name")
    
    # Adjust training parameter args at line 61
    per_device_train_batch_size = 4
    max_steps = 1000
    

    Visit https://github.com/unslothai/unsloth/wiki for advanced usage instructions, including:

    • Saving models in GGUF format for vLLM
    • Continued training from checkpoints
    • Using custom chat templates
    • Running evaluation loops

    Resources

    • Unsloth Documentation
    • DGX Spark Documentation
    • DGX Spark Forum
    • DGX Spark User Performance Guide
    Terms of Use
    Privacy Policy
    Your Privacy Choices
    Contact

    Copyright © 2026 NVIDIA Corporation