Live data from Hacker News

Show HN: LlamaGym – fine-tune LLM agents with online reinforcement learning

github.com

21–29 of 29 posts

Re: Show HN: LlamaGym – fine-tune LLM agents with online reinforcement learning

#21
post #17

I want to make a Discord bot that impersonates all my friends and continues to refine the model as the conversations continue. Basically this [1] post, but with a more modern model and, ideally, reinforcement learning. Seems like this would fit the bill.... Is there anything else that would make this easier? [1] https://www.izzy.co/blogs/robo-boys.html

You could perhaps adapt the Doppel Bot slack bot from Modal Labs: https://github.com/modal-labs/doppel-bot

Re: Show HN: LlamaGym – fine-tune LLM agents with online reinforcement learning

#22
From the title I misunderstood what it does. However, now I'm wondering if what I thought is was (don't ask my why I thought it) is possible:

I have a PC that is able to run e.g. Mistral Instruct 7B Q4 inference with around 30 token/s.

How (computation and memory) expensive would it be to also run backpropagation in addition to inference?

I'm aware that the models are typically fed with much more and better data than what is typically provided during normal conversations but on the other hand if I could finetune my local model a teeny tiny bit during during / after each conversation I have with it anyways, it would after a while be perfectly customize for me.

I'm also aware that this could be problematic for models that are used by multiple users but my intended use case would be personal use by a single user.

Re: Show HN: LlamaGym – fine-tune LLM agents with online reinforcement learning

#23

From the title I misunderstood what it does. However, now I'm wondering if what I thought is was (don't ask my why I thought it) is possible: I have a PC that is able to run e.g. Mistral Instruct 7B Q4 inference with around 30 token/s. How (computation and memory) expensive would it be to also run backpropagation in addition to inference? I'm aware that the models are typically fed with much more and better data than…

Very expensive.

AFAIK the model can’t be quantized during backprop, so right there you’d need a ton of RAM.

Backprop is faster bc it can be parallelized, but IIRC you need to hold an entire copy of the model for each backprop process.

Re: Show HN: LlamaGym – fine-tune LLM agents with online reinforcement learning

#24
post #7

Thank you for making this. Simplifying any aspect of RL is always welcome.

Thanks! Yeah RL for LLMs is pretty underexplored I think beyond the RLHF stuff. Pretty tough to get working tho.

Didn’t DPO supplant rlhf?

Re: Show HN: LlamaGym – fine-tune LLM agents with online reinforcement learning

#25
post #12

When 150 lines of boilerplate can land you the first page on HN, maybe it is, in fact, the end of programming?

Carmack's infamous fast inverse square root was only 13 lines. Measuring code by line metrics rather than its contents reflects shallow, questionable comprehension.

If the first line of Carmack's infamous code was "import fast_inverse_square_root" from Pypi.org, it wouldn't be as impressive.

Re: Show HN: LlamaGym – fine-tune LLM agents with online reinforcement learning

#26
post #23

From the title I misunderstood what it does. However, now I'm wondering if what I thought is was (don't ask my why I thought it) is possible: I have a PC that is able to run e.g. Mistral Instruct 7B Q4 inference with around 30 token/s. How (computation and memory) expensive would it be to also run backpropagation in addition to inference? I'm aware that the models are typically fed with much more and better data than…

Very expensive. AFAIK the model can’t be quantized during backprop, so right there you’d need a ton of RAM. Backprop is faster bc it can be parallelized, but IIRC you need to hold an entire copy of the model for each backprop process.

Actually, there have been attempts to do quantized backprop, but not sure how successfully.

Re: Show HN: LlamaGym – fine-tune LLM agents with online reinforcement learning

#28

From the title I misunderstood what it does. However, now I'm wondering if what I thought is was (don't ask my why I thought it) is possible: I have a PC that is able to run e.g. Mistral Instruct 7B Q4 inference with around 30 token/s. How (computation and memory) expensive would it be to also run backpropagation in addition to inference? I'm aware that the models are typically fed with much more and better data than…

For an idea of what's possible you might be interested in this story that was just on HN where they fine tune a quantized 70b model in 48GB VRAM: https://www.answer.ai/posts/2024-03-06-fsdp-qlora.html
Post reply on HN