streamft 1.0.4: multi-turn SFT rows without flattening the conversation
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…
streamft, a tool for training adapters on models that exceed VRAM capacity, has released version 1.0.4. This update addresses a limitation from the previous 1.0.3 release, which could only process {"instruction", "response"} rows in its SFT loader.
Prior to 1.0.4, multi-turn conversations had to be flattened into a single user string, discarding turn boundaries that are crucial for the model to learn effectively. Streamft 1.0.4 now accepts OpenAI-style {"messages": [...]} rows, preserving the essential structure of multi-turn conversations.
In version 1.0.4, the _format_messages function has been updated to accept system, user, and assistant turns. The prompt mask now covers every turn before the final assistant message, ensuring that the loss is computed only on the answer that should be learned. This modification prevents the model from being trained on incorrect text.
Streamft 1.0.4 also includes a check that raises an error when a messages row does not end with an assistant turn, ensuring that models are trained on the right data. Existing instruction/response rows continue to function unchanged, including the optional context field.
The significance of these changes is evident in Atom Zero 3.1, where a 1.5B bridge tier is being trained on 2,800 synthetic dialogues, expanded to 8,400 prefixes, and supplemented with 1,600 safety/copy/general replay rows. A multi-turn probe conducted on version 3.0 revealed planning turns that ignored conversation context or refused benign prompts. With the introduction of messages rows in streamft 1.0.4, the prior turns now serve as real context, and every assistant turn can be a training target.
Streamft 1.0.4 can be easily installed with the command `pip install --upgrade streamft == 1.0.4`. For further information, visit the project's PyPI page at https://pypi.org/project/streamft/1.0.4/ or the GitHub repository at https://github.com/byjameson/stream-finetune/releases/tag/v1.0.4.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to