Live data from Hacker News

CodeAlpaca – Instruction following code generation model

github.com

11–20 of 50 posts

Re: CodeAlpaca – Instruction following code generation model

#11
post #2

The results are pretty good; I wish they'd just publish the models so we can run the inference locally (not too many people have access to 8xA100 to train themselves, though I appreciate including the training data and instructions too).

If a couple of us get together and throw in some money we could train it on Lambda Labs hardware like the OP suggests. I would volunteer to do it myself but I don’t know enough about training models to guarantee I am not wasting money with a stupid mistake.

Re: CodeAlpaca – Instruction following code generation model

#12
post #2

The results are pretty good; I wish they'd just publish the models so we can run the inference locally (not too many people have access to 8xA100 to train themselves, though I appreciate including the training data and instructions too).

Anyone with a few hundred bucks to spare can do it by renting GPUs from a cloud provider. It only cost Stanford $600 to create Alpaca from LLAMA. $100 to generate instructions with GPT-3 and $500 to rent cloud GPUs. The license restriction is due to the use of GPT-3 output to train a model.

Re: CodeAlpaca – Instruction following code generation model

#13
post #3

> The code runs on a 8xA100 80GB, but can also run on 8xA10040GB or 4xA100 with lower batch size and gradient accumulation steps. To get the GPUs, I suggest using Lambda Labs, best pricing for the best hardware. I wonder how much it was total in $ for the fine-tuning. Also, does anyone have some sort of table/formula that relates MB/GB of training data to $ for fine-tuning?

I asked in the issues, let's see

Re: CodeAlpaca – Instruction following code generation model

#14
post #8

Earlier quoted context omitted.

I don’t understand why Facebook hasn’t taken down the original magnet links in its own repository.

Why would they?

To avoid the embarrassment of having to serve themselves with a DMCA?

Re: CodeAlpaca – Instruction following code generation model

#15
post #3

> The code runs on a 8xA100 80GB, but can also run on 8xA10040GB or 4xA100 with lower batch size and gradient accumulation steps. To get the GPUs, I suggest using Lambda Labs, best pricing for the best hardware. I wonder how much it was total in $ for the fine-tuning. Also, does anyone have some sort of table/formula that relates MB/GB of training data to $ for fine-tuning?

[deleted]

Re: CodeAlpaca – Instruction following code generation model

#16
post #9
post #3

> The code runs on a 8xA100 80GB, but can also run on 8xA10040GB or 4xA100 with lower batch size and gradient accumulation steps. To get the GPUs, I suggest using Lambda Labs, best pricing for the best hardware. I wonder how much it was total in $ for the fine-tuning. Also, does anyone have some sort of table/formula that relates MB/GB of training data to $ for fine-tuning?

Stanford only spent $500 to fine-tune LLAMA for humam instruction with 52k instructions generated by GPT-3. This probably costs less. The use of GPT to generate the instruction data instead of humans is the massive cost reduction. The actual training for fine-tuning on GPUs is relatively cheap.

Most of that was getting the data, the training would cost something like $100 if memory serves.

Re: CodeAlpaca – Instruction following code generation model

#18
post #8

Earlier quoted context omitted.

Why would they?

To avoid the embarrassment of having to serve themselves with a DMCA?

The PR is not in their repository, it's in the fork. Pull Request refers to "pull this from my repository, here's a link", GitHub just presents it in a convenient interface.

(But you're right, those who send DMCAs are likely to just a send a link to the original repository :)

Re: CodeAlpaca – Instruction following code generation model

#20
post #10
post #3

> The code runs on a 8xA100 80GB, but can also run on 8xA10040GB or 4xA100 with lower batch size and gradient accumulation steps. To get the GPUs, I suggest using Lambda Labs, best pricing for the best hardware. I wonder how much it was total in $ for the fine-tuning. Also, does anyone have some sort of table/formula that relates MB/GB of training data to $ for fine-tuning?

Probably in the hundreds of dollar for 7B model, and may be a thousand or two for the 13B at worst

Far far less. Alpaca-7B's compute cost was around $60-$70 for Stanford and around $0.60 (yes 60 cents) for equivalent fine tunes using the Parameter Efficient Fine Tuning (PEFT) strategy of Low Rank Adapters (LoRA).

The repo above can be replicated for similar costs. Easily less than $10 for up to 30B using LoRA (which requires only 24GB of VRAM for 30B/33B and smaller).

Post reply on HN