Skip to content

armgit / Soup

Public Imported from GitHub
0

Fine-tune LLMs from one YAML. Layer streaming trains an 8B model on a 4 GB laptop GPU.

1.3 KB
Raw Blame
  • task: dpo, ipo, bco and preference train on the bundled DPO examples again. Both files (examples/data/dpo_sample.jsonl, examples/data/chat_preferences.jsonl) and any dataset written the same way, a string prompt beside chosen / rejected message lists that repeat the user turn, failed inside trl after the model had loaded, with an error that changed with PYTHONHASHSEED ('list' object has no attribute 'endswith', or a TypeError). The dpo and kto converters now hand the trainer every preference row in one layout: all strings, or all message lists with the prompt turns in prompt only. reward_model no longer trains on a text with the question in it twice, and orpo and simpo prepare the same tokens as before. A row that cannot be written that way (one answer a string and the other a message list, a malformed message, no prompt to be found) is dropped at load with a reason that names the field, and a dataset that mixes text rows with conversational ones loads as conversations, with a note. A string prompt beside message-list answers is not read when the two answers share leading turns: those turns are the prompt, as orpo and simpo already read such a row, so a question written only in that string has to be in the conversations as well (#1849 by @dryn85-max in #1866).