Lila’s Hamster Snack AI Dream
Lila’s bedroom was exactly the kind of place you’d expect a 10-year-old coding nerd who loved hamsters to have: walls plastered with glow-in-the-dark star stickers, a desk stacked half a foot high with dog-eared animal fact books, half-finished Lego castles, and a jar of sunflower seeds that Mochi, her fluffy cream-colored dwarf hamster, kept stealing from when she wasn’t looking. The only thing that didn’t fit the chaotic, cozy vibe was the dented silver tablet sitting in the corner of the desk, its screen cracked in the top right corner from the time Lila had tripped over her own backpack while rushing to show Mochi a new hamster trick video last month. It was the first tablet she’d ever gotten, a hand-me-down from her mom’s old work laptop, and even though it was slow and the battery only lasted an hour if she used the camera, Lila refused to replace it. All her favorite photos of Mochi learning to run through a cardboard maze, all her coding club project notes, and the 47 videos she’d taken of Mochi stuffing her cheeks with sunflower seeds were saved on it, and no new tablet could ever replace that. [插图:Lila的书桌全貌,Mochi的粉色跑轮在笼子里呼呼转,书桌上摆着半块啃过的胡萝卜干]
Last Tuesday, Lila had made the mistake of leaving a half-eaten bag of chocolate chip cookies on her desk while she ran to the bathroom. By the time she came back, Mochi had chewed a hole through the bag and was covered in crumbs, wiggling her little pink nose like she had no idea she’d done anything wrong. Lila had panicked, grabbed Mochi, and rushed to her laptop to Google “can hamsters eat chocolate?” The answer had made her stomach drop: chocolate was toxic to hamsters, even in tiny amounts, and could cause heart problems or even death[^1]. Mochi had been fine, just a little hyper from the sugar, but Lila had spent the whole night watching her sleep, vowing she’d never let that happen again. She’d spent the next three hours scrolling through hamster care forums, reading lists of safe and dangerous foods, and by the time she fell asleep, she’d had an idea: what if she could build a little AI that could look at any food and tell her, in one second, if it was safe for Mochi to eat?
The next day at Bits & Bops Coding Club, the weekly after-school group Lila had joined six months prior, she’d bounced in her seat so much Ms. Rivera, the club’s leader and a former software engineer, had to ask if she’d had too much soda. Bits & Bops met in the school library’s computer lab every Wednesday, and Lila’s team that week included Mia, the club’s official artist who drew all their project logos, and Javi, who was obsessed with building tiny robots that could fetch socks. Mia had bright pink pigtails and always had a glitter pen behind her ear, while Javi wore a beat-up baseball cap with a robot patch sewn on the front, and Ms. Rivera had shimmery purple hair and wore earrings printed with binary code that she said spelled “I <3 Bugs” (though Lila was pretty sure it spelled “I <3 Hugs” and Ms. Rivera was just joking). When Lila told them about Mochi’s cookie incident and her idea for a “hamster snack safety AI,” Mia had immediately started sketching a cute little hamster icon with a checkmark on its cheek, and Javi had offered to 3D-print a little stand for the tablet to sit next to Mochi’s cage.
Ms. Rivera had told them about Google’s Teachable Machine, a free online tool that lets anyone train a simple AI model without writing a single line of complicated code[^2]. All you had to do was upload pictures of the things you wanted the AI to recognize, label them, and the tool would do the rest. Lila had spent the next three afternoons after school collecting pictures: she’d taken 120 photos of safe hamster snacks (sunflower seeds, carrot treats, plain hamster mix, small pieces of apple) and 80 photos of dangerous ones (chocolate, potato chips, grapes, onions, candy) from her own kitchen, plus extra pictures she’d found online of foods people often mistakenly gave hamsters. She’d even taken 30 extra photos of Mochi’s favorite sunflower seeds from different angles, in different lighting, to help the model learn what they looked like no matter what. She’d labeled the safe ones “SAFE” and the dangerous ones “DANGEROUS,” clicked “Train Model,” and waited 10 minutes while the tool sorted through all 200 pictures to learn the differences between them. The little progress bar on the screen had filled up slowly, and Lila had held her breath the whole time, Mochi curled up asleep in her backpack next to her chair.
The first test was on the club’s laptop, a fancy new one with a touchscreen that the school had gotten the year before. Lila held up a sunflower seed to the webcam, and a second later, a big green box popped up on the screen that said “✅ SAFE! Hamster’s favorite!” Mia had squealed so loud the librarian had come over to shush them. They’d tested a piece of chocolate chip next, and the box had turned bright red with a warning sign that said “❌ DANGEROUS! Never give to hamsters!” Javi had even tried holding up a picture of his mom’s secret chocolate stash he’d taken from the pantry, and the AI had correctly flagged it as dangerous, which made everyone laugh so hard they had to wipe their eyes. Ms. Rivera had clapped and said it was the best project the club had ever had, and Lila had left that day floating on air, already planning how she was going to set the tablet up next to Mochi’s cage that night. She’d even made a little sign that said “Mochi’s Snack Helper” to tape to the back of the tablet.
But when Lila got home and followed the instructions to download the model to her old tablet, everything went wrong. The model file was 120
But when Lila got home and followed the instructions to download the model to her old tablet, everything went wrong. The model file was 120 megabytes—about the size of 30 of her favorite hamster videos—and when she clicked “download,” the progress bar inched forward so slowly she could count the pixels moving. Halfway through, a pop-up blinked on the screen: *Storage full. Need 1.1GB free space to install.* Lila’s stomach dropped. She’d had this tablet since she was 8, and over the years she’d saved every single photo of Mochi (all 327 of them, from the day she’d brought Mochi home in a tiny cardboard carrier to last week’s video of Mochi stealing a Cheerio out of her cereal bowl), all her coding club scratch notes, 12 episodes of the cartoon *Hamster Heroes* she’d downloaded for sick days, and three different drawing apps she used to make comics about Mochi’s adventures. All that added up to almost all of the tablet’s 32GB of storage, leaving only 380 megabytes free—less than a third of what the model needed.
[插图:Lila蹲在书桌前,眉头皱成一团,盯着平板上跳出来的“存储空间不足”提示框,Mochi扒在平板边缘,小爪子碰着屏幕,书桌上散着瓜子壳和半块啃过的胡萝卜干]
She bit her lip and started deleting files one by one, her fingers flying across the cracked screen. First went the old homework folders from third grade, then the three failed attempts at a digital painting app she’d downloaded last month (it kept crashing every time she tried to draw Mochi’s fluffy fur), then two episodes of *Hamster Heroes* she’d already watched three times. By the time she’d freed up 1.2GB, her forehead was dotted with sweat, and she’d had to pause to wipe a smudge of chocolate off the screen from where Mochi had leaned against it earlier. She hit “download” again, and this time the progress bar moved fast, filling up all the way to 100% in two minutes. She whooped so loud Mochi, who was napping in her open backpack, stirred and peeked out her little pink nose.
Following the Teachable Machine tutorial, Lila plugged the tablet into its charger (the battery only lasted 45 minutes unplugged; last week she’d been watching *Hamster Heroes* and it had died right at the best part, when the hero hamster outsmarted the cat) and clicked “Run Model on Device.” The screen flickered for a second, then loaded a blank white page with a tiny camera icon in the corner. “Yes!” Lila whisp