Explain it
Part 5 of 5. You trained a model, raced it against a word list, and gave both of them words and languages they had never seen. Now work out why each one did what it did, then write it up on your model card, just below.
Here is what both of them learned from. The requests come from MASSIVE, a collection of about one million requests to a voice assistant in 51 languages, published by Amazon in 2022: professional translators turned the same English requests into 50 other languages. The model and the word list learned from 1,680 of them, 420 in each of English, French, German and Spanish. Nobody gave the model a single word of any language. Everything it knows, it worked out from those examples, letter by letter.
Answer these, on paper or out loud with a partner:
- The word list beat the model on ordinary requests. Why is a list of the words a language uses all the time so hard to beat?
- The model sometimes named the right language for a word it had never seen, like danke or gracias, and the word list could not. What could the model have learned that the list does not have?
- A help desk uses a model like this to send each message to someone who reads that language. What happens to a message in Portuguese? Who waits longer for help, and would they ever find out why?
- People speak about 7,000 languages. MASSIVE has 51, and this model knows 4. Who decided which four, and what would it take to add the languages spoken at your school?
- When would you use a word list, when a model, and when both together?
- Think of a problem at your school or in your town that a model like this could help with. What examples would it learn from? Who would label them, and who might it get wrong?
What to take away: a model learns by guessing and being corrected, it is graded on examples it has never seen, and it only knows what its examples cover. Sometimes a simple rule does the job better. And a model that has never seen your language still answers, without telling you it is guessing.
The guessing game
This is what happened while you watched the score climb. The model is a list of 402,048 numbers, called parameters, and they start out random. Training is a guessing game: the model reads a request one letter at a time and guesses its language, then it is shown the real answer, and every one of its numbers is nudged slightly toward the answer that would have been right.
One step is 32 requests, and a run is 1,500 steps, so it makes 48,000 guesses over its 1,680 training requests and sees each one about 29 times. It never sees a dictionary or a grammar book. Whatever it knows about endings like -ción or -ung, or little words like le and der, it found in those examples.
The held-out score
Before training started, 480 requests, 120 in each language, were set aside, and the model never trains on them. The studio tests it on 240 of them, like an exam made of questions it has never seen. Guessing among four languages would score 25 percent.
In our two measured runs the model was already right on 85 and 83 percent of the 240 within the first sixth of its training, and it finished with 217 and 222 right, 90 and 93 percent. The word list gets 231, 96 percent. With every accent typed away, the model got 207 and 213 right and the word list 226, so the list held up better there too. On the four greetings in part 4, the model named the right language for all four in one run and three in the other, usually only about half sure, while the word list, which knows none of them, called all four English and so only got thanks right.
After the hour
Teach it a fifth language. The model only knows the languages in its examples, so give it more. On the text classifier page you can train a model on examples you write yourself: requests in a language from your home or your class alongside requests in one of the four, at least 10 of each. With about 30 of each, a model this small mostly memorizes; it starts to do well on examples it has never seen at around 200.
Try another job. The same studio trains a spam filter and a clickbait detector, and tests each one on examples it never saw.
People who do this for a living. Translators and localization teams adapt apps and voice assistants to new languages, which is how MASSIVE was made. Data annotators label examples like these 1,680 requests. Machine learning engineers train models and test them on examples held back, as you did, and decide, as you did in part 5, when a simple rule is the better tool.
Learn more. Day of AI, from MIT, has free AI lessons for every grade. Elements of AI, from the University of Helsinki, is a free online course for older students and adults.
Questions
How long does it take?
About an hour for all five parts. The training itself took about three minutes in our two measured runs on a recent Mac (186 and 184 seconds). Older and low-power devices take longer, and about ten seconds into a run the bar at the top of the studio shows how long that device has left.
What do I need?
A laptop, Chromebook or tablet with a current browser: Chrome or Edge 113 or later, Safari 26, or Firefox 141 or later on Windows. Those can train on the device's graphics chip, and a small badge at the top of the studio says GPU once training starts. If it says CPU, it trains on the processor, which is slower: a full run took about 3 minutes on a fast laptop processor in our test, and takes longer on devices with fewer or slower cores. On a slow device the studio gives the run 750 or 500 steps instead of 1,500 and says so under the progress bar; those shorter runs scored about as well in our tests. If the bar shows more time than you have, let it reach about step 300, press Pause, and carry on with part 3 in the Generate tab: in our two runs the model was already right on 83 and 85 percent within the first sixth of its training.
Do I need an account?
No. The model trains, answers and stays inside your browser tab. Nothing you type is sent anywhere, and the site never asks for your name or email address. Accounts exist only for saving models online and are for people 16 and older; this activity does not use one. The privacy policy says what is recorded about a visit.
Why does it only know four languages?
Because it only ever saw four. It was built to send each request to one of four desks, so it was trained on English, French, German and Spanish requests and nothing else. It cannot say "none of these": whatever you type, it picks one of the four.
Is this real AI, like ChatGPT?
It is the same kind of model at a tiny scale: a GPT, a transformer that reads text in order. Yours has 402,048 parameters and learned one job from 1,680 requests. GPT-3, published in 2020, has 175 billion parameters, about 435,000 times as many, and learned from 570 GB of text. Both learned the same way: by guessing and being corrected.
Can I keep the model I trained?
Yes. It is saved in this browser automatically, and the Runs tab lists it so you can open it again later on the same device. Download saves it as a file you can load back into the studio.
How do I hand in my model card?
Press Print or save as PDF to print it, or to save it as a file from the print window, or press Copy as text and paste it into a document or your class's assignment. The site never receives it. It stays in this tab until you close the tab, so a reload will not wipe it.
Can I do this with a keyboard or a screen reader?
Yes. Every control works from the keyboard and shows a focus outline. When training starts or finishes, focus moves to the next control you need. A screen reader announces the start of the run, a progress update every tenth of the way with the model's latest score, the model's answer to each request you type, the word list's answers, and the final score.
Something is not working. Who can help?
Email hello@gonano.tech and say what happened, which device and browser you are using, and whether the badge at the top of the studio says GPU or CPU.
I am a teacher. Is there a lesson plan?
Yes. The language lesson is this activity as one teacher-led class period, with a warm-up to run before students open a device, discussion questions, an optional second period, and what to check on your classroom's devices the day before. At the top of the plan you can copy this activity's link for your students or assign it in Google Classroom.