Loading topic
transformers model for inference. It explains the one assumption that makes LoRA work: the change that fine-tuning makes to a weight matrix can be described with far fewer numbers than the mat6 min readnn.Module code, and have seen the idea from the previous chapter: a fine-tuning update can be approximated by a low-rank matrix. Choosing rank, alpha,6 min readtransformers model for inference, and have read the earlier chapters on the LoRA update W + (alpha/r)BA and on rank, alpha, dropout and targ5 min readtransformers model for inference and use the datasets library at a basic level. It also assumes you know that a causal language model predicts the next token. By the end you should be able to turn raw examples into correctly templated training text5 min readtransformers model, know what a LoRA adapter is, and have already seen how LoraConfig and get_peft_model work. It also assumes your data is in chat format. Here you will turn those pieces into a training run with TRL's SFTTrainer, read the logs5 min readSFTTrainer. It also assumes you know what a data type such as float16 or bfloat16 means for memory. QLoRA changes how the frozen base weights are stored. It does not change what LoRA trains.5 min readtransformers model for inference, have trained a LoRA adapter with PEFT and TRL as in the previous chapters, and know basic Python and PyTorch. Training loss going down shows that the adapter fits the training data. It does not show that the model is6 min readtransformers inference. Here you will learn what a saved adapter contains, how to load it again, when to merge 5 min readSFTTrainer, and that you can read a training loss curve. It covers the problems that show up most often, how to recognize each one, and what to change. The goal is to go from a vague symptom ("the model got worse") to a speci8 min read