A Hands-On Guide to Fine-Tuning Large Language Models with PyTorch and Hugging Face
Language: English
Published by Independently published, 2025
- Softcover
- Used

Seller: WeBuyBooks, Rossendale, LANCS, United KingdomWeBuyBooks
AbeBooks seller since November 14, 2005
Condition: Used - As new
£ 20.62
Quantity: 1 available
Add to basketItem description from seller
Most items will be dispatched the same or the next working day. An apparently unread copy in perfect condition. Dust cover is intact with no nicks or tears. Spine has no signs of creasing. Pages are clean and not marred by notes or folds of any kind.
Seller Inventory # rev8533755871
- Title
- A Hands-On Guide to Fine-Tuning Large Language Models with PyTorch and Hugging Face
- Author
- Voigt Godoy, Daniel
- Publisher
- Independently published
- Publication year
- 2025
- Condition
- Like New
- Binding
- paperback
- Language
- English
- ISBN 13
- 9798301961816
- Item weight
- 880 grams
Revised Edition (October/2025)
Are you ready to fine-tune your own LLMs?
This book is a practical guide to fine-tuning Large Language Models (LLMs), combining high-level concepts with step-by-step instructions to train these powerful models for your specific use cases.
Who Is This Book For?
This is an intermediate-level resource—positioned between building a large language model from scratch and deploying an LLM in production—designed for practitioners with some prior experience in deep learning.
If terms like Transformers, attention mechanisms, Adam optimizer, tokens, embeddings, or GPUs sound familiar, you’re in the right place. Familiarity with Hugging Face and PyTorch is assumed. If you're new to these concepts, consider starting with a beginner-friendly introduction to deep learning with PyTorch before diving in.
What You’ll Learn:
- Load quantized models using BitsAndBytes.
- Configure Low-Rank Adapters (LoRA) using Hugging Face's PEFT.
- Format datasets effectively using chat templates and formatting functions.
- Fine-tune LLMs on consumer-grade GPUs using techniques such as gradient checkpointing and accumulation.
- Deploy LLMs locally in the GGUF format using Llama.cpp and Ollama.
- Troubleshoot common error messages and exceptions to keep your fine-tuning process on track.
This book doesn’t just skim the surface; it zooms in on the critical adjustments and configurations—those all-important "knobs"—that make or break the fine-tuning process.
By the end, you’ll have the skills and confidence to fine-tune LLMs for your own real-world applications. Whether you’re looking to enhance existing models or tailor them to niche tasks, this book is your essential companion.
Table of Contents
- Frequently Asked Questions (FAQ)
- Chapter 0: TL;DR
- Chapter 1: Pay Attention to LLMs
- Chapter 2: Loading a Quantized Base Model
- Chapter 3: Low-Rank Adaptation (LoRA)
- Chapter 4: Formatting Your Dataset
- Chapter 5: Fine-Tuning with SFTTrainer
- Chapter 6: Deploying It Locally
- Chapter -1: Troubleshooting
- Appendix A: Setting Up Your GPU Pod
- Appendix B: Data Types' Internal Representation
"Synopsis" may belong to another edition of this title.
WeBuyBooks
Rossendale, LANCS, United Kingdom
AbeBooks seller since November 14, 2005
Shipping rates from United Kingdom to U.S.A.
| Item | 5 to 10 business days | 5 to 10 business days |
|---|---|---|
| First item | £ 9.03 | £ 9.03 |
Payment methods
Specialty
General Secondhand BooksSeller's business information
Revival Books Ltd
Unit 11 Hugh Business Park, Bacup Road, Waterfoot
Rossendale, United Kingdom BB4 7BT
Terms of sale
WeBuyBooks
Hall Carr Mill
Fallbarn Road
Rawtenstall
Lancashire BB4 7NX
Email: Sales@webuybooks.co.uk
Tel: 01706 227207
Company Reg. No. 07693718
VAT Number 901 5786 27
Authorised Representatives: Michael Lane and Damian Carr
Right of withdrawal
If you are a consumer you can withdraw from the contract in accordance with the following. Consumer means any natural person who is acting for purposes which are outside his trade, business, craft or profession.
Information regarding the right of withdrawal
Statutory right to withdraw
You have the right to withdraw from this contract within 14 days without giving any reason.
The withdrawal period will expire after 14 days from the day on which you acquire, or a third party other than the carrier and indicated by you acquires, physical possession of the last good or the last lot or piece.
To exercise the right of withdrawal, electronically fill in and submit a clear statement on our website, under "My Purchases" in "My Account". We will communicate to you an acknowledgement of receipt of such a withdrawal on a durable medium (e.g. by e-mail) without delay.
To meet the withdrawal deadline, it is sufficient for you to send your communication concerning your exercise of the right of withdrawal before the withdrawal period has expired.
Effects of withdrawal
If you withdraw from this contract, we will reimburse to you all payments received from you, including the costs of delivery (except for the supplementary costs arising if you chose a type of delivery other than the least expensive type of standard delivery offered by us).
We may make a deduction from the reimbursement for loss in value of any goods supplied, if the loss is the result of unnecessary handling by you.
We will make the reimbursement without undue delay, and not later than 14 days after the day on which we are informed about your decision to withdraw from this contract.
We will make the reimbursement using the same means of payment as you used for the initial transaction, unless you have expressly agreed otherwise; in any event, you will not incur any fees as a result of such reimbursement.
We may withhold reimbursement until we have received the goods back, or you have supplied evidence of having sent back the goods, whichever is the earliest.
You shall send back the goods or hand them over to WeBuyBooks, Rossendale, LANCS, United Kingdom, +44 01706227207, without undue delay and in any event not later than 14 days from the day on which you communicate your withdrawal from this contract to us. The deadline is met if you send back the goods before the period of 14 days has expired. You will have to bear the direct cost of returning the goods. You are only liable for any diminished value of the goods resulting from the handling other than what is necessary to establish the nature, characteristics and functioning of the goods.
Exceptions to the right of withdrawal
The right of withdrawal does not apply to:
- The delivery of newspapers, journals or magazines with the exception of subscription contracts; and
- The supply of digital content which is not supplied on a tangible medium (e.g. on a CD or DVD) if you accepted when you placed your order that we could start to deliver it, and that you could not withdraw once delivery had started.
Shipping terms
Shipping costs are based on books weighing 2.2 LB, or 1 KG. If your book order is heavy or oversized, we may contact you to let you know extra shipping is required.