Before the bell
You are responsible for all of this before the end of class.
- The discussion form in the I Do deck. All three sections. If you are here, this should be done.
- Your classwork. This form on the right. Section 1 before the exit ticket pops up; Section 2 past the floor.
- Today's Bench Basics activity: Check the Coach. It opens later in class and lives on slide 4 of this deck.
- The exit ticket. It opens 15 minutes before the bell and lives on the last slide of this deck.
The classwork form is not linked yet. Use Station View and write your answers in your lab notebook with the item labels.
Study Guide, Part 1
This reading explains how to write a study guide entry, lists the eight entries you write today, and works one example of today's bench.
How to Write an Entry
Each entry in your study guide has three parts, and the first part is simply the term itself. The second part is one sentence that says what the term means, written in your own words instead of copied from a passage. The third part is one example that you chose yourself, and it should not come from the slides or from today's passage. An example you found yourself shows that you can use the idea on something new, which is exactly what the exam will ask you to do.
Here is a sample entry for compression, an October term that is not on today's list. In my own words, compression makes a file smaller by storing the same information in fewer bytes. My example is a game update that downloads as a smaller file and is unpacked once it reaches my console.
Today you write eight entries, covering program, model, training, lossless, lossy, parameter file, token and prediction, and generating and retrieving. The last two entries each cover two words, so each sentence has to say how the two words connect or how they differ. Entries 1 to 4 go in CR 1 of the classwork form, and entries 5 to 8 go in CR 2. The entries are scored for completion in the weekly classwork grade.
The guide is for your own review before the final exam on Tuesday. Part A of the exam is closed notebook and closed Chromebook, and Part B allows only a pencil and the Java Quick Reference. That means you study from your guide before the exam, and you do not use it during the exam.
Before the Bench
Today's bench, B25 Check the Coach, works in four steps, in which you first predict what the code prints, then read what Code Coach said about it, then compare it with the real output, and finally decide who was right.
1int total = 25; 2int groups = 4; 3double each = total / groups; 4System.out.println(each);
6.0
Your prediction comes first, and it depends on the types. Both `total` and `groups` are `int` values, so `total / groups` is integer division, and 25 divided by 4 gives 6 with the remainder dropped. That 6 is then stored in a `double` box, which is why line 4 prints 6.0 instead of 6.25. Here is the part of Code Coach's saved answer about lines 3 and 4.
Line 3: Declares a double variable named `each` and stores the result of `25 / 4` in it. Since both `total` and `groups` are integers, the division is integer division, so `each` stores `6.0`. Line 4: Prints the value of `each`, which is `6.0`.
Code Coach's explanation matched the real output on both lines, so this time Code Coach was right. A model generates its explanations, so on the bench you check every one against the real output, even when it sounds sure.
Sources: Muggivan, Build Spec, CS I Java On-Ramp, sections 9.4 and 11 (2026); classroom data, Code Coach's saved explanation, each.json (2026); classroom data, Java run with the course JDK (2026); Oracle, The Java Language Specification, 15.17.2 (n.d.); CS I course, Bench Basics B25 (2026).
What a Model Is: A Review
This section reviews how a model differs from a program, what lossy compression gives up, and how a language model produces text.
Programs and Training
A program is a set of instructions that a person wrote for a computer to follow. The controls of an elevator are one example. In one published elevator design, the designer wrote a rule that when a call button is pressed, the car stops at that floor and its door opens, then closes after three seconds. A person can read every one of those rules.
A model is software whose behavior came from examples instead of from rules a person wrote. Training is the process of showing a model a large number of examples and adjusting its numbers until its outputs match them. For each example, the model makes a prediction, the prediction is compared with the correct answer, and the model's numbers are updated so the next prediction comes closer. The voice-to-text feature in one phone keyboard is a model of this kind, because its speech recognizer is a model that was trained. Writing a rule by hand is not training, because the rule comes from a person and not from examples. Both run on a chip, so the test is where the behavior came from.
What Lossy Compression Gives Up
Compression makes a file smaller by storing its information in fewer bytes. Lossless compression lets the decoded file match the original exactly. A ZIP file is not lossy, because every part of the original comes back. In a check run for an October lesson, a 36,944-byte text file was zipped to 11,345 bytes and unzipped with 0 characters different.
Lossy compression is compression that removes some detail, so the decoded file is only close to the original and the removed detail cannot be brought back. A podcast episode downloaded as a small file is a common example, since Apple Podcasts accepts episodes as MP3 or AAC files. An MP3 encoder discards sounds that human hearing is less likely to notice, or stores them with less precision. Those sounds are no longer in the file, so no player can rebuild them.
File sizes are measured in units built from the byte, which is 8 bits. From smallest to largest, a kilobyte (KB) is 1,000 bytes, a megabyte (MB) is 1,000,000 bytes, a gigabyte (GB) is 1,000,000,000 bytes, and a terabyte (TB) is 1,000 GB. A 30-minute episode saved at 128 kilobits per second takes 28.8 MB, so a phone with 128 GB could hold about 4,444 such episodes if it stored nothing else.
How a Language Model Produces Text
Andrej Karpathy's 2023 talk "Intro to Large Language Models" describes a language model stored on a drive as two files. The large file is the parameter file, and it holds numbers instead of sentences. For Llama 2 70B, it holds 70 billion parameters at 2 bytes each, or 140 GB. The small file is the runtime, the program that reads those numbers and does the arithmetic. The parameters were set by training on about 10 TB of text, and one useful way to think about the result is as lossy compression of that text. This is only a comparison, because the parameter file stores numbers and not a smaller copy of the text.
A model reads and writes text as tokens, which are words, parts of words or single characters. Prediction is the process of producing a likely next token from the text so far. First, the runtime uses the parameters to calculate how likely each possible next token is. Next, it picks one token and adds it to the end of the text. Then it repeats the loop until the answer is finished. Finding a stored answer and handing it over is not prediction, because nothing new is produced. Figure 1 places the three October figures side by side.
Generating and Retrieving
A search engine retrieves information, which means it finds something stored earlier and returns it, as Google does when it searches its index of web pages. A language model generates text, which means it produces new text by prediction, one token at a time. Karpathy's talk showed a generated store page whose title, author and ISBN number were all made up by the model. A summary of a book that does not exist comes about the same way, because prediction produces text in the form of a summary whether or not any real book matches the title. A confident tone is not evidence, because the same process produces correct and false details in the same fluent style.
Summary
A program follows rules a person wrote, while a model's behavior came from training. Lossless compression gives back every part of a file, while lossy compression removes detail for good. A language model generates text by prediction, one token at a time, even when no real answer exists.
Sources: Google, What is Machine Learning? and Supervised Learning (n.d.); Wen, The Five Floor Elevator Control System Design Based on S7-300 PLC (2016); Schalkwyk, An All-Neural On-Device Speech Recognizer (2019); Deutsch, RFC 1951 (1996); PKWARE, APPNOTE.TXT (2022); CCITT, T.81 (1992); Library of Congress, MP3 (MPEG Layer III Audio Encoding) (2024); Apple, Audio requirements (n.d.); NIST, The Binary Prefixes (n.d.); Karpathy, Intro to Large Language Models (2023); Meta, Llama 2 Model Card (2023); Google, Introduction to Large Language Models (n.d.); Google, In-depth guide to how Google Search works (2025); Kalai et al., Why Language Models Hallucinate (2025); classroom data, ZIP round trip (2026).
The classwork form is not linked yet. Use Station View and write your answers in your lab notebook with the item labels.
MC 1. A phone has a calculator app and a music app that suggests the next song to play. The song suggestions were built from many examples of what listeners played. Which feature came from training?
- The calculator's buttons, because the calculator gets every answer right
- The music app's song suggestions, because they came from examples instead of from a rule a person wrote
- Both features, because both run on the phone's chip
- Neither feature, because an app on a phone cannot contain a model
MC 2. An email filter is shown thousands of emails, and each email is marked spam or not spam. For each one, the filter predicts a label, and its numbers are changed when the prediction is off. What is this process called, and why?
- Programming, because the filter follows a list of banned words a person wrote
- Storing, because the filter keeps every email to compare against later
- Compressing, because the filter makes the emails take up less space
- Training, because the filter's numbers change each time its prediction disagrees with an email's mark
MC 3. A student zips the class's 30 lab photos to email them as one file. The teacher opens the ZIP file on another Chromebook. Which statement about the teacher's photos is accurate?
- Each photo is identical to the one the student zipped, down to the last byte.
- Each photo has lost a little sharpness, the price of a smaller file.
- Each photo takes less space on the teacher's Chromebook than it did on the student's.
- The ZIP file kept only the photos that looked different from the rest.
MC 4. A video plays at low quality on a slow connection, and the edges of people and buildings look blocky. What explains the blocky edges?
- The video file is broken, so someone has to download it again.
- The video is stored losslessly, and the screen is too small to show every part.
- The low-quality copy was made with lossy compression, so detail was removed and cannot be rebuilt from that copy.
- The video app draws blocks on top of the video to mark it as a cheaper copy.
MC 5. Which list puts these four file sizes in order from smallest to largest?
- 3 GB, 6 KB, 15 MB, 750 MB
- 6 KB, 15 MB, 3 GB, 750 MB
- 15 MB, 6 KB, 750 MB, 3 GB
- 6 KB, 15 MB, 750 MB, 3 GB
MC 6. A model can write the sentence "Rain cools the air." A student searches the model's parameter file for that sentence and finds no match. Why?
- The sentence is in the file, but squeezed into a scrambled form that a search cannot read.
- The file holds only numbers, and the sentence is made when the runtime does arithmetic with them.
- The sentence is kept in the runtime, the small file, and not in the parameter file.
- The sentence had not been added to the file yet, because training adds new sentences over time.
MC 7. In the two-file picture of a language model, what is the runtime's job?
- It holds the billions of numbers that training set.
- It shrinks the training text so that the text fits inside the parameter file.
- It checks each answer against a stored copy of the training text.
- It reads the numbers in the parameter file and does the arithmetic that turns them into text.
MC 8. A model is halfway through a long answer when a student stops it. She types the word "However," at the end of the half-finished text and lets the model go on. Why is the rest of the answer different from the first try?
- The model had planned the whole answer, and the new word made it drop the plan.
- The new word changed the numbers in the parameter file.
- Each next token is predicted from all the text so far, so a new word changes what is likely to come after it.
- The runtime picks every word by pure chance, so any stop gives a new ending.
MC 9. A student asks a chatbot for a famous line from a mayor's speech. The chatbot gives a line in quotation marks, but no record shows that the mayor ever gave that speech. Why could the chatbot write a quotation from a speech that was never given?
- Quotation marks mean the words were copied exactly, so the speech must be real after all.
- Prediction produces words in the form of a quotation, whether or not any real speech is behind them.
- The student's question was too short, and a longer question always gets a real quotation.
- The chatbot stopped working for that one question, because a working chatbot quotes only real speeches.
MC 10. A student asks a chatbot that answers only from its parameters for the opening hours of the public library on her street. Which statement is accurate?
- The chatbot's hours will be up to date, because its numbers change when the library's hours change.
- The chatbot will return nothing, because it has no stored record of the hours.
- The chatbot's hours must be right, because opening hours are a simple fact.
- The chatbot will generate hours by prediction, so a person should check them against the library's own posted hours.
CR 1. (Study Guide Part 1 · entries 1–4) Write your study guide entries for program, model, training and lossless. Each entry has three parts. Write the term, then one sentence of what it means in your own words. Then give one example you chose yourself, not one from the slides or today's passage.
Write your answer in your lab notebook, labeled CR 1.
CR 2. (Study Guide Part 1 · entries 5–8) Write your study guide entries for lossy, parameter file, token and prediction, and generating and retrieving. Write each one the same way. Give the term, one sentence of meaning in your own words, and one example you chose yourself.
Write your answer in your lab notebook, labeled CR 2.
The classwork form is not linked yet. Use Station View and write your answers in your lab notebook with the item labels.
CR 3. Predict what this code prints, then explain why it does not print 7.
1int pages = 7; 2pages = pages / 2 * 2; 3System.out.println(pages);
Write your answer in your lab notebook, labeled CR 3.
CR 4. A friend says a chatbot "looked up" its answer. Write two sentences that explain what the chatbot did instead.
Write your answer in your lab notebook, labeled CR 4.
Check the Coach
Open the bench, do its six jobs, then paste your credit code into the credit-code form. You can turn in up to three codes per bench; your best score is your grade.
Bench Basics opens during your class period.
The classwork form is not linked yet. Use Station View and write your answers in your lab notebook with the item labels.
This opens during your class period.