End-to-End (small) LLM Fine-tuning Tutorial (from data to model to live demo) | On DGX Spark @mrdbourke
End-to-End (small) LLM Fine-tuning Tutorial (from data to model to live demo) | On DGX Spark  @mrdbourke
Uploaded January 2026 | Updated November 2026, 3 hours ago
In this video we fully fine-tune Google's Gemma 3 270M Small Language Model to do structured data extraction.

Because the Gemma 3 270M is quite small in world of LLMs, we're able to do all of the training locally on a NVIDIA DGX Spark (see here for more: nvda.ws/4iQXZU4).

The code should also run in Google Colab.

If you have any issues, please let me know in a comment.

Links:
Google Colab Notebook - colab.research.google.com/drive/1hV6Gcz8vBRS9t0bYkBp6W1ne_yqG6mJx?usp=sharing
Learn Hugging Face Book Version - learnhuggingface.com/notebooks/hugging_face_llm_full_fine_tune_tutorial
Dataset - huggingface.co/datasets/mrdbourke/FoodExtract-1k
Base model (Gemma 3 270M) - huggingface.co/google/gemma-3-270m-it
Demo - huggingface.co/spaces/mrdbourke/FoodExtract-v1

Past livestreams (where we coded the notebook from scratch):
Part 1 (loading the model and fine-tuning it) - youtube.com/live/M32fJdG3D_A?feature=share
Part 2 (sharing our model and creating a demo) - youtube.com/live/zt8t-xT26rA?feature=share

Courses I teach:
Learn AI/ML (beginner-friendly course) - dbourke.link/ZTMMLcourse
Learn Hugging Face - dbourke.link/ZTMHuggingFace
Learn TensorFlow - dbourke.link/ZTMTFcourse
Learn PyTorch - dbourke.link/ZTMPyTorch

Connect elsewhere:
Download Nutrify (my startup) - apple.co/4ahM7Wc
My website - mrdbourke.com
X/Twitter - twitter.com/mrdbourke
LinkedIn - linkedin.com/in/mrdbourke
Get email updates on my work - dbourke.link/newsletter
Read my novel Charlie Walks - charliewalks.com

Timestamps:
00:00 Welcome to the Machine Learning Cooking Show
00:57 Why Fine-Tune Your Own Model?
02:47 Ingredients and Preparation
05:45 Understanding the Task and Data
18:27 Formatting Data for the Model
20:41 Testing the Base Model
30:29 Model Fine-Tuning
31:08 Testing the Model with Sample Data
32:26 Setting Up Supervised Fine-Tuning
34:42 Training the Model Locally
36:38 Evaluating Model Performance
42:55 Uploading the Model to Hugging Face Hub
47:02 Creating a Demo with Gradio
56:08 Speeding Up Inference with Batch Processing
58:11 Next Steps and Conclusion
End-to-End (small) LLM Fine-tuning Tutorial (from data to model to live demo) | On DGX SparkReplicating Airbnbs Machine Learning Powered Amenity Detection Project | Code Walkthrough (live)The future will not be supervised... | Machine Learning Monthly July 2020Coronavirus Self-Isolation 10-minute Lower Body Bodyweight Workout (follow along)Build muscle and stay fuller for longer: protein and fibre #food #lunch #healthyrecipesAI makes you an artist + Teslas self-driving car updates | Machine Learning Monthly August 2021Nutrify AI Grant Batch 4 application live demo video (rejected)Two things Im doing wrong (running an online business)Results from 18-hours of training a machine learning model | Airbnb Amenity Detection 7Using genetic algorithms to manipulate DNA (experiment)Strong butt = good butt | 10-minute Glute Activating Workout (follow along)Deep Learning’s Most Important Ideas | Machine Learning Monthly November 2020
Daniel Bourke |

End-to-End (small) LLM Fine-tuning Tutorial (from data to model to live demo) | On DGX Spark

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER