Skip to content

streamft 1.0.4

Latest

Choose a tag to compare

@byjameson byjameson released this 29 Nov 07:40

streamft 1.0.4 - multi-turn SFT rows

Status: published to PyPI as streamft 1.0.4 on 2026-11-29.

streamft train --sft previously accepted only {"instruction", "response"}
rows, so a multi-turn conversation had to be flattened into a single user
turn. 1.0.4 accepts OpenAI-style {"messages": [...]} rows instead.

What changed

  • _format_messages accepts {"messages": [{"role", "content"}, ...]} with
    system, user and assistant turns.
  • The prompt mask still covers every turn before the final assistant message,
    so the loss is computed only on the answer that should be learned.
  • A messages row that does not end with an assistant turn raises a clear
    ValueError instead of silently training on the wrong text.
  • {"instruction", "response"} rows keep working unchanged, including the
    context field.
  • Added a regression test for multi-turn formatting and invalid rows.

Why

Atom Zero's 3.1 candidate trains a 1.5B model on 2,800 synthetic dialogues
(8,400 expanded prefixes) so prior turns are real context instead of a
flattened string. The first 30-row multi probe on 3.0 showed planning turns
that ignored the conversation or refused benign prompts; the dialogue adapter
targets exactly that.

Install

pip install --upgrade streamft==1.0.4

Tests

198 passed, 6 skipped.

Links