Megatron-LM icon indicating copy to clipboard operation
Megatron-LM copied to clipboard

How about supporting alternatives to fine-tuning?

Open hwijeen opened this issue 4 years ago • 9 comments

Hi, thank you for the great library.

Recently, many algorithms are proposed to replace fine-tuning as it incurs too many burdens, especially with huge models like GPT3. Examples include P-tuning and LoRA. I personally implemented both on top of Megatron-LM and was able to achieve SOTA accuracy on a number of Korean benchmark datasets (I used model size ranging from 300M to 82B).

How about supporting the algorithms like the above? I think it's an extension of the current --fine-tune option, and is a big plus in terms of the practicality of huge models.

hwijeen avatar Jul 06 '21 01:07 hwijeen

can you share your implementation? thanks!

alex-ht avatar Mar 19 '23 02:03 alex-ht

@hwijeen +1

BrightXiaoHan avatar May 04 '23 10:05 BrightXiaoHan

@hwijeen +1

wsh2836741 avatar May 06 '23 03:05 wsh2836741

Marking as stale. No activity in 60 days. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jul 10 '23 18:07 github-actions[bot]

Hi, sorry for the delayed response. I won't be able to make a PR as I no longer have access to the code, it was from my previous job. I'd be happy to work together as a side project if people are still interested.

hwijeen avatar Aug 13 '23 22:08 hwijeen

@alex-ht @BrightXiaoHan @wsh2836741 Could you share what are your use cases? Are you trying to peft-tune GPT models for conditional generation tasks?

And may I ask what made you reopen this issue @jon-barker? Are you working on this?

hwijeen avatar Sep 01 '23 18:09 hwijeen

hi @hwijeen

Are you trying to peft-tune GPT models for conditional generation tasks?

yes.

I found this tutorial, and it seems that NeMo can inject LoRA adapters into megatron-lm model. https://github.com/NVIDIA/NeMo/blob/main/tutorials/nlp/lora.ipynb

alex-ht avatar Oct 23 '23 01:10 alex-ht

Marking as stale. No activity in 60 days.

github-actions[bot] avatar Dec 22 '23 18:12 github-actions[bot]

It would be great if Megatron-LM could support PEFT methods, e.g. QLoRA. We're sorely lacking a PEFT trainer with Tensor Parallelism.

AlpinDale avatar Apr 22 '24 19:04 AlpinDale

Marking as stale. No activity in 60 days.

github-actions[bot] avatar Jun 22 '24 18:06 github-actions[bot]