Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add minLoRA #1

Merged
merged 1 commit into from
Feb 27, 2023
Merged

Add minLoRA #1

merged 1 commit into from
Feb 27, 2023

Conversation

cccntu
Copy link
Owner

@cccntu cccntu commented Feb 21, 2023

Shows how to add LoRA to nanoGPT

@cccntu cccntu merged commit e18d9f2 into master Feb 27, 2023
@@ -180,13 +182,46 @@ def get_batch(split):
if block_size < model.config.block_size:
model.crop_block_size(block_size)
model_args['block_size'] = block_size # so that the checkpoint will have the right value
if use_lora:
minlora.add_lora(model, lora_config=lora_config)
minlora.tie_weights(linear=model.lm_head, embedding=model.transformer.wte)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, can you explain why you tie weights here?

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.

2 participants