Skip to content

fix: correct lora_alpha value in Chapter 12 LoRA configuration#114

Open
octo-patch wants to merge 1 commit into
HandsOnLLM:mainfrom
octo-patch:fix/issue-82-lora-alpha-typo
Open

fix: correct lora_alpha value in Chapter 12 LoRA configuration#114
octo-patch wants to merge 1 commit into
HandsOnLLM:mainfrom
octo-patch:fix/issue-82-lora-alpha-typo

Conversation

@octo-patch

Copy link
Copy Markdown

Fixes #82

Problem

In the Chapter 12 notebook, the LoraConfig sets r=64 (rank) but lora_alpha=32 (scaling). The common recommendation is to set lora_alpha to approximately twice the value of r. With r=64, lora_alpha should be 128, not 32. This was confirmed as a typo by the maintainer in the issue thread.

Solution

Updated lora_alpha from 32 to 128 in both LoraConfig instances (cells 11 and 26) in the Chapter 12 notebook, aligning the value with the standard LoRA convention (lora_alpha ≈ 2 * r).

Testing

Verified the change is applied consistently in both LoRA configuration blocks within the notebook.

…andsOnLLM#82)

The lora_alpha parameter was set to 32 while r (rank) was set to 64.
The recommended practice is to set lora_alpha to approximately twice
the value of r (i.e., 128 when r=64), as confirmed by the maintainer.

Updated both LoraConfig instances in cells 11 and 26.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possible typo on Ch 12 page 370

1 participant