← All courses ← Course home

Lesson 05 of 05

Pick a shape for the job

Start with the app input and output. Choose the model shape that does that job, then measure the real path.

Agent brief (llms.md)

Do not start with a model name. Start with the thing a person gives the app and the thing the app must return.

App featureWhat must the user get?
Model shapeWhat input and output fit?

Labels for a photo

If the app needs "shoe", "shirt", or "coat", use an image classifier path. That is the ClothingCNN job in the forward course. The path is photo to prepared pixels to model to label.

NeedLabel a photo
ShapeImage classifier
ShipPixels in, label out

Conversation or summary

If the app needs a conversation, rewrite, or summary, use a language model path. Its input is token context. Its output is text, often produced one token at a time.

Draw or edit pixels

If the app needs a new picture or a changed picture, use a generative image path. Its output must be pixel data. A classifier can tell you what is in an image. It is the wrong shape for drawing one.

Photo labelImage classifier
ConversationLanguage model
New imageGenerative image model

Then look at the path

After you choose the shape, follow its path through the app. The forward course pipeline lesson shows the clothing route from data to SwiftUI. From the metal to the model begins with Metal and returns to the full pipeline in lesson 07. Follow either direction until you can say what the runtime and the chip are doing.

Architecture gives you a first guess about the work, the likely output, and the right profile to run. Measurement tells you if that guess still holds on the real device. After you ship a shape, evaluate it the same way: first read the failures, then build simple checks. Use writing-style eval for language, generation eval for images, and classifier eval for labels.

Chooser. Labels for a photo means image classifier. Conversation or summary means language model. Drawing or editing pixels means generative image model.

Return to the forward clothing course or open From the metal to the model.

Key concepts

  • Start from the app input and output, not a model name.
  • Photo labels map to an image classifier path, like ClothingCNN.
  • Conversation, rewrite, or summary maps to a language model path.
  • A new or edited picture needs a generative image path. A classifier cannot draw.

Takeaways

  • You can map a feature to classifier, language model, or generative image model.
  • You can follow the forward pipeline or From the metal to the model after you pick a shape.
  • You know architecture is a first guess and on-device measurement confirms it.