Repository navigation
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_messagesaccepts{"messages": [{"role", "content"}, ...]}with
system,userandassistantturns.- 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
messagesrow that does not end with an assistant turn raises a clear
ValueErrorinstead of silently training on the wrong text. {"instruction", "response"}rows keep working unchanged, including the
contextfield.- 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.4Tests
198 passed, 6 skipped.