First Contact: Raw Completion
This chapter assumes chapter 3's setup: Olmicro 275M loaded in Python with Transformers, ready to generate. The whole chapter is one idea — how to ask a base model for something, given that "asking" is not what it does.
The shape of a good base-model prompt
An instruct model takes instructions: "Summarise this in three sentences." A base model takes the beginning of a document. The craft is to write the beginning of the document whose continuation is the thing you want.
| You want | You write the start of |
|---|---|
| A fact | A reference work stating facts |
| A summary | A document that presents summaries |
| A list | A list, already begun |
| A story | The story, first paragraph |
| Code | A program, with comments saying what it does |
The lab's first three prompts to the 275M, and what came back (transcript t01, greedy decoding — the model always picks its most likely next token):
The capital of France is
→ The capital of France is the city of ___, which is located
in the ___ region of France.
A. Paris; Paris
B. Rome; ...
Water is made of hydrogen and
→ Water is made of hydrogen and oxygen. Hydrogen is a very
light element, and oxygen is a very heavy element. ...
To make a cup of tea, first boil the
→ To make a cup of tea, first boil the water in a pot. Then
add the tea leaves and stir them together. ...
Three lessons in one screen:
- It works. Two of the three continuations are fluent, correct prose. The knowledge and the language are genuinely there, at 275 million parameters.
- It imitates documents, not requests. The first prompt came back as a fill-in-the-blank quiz question, complete with answer options — because in the model's reading, "The capital of France is" very often appears in worksheets. You did not get the document you wanted because you did not start the document you wanted. (Starting "France's capital city, Paris, is" gets you an encyclopedia instead.)
- It does not stop. Every continuation ran to the token limit the lab set (25 tokens). Without a limit or a stop condition, it would have kept going — chapter 2 showed where that leads.
Three prompt shapes that earn their keep
Continue a draft. Write the first paragraph yourself, in the voice you want, and let the model draft the next. It will drift — small models drift within a paragraph or two — but as a first-draft machine for text you will edit anyway, it is honest work.
The village fête had been held on the green for as long as
anyone could remember, and this year, for the first time,
→ (the model continues the story, in your opening's voice)
Transform by example. This is important enough to get chapter 5 to itself: show the model two or three examples of an input being turned into an output, then give it yours.
Complete a pattern. Lists, tables, logs, forms: anything with visible structure. A base model is at its best when the next token is heavily constrained by the shape of what came before — which is why chapter 7 puts it to work inside scripts, where the shape is enforced by code.
The steering settings, briefly
Generation has a handful of settings; two matter at this chapter's level:
- Greedy vs sampling. Greedy
decoding always takes the most likely
next token: predictable, prone to
loops. Sampling (
do_sample=True, with a temperature) takes chances: more varied, more likely to wander off a cliff. The lab used greedy for every transcript in this guide so the results are reproducible — run the same script twice, get the same text. For drafting, try temperature 0.7–0.9 and compare. - Length.
max_new_tokensis your stop condition of last resort. Set it every time. A base model with no limit is a tap left running.
Check: the three prompts above are in
olmicro-lab/t01_first_load.py. Run it
twice; greedy decoding makes the
outputs identical, word for word. Then
change one prompt's opening to an
encyclopedia's voice and watch the
worksheet disappear.