How AI Learns: Training Your Own Model
What if you could teach a computer its personality? Today, you're not just a user of AI... you're a trainer. Let's build something amazing. ๐
Teaching an AI a New Trick
Think of a big AI model like a super-smart puppy. It knows some basic commands, but what if you want to teach it a super-specific, awesome new trick, like how to skateboard? ๐น This is called training (or "fine-tuning" for pros), and it's like teaching a pet! You have to:
1. Show examples
(Show the puppy a skateboard)
2. Give feedback
(Give a treat when it tries)
3. Repeat!
(Soon it's a skate pro!)
Today, you're the trainer!
Train an AI to be Your Cleanup Helper!
Let's use a real tool from Google called Teachable Machine. It lets you train an AI right in your browser, no code needed! Your mission: train it to recognize a "clean desk" vs. a "messy desk". Or try "LEGOs in the bin" vs "LEGOs on the floor"! It's a hilarious and super useful way to understand how training works.
- Click the link below to open Teachable Machine (it's totally free and requires no account!).
- Create two classes. Name one "Clean Desk" and the other "Messy Desk".
- Use your webcam to record at least 20 pictures for each class. Move things around!
- Click the "Train Model" button and watch the magic happen.
- Test your AI! Does it know when you need to tidy up?
๐จโ๐ฉโ๐ง Parent Corner
This is a fantastic "Aha!" moment to share. Try the Teachable Machine project together! After training it on the desk, ask your child what else they could train it on. "Happy face vs. Sad face"? "A specific toy"? This connects the abstract idea of "AI training" to the real, physical world.
๐จ Welcome to Bias Busters HQ! ๐จ
An AI is only as smart as the data it learns from. If the data is weird or incomplete, the AI gets weird too! Your first mission: help a very grumpy robot.
Help Train the Grumpy Robot!
This robot only knows about pizza. Drag the items to the correct training boxes to show it what pizza stuff is and what isn't!
โ Things I Like (Pizza Stuff)
โ Things I Don't Know (Not Pizza)
๐ค Bias Busters Mission: Fix the Grumpy Robot!
You've built a robot, but you only trained it on data about pizza. ๐ Now it's very grumpy and has a biasโit will ONLY talk about pizza. Which of these questions will it actually answer?
"I only talk about pizza. Don't bother me with anything else."
๐ฎ Deep Dive: How an AI "Thinks"
It feels like magic, but what's really happening inside the AI's "brain"? It's not learning facts like you do in school. Instead, think of it like a giant game of "Guess the Next Word."
๐ค My 'brain' is just a super-guesser! I don't *know* things like you do. I just predict what word you want to see next based on a bazillion sentences I've read!
When you train it, you're adjusting millions of tiny digital knobs that help it make better guesses. But sometimes, it guesses wrong in a funny way, making up facts that sound real but aren't. That's called a "hallucination." That's why the #1 rule is to always Fact-Check First!
You just saw why the Grumpy Robot was brokenโits training data was too small! Your next mission is to fix that. Let's build a better, funnier dataset.
Build a Dataset with Mad Libs!
An AI is only as good as its data. Your challenge is to create a mini-dataset to teach an AI a new personality. Instead of typing it all out, let's play a game!
โ Dataset Created!
Run Your First Fine-Tune Job
โจ Pro-Tip: Why this format is an industry secret
Remember the 'prompt' and 'completion' pairs you made in the Mad Libs challenge? That simple `instruction`/`response` format is the fundamental structure used to fine-tune massive models like Llama or GPT. By creating that little text file, you were doing the exact same kind of work as AI engineers at the biggest tech companies in the world! You're not just playing a game; you're learning the secret recipe for custom AI.
Ready for a real fine-tuning mission? We've set up a project for you in a tool called Google Colab. Your goal: transform a generic AI into a Joke Bot. You'll use a real Python script to fine-tune a small model on a dataset of jokes and watch it learn to be funny. This isn't a simulationโit's how real AI products get built.
This is a real tool used by AI engineers at places like Google and Tesla. Click the link, read the instructions inside the notebook, and run the code cells one by one to watch the magic happen.
Open the Fine-Tuning Colab Notebook โ๐จโ๐ฉโ๐ง Parent Corner
The Advanced Challenge uses a tool called Google Colab, which is a standard in the AI industry. It will require a Google account to use, so this is a great step to supervise and explore together. It looks like a complex code file, but it's designed to be run step-by-step by clicking the "play" button on each block of code.
๐ Learn More
- ๐ต๏ธโโ๏ธ Intel Mission: Go to the Hugging Face Model Card for `distilbert-base-uncased`. This is the "baseball card" for a real AI model. Your mission is to find and report back on three pieces of intel: 1. What is its 'base model'? 2. How many 'parameters' does it have? 3. What is one warning listed in the 'Biases & Limitations' section?
- Google Colab: The free tool you used in the advanced challenge. It lets you run powerful AI code right in your browser.
Build and Train Your Custom AI
You've created a personality and seen how the pros train their models. Now it's time to put it all together and build a real, custom AI. This is a real portfolio piece!
- Build a Real Dataset: Expand on your Mad Libs game. Create a text file with at least 10 unique `prompt`/`completion` pairs for your chosen persona. Make them funny and interesting!
- Fork & Modify the Colab: Make your own copy of the "Joke Bot" Colab notebook from the Advanced Challenge. Find the section with the training data and replace it with your new 10-pair dataset.
- Train & Share Your Custom AI: Run the notebook to fine-tune the model on *your* data. You have now built a unique, shareable AI with a custom personality. Congratulations, builder!