train
AI Agents Framework This script finetunes a model using Unsloth’s fast training framework. It supports both ShareGPT and Alpaca‑style datasets by converting raw conversation data into plain-text prompts using a chat template, then pre‑tokenizing the prompts. Extra debug logging is added to help trace the root cause of errors.Import
Classes
Functions
formatting_prompts_func()
Converts each example’s conversation into a single plain-text prompt.
tokenize_function()
Tokenizes a batch of text prompts with padding and truncation enabled.
main()
Function definition.

