streamft trains adapters on models that do not fit in VRAM: it streams NF4 blocks from disk and keeps only the active block on the GPU. Until 1.0.3, its SFT loader accepted only {"instruction", "response"} rows. A multi-turn conversation had to be flattened into one user string, which loses the turn boundaries the model should learn from.
1.0.4 accepts OpenAI-style {"messages": [...]} rows instead.
What changed
-
_format_messagesacceptssystem,userandassistantturns. - The prompt mask 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 error instead of silently training on the wrong text.
- Existing
instruction/responserows still work unchanged, including the optionalcontextfield.
Why it matters
For Atom Zero 3.1 I am training a 1.5B bridge tier on 2,800 synthetic dialogues, expanded to 8,400 prefixes (plus 1,600 safety/copy/general replay). The first 30-row multi-turn probe on 3.0 showed planning turns that ignored the conversation or refused benign prompts. With messages rows, the prior turns are real context and every assistant turn can be a training target.
Install
pip install --upgrade streamft==1.0.4 Tests
198 passed, 6 skipped.
PyPI: https://pypi.org/project/streamft/1.0.4/
GitHub: https://github.com/byjameson/stream-finetune/releases/tag/v1.0.4


![CardPointers updated for iOS 27 with Siri AI, automatic offer syncing, more [Save 50%]](https://9to5mac.com/wp-content/uploads/sites/6/2026/09/Screenshot-2026-09-21-at-12.00.09-PM.png?w=1600)