Skip to main content

Model Types

MTP can train three types of models. The type is determined by the instructions you add to your protocol, so choosing an instruction type is how you choose a model type.

Generative

Output: "Hello, I am your model!"

Generative models respond with free-form text. Each response ends with a final token that tells your application what the model decided

  • Built with Instructions
  • A protocol can contain many instructions to respond to different situations
  • Supports Guardrails and numeric output

Use a generative model for conversation, question answering, and any case where the response text is not known in advance.

State Machine

Output: "GREETING"

State machine models map an input to one of a fixed list of states instead of generating text. This is useful for data labelling, intent detection, and routing.

The fastest way to build a state machine is the CSV interface. It requires only Input, Output, and Reference columns and does not require any code. All CSV protocols are state machines.

If you need custom tokens or multiple input lines, build the state machine in Python instead:

Multi-Classification

Output: {"emotion": "curious", "intent": "exclamation"}

Multi-classification models classify a single input along several dimensions at once and return the result as a JSON object.

  • Built with MultiClassifierInstruction, using InstructionInput
  • The output format is generated automatically from the state_map you provide

Use a multi-classification model when one label is not enough, for example when you need both the sentiment and the topic of a message.

Choosing a Model Type

  • The response is free-form text: use a generative model
  • The response is one label from a fixed list: use a state machine, and prefer CSV
  • The response is several labels at once: use multi-classification

Next Steps