Verification of script to train a LLM on supervised data

John6666
Wed, 25 Jun 2025 02:42:54 +0000

I don’t think there are any major issues with quantization. The LoRA settings also appear to be correct. If there are any problems, it usually results in an error…

Regarding tokenization, I later noticed that the handling of special tokens and masks may not be complete.

And since the training loop section is manually created, making debugging difficult… For example, I can assist with fixes for cases where it doesn’t work due to syntax errors, but it’s challenging to identify logical oversights.

Given that manually performing all of this correctly is quite tedious (there are numerous model-specific conventions and details that aren’t typically obvious), I think it would be simpler to implement using an existing trainer.

huggingface.co

Templates

We’re on a journey to advance and democratize artificial intelligence through open source and open science.

huggingface.co

Fine-tuning a model with the Trainer API - Hugging Face LLM Course