11 ms·
How to use Alpaca-LoRA to fine-tune a model like ChatGPT
- braingenious 4y agoI love these idea of LoRAs for LLMs. Has anybody made a llama/alpaca erebus model? I read about them in the oobabooga docs and a locally-run language model fine tuned on literotica could be the funniest thing I’ve ever seen.
- camdenlock 4y ago> The weights for LLaMA have not yet been released publicly. To apply for access, fill out this Meta Research form. Cute. ;)
- k_eshav 4y agoiirc someone posted the weights to a torrent. you can look it up. :)
- isoprophlex 4y agoI grabbed it shortly after the leak and left it on for a while. Never seeded that much data on a single torrent. This is some screaming hot data.
- isoprophlex 4y agoLow-rank adaptation (LoRA) ... has some advantages over previous methods: - It is faster and uses less memory, which means it can run on consumer hardware. - The output is much smaller (megabytes, not gigabytes). - You can combine multiple fine-tuned models together at runtime. This is great news for my dream of building a fine-tuned interactive messenger, that can deliver a message on my behalf by training it on my personality & the information I want to convey. Now just add text to speech and a talking head, as discussed in that other submission about cloning yourself with AI... https://news.ycombinator.com/item?id=35280418 https://news.ycombinator.com/item?id=35280418
- cal5k 4y agoWhat if you died but your chatbot didn't know?
- BoorishBears 4y agoThis is an idea I've been mulling over. Maybe software running on your PC to capture everything you type, a voice transcriber that filters out your voice specifically and records that, and you've got a dataset that covers a lot of who you are. Fine tune a model on that and boom, you're "immortal", and as LLMs get better and better, the fidelity of "you" gets better and better.
- waboremo 4y agoAll the downsides of immortality without any of the fun. As expected from this timeline.
- BoorishBears 4y agoNo downsides or fun for yourself, the main use I could see for it would be for something like being able to "talk" to your great great great grandpa one day. It's like home video on steroids
- waboremo 4y agoI suppose that is the one retaining upside for the other person when it comes to immortality. But for the individual, none of the immortality fun remains. You aren't meeting or talking to them as you would in "normal" immortality, you are still dead and don't know if they even exist, you don't even get to ensure the right things are passed down.
- whoknows234 4y agoSo why write letters, time capsules, or leave any other sort of mementos for anyone ?
- deleted 4y ago[deleted]
- rishsriv 4y agoThis looks fantastic. Will try replacing our current fine-tuned FLAN-UL2 model with this. I wonder how the devtooling around this will evolve. Seems like a matter of days until someone creates a GUI wrapper around this, and obviates the need to use programmer time for fine-tuning
- anymoonus 4y agoI'm curious, what are the differences between T5, Flan-T5, and Flan-UL2 for fine-tuning? Does the instruction tuning matter at all, once you're fine-tuning?
- tysam_and 4y agoLoRA has actually been around for a little while! I first saw it when it became popular in fine-tuning models quantized down to about 8 bits or so. I'm sure it's doing stuff in the 4bit range now! :D I believe it's a core toolbox piece of tech required to really push the limits of LLMs either in original training or in inference. Similar sort of to how batch norm was for convolutional neural networks. I look forward to seeing how this will be applied in the future.
- credit_guy 4y agoI guess this LoRA is the missing piece. NVIDIA stated recently that GPT bots will become one million times more powerful in ten years. Many people doubted that. With LoRA, I see a much higher improvement. These guys claim a 10000 times reduction in parameter size. A different way to look at it, is that with the current hardware you can train a model that has 10000 times more parameters. If you add a 100x improvement in hardware in 10 years (not at all unrealistic), that's the million. But we will have significant improvements in training methods too.
- flangola7 4y agoWhere do you find 10,000 more data?
- nathanasmith 4y agoAudio, video, and LLMs enabled for real world interaction will pave part of the way for sure.
- flangola7 4y agoThey have already ingested most of the internet and all popular and semi popular books. If your plan doesn't involve every person on Earth wearing a go pro and uploading it to OpenAI you will have difficulty finding 9,999 more internets and libraries of congress.
- 4y ago
- slicktux 4y agoAnyone else click on this thinking it was about the wireless protocol?
- y3sar 4y agoBoth are fascinating tech
- nico 4y agoCan a model be fine-tuned “online”? If cost wasn’t an issue, could I fine-tune a model in real time, while also using it for inference?
- joshka 4y agoStats from https://replicate.com/blog/replicate-alpaca https://replicate.com/blog/replicate-alpaca suggest 90 minutes on 4 x A100/80GB. This is 3.5 hours on A100/40GB - I'm guessing LoRA is probably parallizable.
- all2 4y agoStats from TFA say 3 hours to fine tune on an A100 processor.
- all2 4y agoI wonder if one could "fine tune" specific layer values... That might be faster than updating every weight in every layer.
- nico 4y agoOr “multiplex” fine-tuning with inference, ie. do fine-tuning for 100ms, inference for 100ms, then tuning again… etc Btw, is there a way to combine two or more models? So for example, if I create 5 copies of a model, then fine-tune each copy with a different dataset -> can the 5 datasets be merged together somehow to create a model that has the learning of the 5?
- nl 4y agoLoRA is an alternative to traditional fine tuning (which is usually done on specific layers as you mentioned). To quote the LoRA paper[1]: > We hypothesize that the change in weights during model adaptation also has a low “intrinsic rank”, leading to our proposed Low-Rank Adaptation (LoRA) approach. LoRA allows us to train some dense layers in a neural network indirectly by optimizing rank decomposition matrices of the dense layers’ change during adaptation instead, while keeping the pre-trained weights frozen It's truly revolutionary: It basically lets you create a very small "diff" which you apply yo an existing model and it is suddenly fine tuned. These diff models are very small (5M for example). [1] https://arxiv.org/abs/2106.09685 https://arxiv.org/abs/2106.09685
- eachro 4y agoHow does LoRA save more than 50% of the memory usage? I see that the weight updates have much lower memory footprint by virtue if being low rank. But you still need the dense weights for the forward pass dont you?
- leereeves 4y agoI'm not an expert, but I believe it only saves memory in the final model, after training is done, by merging the low rank LoRA wrapper matrices with the original weight matrices. For example, if an original layer has N inputs and outputs (an NxN weight matrix) LoRa adds a 16xN matrix before it and an Nx16 matrix after it, trains only those new matrices, and finally multiplies all three matrices to get a single 16x16 matrix.
- rcarmo 4y agoSo they use cog before installing it? Apparently this wasn’t proofread. Also, is it just me or there are currently more ways to run LLMs on a CPU than on a GPU springing up on GitHub? I have hacked my own, but my chat UI is awful, so what is the nicest, pre-packaged CUDA-friendly way to run this now?
- syntaxing 4y agoThe easiest way to run alpaca Lora locally is with this little known fork [1] that uses Docker. You’ll be up and running in about 20 min with pretty much any modern consumer Nvidia GPU. [1] https://github.com/chris-alexiuk/alpaca-lora https://github.com/chris-alexiuk/alpaca-lora
- techn00 4y agoIt feels like I'm living in a cartoon with all these terms: > In this blog post, we’ll show you how to use LoRA to fine-tune LLaMA using Alpaca training data.
- mnreef 4y agoHi All, I have a noob question. I have been reading about Alpaca and Alpaca Lora. I have a use case in which I want to fine tune/train Alpaca Lora on a large corpus of books which are in the txt format. I know for Alpaca, the data was in "Instruction : Prompt" format. however, my text is huge and is not in that format. It's simply a library of books and journal articles. I want to be able to ask a question and the model answers based on the books I trained it on. I also want to be able to ask general questions for example which books discussed topic x or y. I have tried OpenAI's API to create embeddings, but I want to use Alpaca. I really appreciate your help.