Instruction Following › Key Parameters

Michael BrenndoerferDecember 15, 20251 min read
Language AI HandbookAll chapters
Part 36 of 67Instruction Tuning
Chapter 266Instruction Following › Key Parameters
Reading section 9 of 12 · Key Parameters · 1 minSection 9 of 12 · 1 min

Book contents

Section 9 of 12 · 1 min read

Instruction Following › Key ParametersOne section · Sections in this chapter9 / 12 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

The key parameters for the instruction processing pipeline are:

  • template: The formatting style for instructions (e.g., "default", "alpaca"). Different templates provide different context cues to the model. Consistency between training and deployment is needed: a model trained on the Alpaca template should receive Alpaca-formatted prompts at inference time to activate the instruction-following behavior it learned.
  • max_length: The maximum sequence length allowed for training examples. Filtering long sequences ensures data fits within the model's context window. Setting this too low discards valuable complex examples; setting it too high may cause memory issues during training.
  • min_instruction_length: The minimum character count for instructions. This threshold helps filter out noise or trivial inputs. Very short instructions like "Hi" or "Thanks" don't teach meaningful instruction-following patterns.
  • min_output_length: The minimum character count for responses to ensure meaningful training signals. Filtering near-empty outputs prevents the model from learning to produce terse, unhelpful responses to legitimate requests.