Loading topic
transformers model for inference. It also assumes you know what a transformer's attention and feed-forward layers are. You don't need any LoRA knowledge yet.3 min readW + (alpha/r)BA from the previous chapter. Four settings control that update: rank, alpha2 min readtransformers causal language model and run inference. It also assumes you know the LoRA update W + (alpha/r)BA and what rank, alpha, dropout and target modules control. Here you attach an adapter to a real model with the PEFT library and check wha3 min readtransformers model for inference and that you know basic Python. It covers how to turn raw examples into the format that supervised fine-tuning expects, and why the chat template matters more than most beginners expect.3 min readtransformers model for inference, know what a LoRA adapter is, and have seen how LoraConfig and get_peft_model work. You also need a dataset in chat format, as covered in the previous chapter. Here you train the adapter with TRL's SFTTrainer.2 min readSFTTrainer (previous chapter) and can run a Hugging Face causal language model for inference. You should also know what a held-out split is.2 min readSFTTrainer (see the previous chapters) and can run a Hugging Face transformers model for inference. After training, you have two ways to ship the result: keep the adapter separate from the base model, or merge it into the base weights.3 min readtransformers and peft. It covers the two ways to deploy the result and how to choose between them.2 min readSFTTrainer, as in the earlier chapters. It covers the problems that most often appear afterward, and how to tell them apart. Check the cheap causes first: data and template problems are far more common than bad hyperparameters.3 min read