90 points · by swyx · 3y ago · 65 comments
Not an NLP person, so apologies in advance if I've missed any obvious papers or references.
With 4-bit quants, and the optimizations for batch=1 with llama.cpp, Exllama, MLC on the edge side, and on continuous batching w/ vLLM and the like on the high throughput side, I think performance (in terms of speed) is not as pressing, at least while people are pushing hardest on the capabilities front. Meanwhile, the quality of the best Llama 2 (and even the last-gen of Llama 1) models have blown by the existing RWKV models (although I'm definitely interested in kicking the tires on RWKV-5 when it's out). Also, I recently stepped back into RWKV world to check up on what was going on, and I was actually a bit shocked at how night and day the tooling/ecosystem is now. While it's not all roses the open LLM side, there's enough critical mass where the evolution has been ... extremely rapid, to say the least.
I think over the next few years, obviously there will be architectural improvement that succeeds the current crop of dense transformer LLMs (one might argue that's already happening piece by piece), and I'm happy there are experiments like RWKV going on, so I guess we'll just have to see in terms of what scales and what doesn't.
Tooling/Ecosystem is something that I am actively working on as there is still a gap to transformers level of tooling. But i'm glad that there is a noticeable difference!
And yes! experiments are important, to ensure improvements in the architecture. Even if "Linear Transformers" replaces "Transformers". Alternatives should always be explored, to learn from such trade-offs to the benefit of the ecosystem
(This was lightly covered in the podcast, where I share IMO that we should have more research into text based diffusion networks)
Some of it may just be the docs. I think one easy improvement is that when you search for RWKV, you end up on the Github page, but the README basically goes from a description of the model, to a short snippet of sample inference code, to a list of implementations, to a bunch of random research notes? It's a bit scattered and pretty hard to read, but should be easy to clean up.
From a practical perspective for example, there's no list/description in the repo or the model cards on all the different versions at https://huggingface.co/BlinkDL (world, raven, pile, novel, pileplus, etc) and while it says RWKV-4-World is the "best" model, it's only a 7B and Raven 14B is listed above and says it's fine-tuned (while World is not)? Which is actually better? Unsure, no benchmarks (even the spreadsheet screenshots eventually listed don't give any info, nor do the model cards) - even as someone returning to RWKV this was very confusing. Compare it to what the Llama community is doing these days with model cards (eg https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-... or for quants https://huggingface.co/TheBloke/WizardCoder-Guanaco-15B-V1.0...)
Also, for those not familiar with the project at all, I think a slightly expanded/better organized "Usage" section I think would be helpful in terms of getting up and running (it doesn't help that multiple implementations each have their own quant formats). I feel like have a section that would get a user easily up and running (I think ExLlama and MLC both do a good job here) would be helpful. Again, some of this might just be a pass of cleaning up/better organizing the docs.
bottomline is this thing is being built by the community that uses it - there is no higher form of dogfooding. if you wanna wait 3-4 years for big names to use it before you take it seriously, then we'll just have to wait. i call this out explictly on the pod intro that i'm trying to be early here, i think we might be the first big ai pod to seriously cover RWKV
There is microsoft paper on retnet: https://arxiv.org/abs/2307.08621 And the stanford heyena paper: https://arxiv.org/abs/2302.10866
Do note that both cited are competing alternatives for linear transformers, and in some sense competes with RWKV, in this upcoming "linear transfromer architecture" trend.
---
While all the above validates architecture. It's important to separate out architecture design from dataset.
The quality of an AI model answers, is equal parts as much about the dataset, than the architecture used. This is why it makes less sense comparing LLaMA2 directly with retnet/RWKV for example, due to the large differences in dataset size.
> Disclaimer: I am the same Eugene in the podcast
Well we did at Stability AI which is why we provided and scaled compute for it.
They have the potential for far better edge inference and also benefits longer context windows.
There are other architectures out there too we are supporting, I would be surprised if the current transformer LLM paradigm is what we use in a few years.
> They have the potential for far better edge inference and also benefits longer context windows. ... I would be surprised if the current transformer LLM paradigm is what we use in a few years.
What are the studies/evidence that convinced you? Given the current landscape, the last claim is quite bold.
Especially in the text space that you feel will change the current transformer LLM paradigm?
In the podcast as well, I was being very transparent that I am happily using transformers (Salesforce codegen) in production for my primary work use cases, and I am still happily doing so.
My work into RWKV is to support a new usecase which transformer could not support even today. And in no means should it threaten your happiness factor in using existing AI models.
I suspect in the long run, AI architecture wars may slowly mirror that of the database wars, in software development (SQL vs NoSQL vs ??)
Each of them will have substantial benefits in one use case over another. And may have many overlaps, with lots of happy users for all of them =)
There are also trade offs around their specific attention mechanism. It's approximate and consists of an exponential decay across time steps and some constant that represents the magnitude of the attention at that time step. The decay means for long running contexts it in theory will loses some of the ability to recall nuance you see with perfect attention on longer sequences. This isn't a specific problem of RWKV, but really any decay based attention.
A perk of the formulation is the attention computation is linear in time complexity and only requires one additional serial scan at the end, so you get nicer scaling properties than quadratic perfect attention for the trade off in lossy attention.
The examples in the original paper don't show this to be a problem, but they also show much shorter sequences. In the real world its a toss up, I'd expect it to be faster but more lossy for longer context windows.
TLDR: It has some teeth, but I think saying it's threatening is wishful thinking to some degree. Good model, looking forward to seeing larger sizes.
I view this as a case of the "benchmarks" and "datasets" not keeping up with the current progress, as the vast majority of benchmarks presumes the limit of up to 2k tokens. Which was cutting edge last year, but isn't today.
Internally we do have some benchmarking for how the decay over time affects lossy memory, and we are making major improvements in this direction for v5, and aim for no loss within the 8k to 100k and beyond context sizes. And hopefully with time, there will be more formalised standard benchmarks for larger context sizes.
Edit/PS: I believe until we get a sponsor for the compute required to build on similar scale and dataset compared to LLaMA2, so that we can have that "showdown" - we would be stuck - in its non threatening status. As there will always be that shadow of doubt, if it can scale to the next milestone that transformers have already crossed.
Simply believing a architecture is superior doesn't make it so. Nothing converges and performs as good as a model with attention in both training and inference. The difference is night and day.
And I would look into getting it better supported in upcoming datasets we train with =)
( I mean this genuinely, we have an entire discord channel for #failed-task to help us keep track and push for the model to be better )
https://github.com/lucidrains/DALLE-pytorch/issues/116 is where the discord got kicked off originally. There's a lot of other interactions between us in the github there. You should be able to find when Phil was approached by Jenia Jitsev, Jan Ebert, and Mehdi Cherti (all starting LAION members) who graciously offered the chance to replicate the DALL-E paper using their available compute at the JUWELS and JUWELS Booster HPC system. This all predates Emad's arrival. I believe he showed up around the time guided diffusion and GLIDE, but it may have been a bit earlier.
Data work originally focused on amassing several of the bigger datasets of the time. Getting CC12M downloaded and trained on was something of an early milestone (robvanvolt's work). A lot of early work was like that though, shuffling through CC12M, COCO, etc. with the dalle-pytorch codebase until we got an avocado armchair.
Christophe Schumann was an early contributor as well and great at organizing and rallying. He focused a lot on the early data scraping work for what would become the "LAION5B" dataset. I don't want to credit him with the coding and I'm ashamed to admit I can't recall who did much of the work there - but a distributed scraping program was developed (the name was something@home... not scraping@home?).
I should also mention Romain Beaumont, an original member. His work on clip-retrieval was great and allowed us to eventually ship CLIP embeddings data for LAION5B and do semantic search over the dataset. He worked on a lot there however, including code for training and model architecture. Smart guy! I have heard he's now with Stability? Haven't confirmed though.
The discord link on Phil Wang's readme at dalle-pytorch got a lot of traffic and a lot of people who wanted to pitch in with the scraping effort.
Eventually a lot of people from Eleuther and many other teams mingled with us, some sort of non-profit org was created in Germany I believe for legal purposes. The dataset continued to grow and the group moved from training DALLE's to finetuning diffusion models. Eventually it was decided by core members that we should get a proper name and LAION was chosen.
The `CompVis` team were great inspiration at the time and much of their work on VQGAN and then latent diffusion models basically kept us motivated. As I mentioned a personal motivation was Katherine Crowson's work on a variety of things like CLIP-guided vqgan, diffusion, etc.
I believe Emad Mostaque showed up around the time GLIDE was coming out? I want to say he donated money for scrapers to be run on AWS to speed up data collection. I was largely hands off for much of the data scraping process and mostly enjoyed training new models on data we had.
As with any online community things got pretty ill-defined, roles changed over, volunteers came/went, etc. I would hardly call this definitive and that's at least partially the reason it's hard to trace as an outsider. That much of the early history is scattered about GitHub issues and PR's can't have helped though.
Wait I remember - it was called crawling@home.
So while I'm not sure that the RWKV movement will see more widespread adoption than the corporate LLM implementation movement - I think there's probably still more goodness to come out of Eleuther community
But unfortunately, the people as large has kinda spoken, and voted by their usage. And ultimately for community engagement, their decision is something I have to accept as well.
Better to have a messy growing discord with active users, then a forum with little to no engagement.
For better search indexing, and making things more accessible, I help constantly move links / items from the discord into the more public github wiki : https://wiki.rwkv.com/
(PS: our discord is fully public for anyone to signup/access)
> The work we do would not be possible without the generous support of our donors and other sponsors: Core Weave, HuggingFace, Google TRC, Nat Friedman, Lambda Labs
Conjecture was meant to be alignment so can't really support, stability scaled resource provision.
I wish there were something I could do in AI alignment, I really do, but it's beyond me.
("Aligning" meaning "making it work at all" is real, but then it's just a synonym for "engineering".)
what are the discords for Eleuther and RWBY are they public?
> Core Weave, HuggingFace, Google TRC, Nat Friedman, Lambda Labs
Core are full time Stability AI
And they have integrations with comment systems like giscus.