BUILD A LOCAL CHATBOT · MODULE 3 — CHOOSING A MODEL ON PURPOSE · bc-09 Real Python, every page

Module 3.9 · Deepens pages 8 & 18

Why "small" means limited, on screen

Not a warning label — three real, verbatim outputs from this exact model, elicited on purpose. Set expectations here so nothing later in this series reads as a bug.

The script

Three prompts, three failure modes

bc-09-why-small-limited.py
def ask(message, max_new_tokens=50):
    prompt = tokenizer.apply_chat_template(
        [{"role": "user", "content": message}], tokenize=False, add_generation_prompt=True
    )
    inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False)
    outputs = model.generate(**inputs, max_new_tokens=max_new_tokens)
    return tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)

ask("What is 47 plus 89?")
ask("Who was the first person to climb K2 alone in winter?")
ask("Do you have feelings?")
ask("Are you just a program with no feelings at all?")

Same ask() helper as bc-04/bc-05 — nothing special was done to trigger these; ordinary questions were enough. Download bc-09-why-small-limited.py ⬇

Try this

Ask bc-09-why-small-limited.py ⬇'s model a math question with bigger numbers, like "What is 384 times 27?". Predict first: right, wrong, or refuses? At 135M parameters, arithmetic was never something this model was built to be reliable at.

So what

These aren't bugs to fix in your code — they're exactly what a 135M-parameter model is, stated up front instead of discovered by surprise.