flash-attention VS RWKV-LM

Compare flash-attention vs RWKV-LM and see what are their differences.

flash-attention

Fast and memory-efficient exact attention (by Dao-AILab)

RWKV-LM

RWKV is an RNN with transformer-level LLM performance. It can be directly trained like a GPT (parallelizable). So it's combining the best of RNN and transformer - great performance, fast inference, saves VRAM, fast training, "infinite" ctx_len, and free sentence embedding. (by BlinkDL)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
flash-attention RWKV-LM
26 84
10,524 11,511
7.5% -
9.4 8.7
8 days ago 8 days ago
Python Python
BSD 3-clause "New" or "Revised" License Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

flash-attention

Posts with mentions or reviews of flash-attention. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-10.

RWKV-LM

Posts with mentions or reviews of RWKV-LM. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-09.
  • People who've used RWKV, whats your wishlist for it?
    9 projects | /r/LocalLLaMA | 9 Dec 2023
  • Q-Transformer: Scalable Reinforcement Learning via Autoregressive Q-Functions
    3 projects | news.ycombinator.com | 19 Sep 2023
    This is what RWKV (https://github.com/BlinkDL/RWKV-LM) was made for, and what it will be good at.

    Wow. Pretty darn cool! <3 :'))))

  • Personal GPT: A tiny AI Chatbot that runs fully offline on your iPhone
    14 projects | /r/ChatGPT | 30 Jun 2023
    Thanks for the support! Two weeks ago, I'd have said longer contexts on small on-device LLMs are at least a year away, but developments from last week seem to indicate that it's well within reach. Once the low hanging product features are done, I think it's a worthy problem to spend a couple of weeks or perhaps even months on. Speaking of context lengths, recurrent models like RWKV technically have infinite context lengths, but in practice the context slowly fades away after a few thousands of tokens.
    14 projects | /r/ChatGPT | 30 Jun 2023
    Thanks! Those are great names, I'll keep them in mind. TBH, I might even get rid of the GPT suffix, since I've might eventually be moving on to non-transformer models like RWKV. I've been experimenting a bit with its smaller variants, and they're quite impressive!
  • The Secret Sauce behind 100K context window in LLMs: all tricks in one place
    3 projects | news.ycombinator.com | 17 Jun 2023
    I've been pondering the same thing, as simply extending the context window in a straightforward manner would lead to a significant increase in computational resources. I've had the opportunity to experiment with Anthropics' 100k model, and it's evident that they're employing some clever techniques to make it work, albeit with some imperfections. One interesting observation is that their prompt guide recommends placing instructions after the reference text when inputting lengthy text bodies. I noticed that the model often disregarded the instructions if placed beforehand. It's clear that the model doesn't allocate the same level of "attention" to all parts of the input across the entire context window.

    Moreover, the inability to cache transformers makes the use of large context windows quite costly, as all previous messages must be sent with each call. In this context, the RWKV-LM project on GitHub (https://github.com/BlinkDL/RWKV-LM) might offer a solution. They claim to achieve performance comparable to transformers using an RNN, which could potentially handle a 100-page document and cache it, thereby eliminating the need to process the entire document with each subsequent query. However, I suspect RWKV might fall short in handling complex tasks that require maintaining multiple variables in memory, such as mathematical computations, but it should suffice for many scenarios.

    On a related note, I believe Anthropics' Claude is somewhat underappreciated. In some instances, it outperforms GPT4, and I'd rank it somewhere between GPT4 and Bard overall.

  • New model: RWKV-4-Raven-7B-v12-Eng49%-Chn49%-Jpn1%-Other1%-20230530-ctx8192.pth
    5 projects | /r/LocalLLaMA | 31 May 2023
    See https://github.com/BlinkDL/RWKV-LM for details on the RWKV Language Model (100% RNN).
    5 projects | /r/LocalLLaMA | 31 May 2023
  • Overcoming the 2k context limit with a new model: RWKV
    2 projects | /r/Oobabooga | 24 May 2023
  • March 2023
    13 projects | /r/dailyainews | 23 May 2023
    RWKV is an RNN with Transformer-level LLM performance, which can also be directly trained like a GPT transformer (parallelizable). (https://github.com/BlinkDL/RWKV-LM)
    20 projects | /r/dailyainews | 23 May 2023
    22-Mar-2023 Adobe unveils creative generative AI model, Firefly, to aid content creation Google has begun rolling out early access to its Bard chatbot in the US and UK Data Breach At ChatGPT? Users Report Seeing Unknown Conversations On Their Screens GPT-4 is available in preview in Azure OpenAI Service AI-powered coding assistance REPL that pairs GPT-4 (https://github.com/jiggy-ai/pair) Open source alternative to ChatGPT (https://github.com/nichtdax/awesome-totally-open-chatgpt) Run 100B+ language models at home, BitTorrent‑style (https://petals.ml/) Find the most relevant piece of code context. Hover and highlight blocks of code, the tool will point you to the most relevant pieces of information on git, messaging, and ticketing systems. Finally, it provide a summary with the power of GPT.(https://www.watermelontools.com/) Why AI Won't Replace Software Engineers (https://softwarecomplexity.com/why-ai-wont-replace-software-engineers) 23-Mar-2023 'The iPhone Moment of AI' Nvidia to Rent Out Supercomputers Behind ChatGPT to Businesses for $37,000 a Month Bill Gates calls AI revolutionary, says it can reduce some of the world’s worst inequities AI pics of Donald Trump's arrest by 'cop' Joe Biden go viral. Will we no longer be able to tell what’s real vs what’s fake?” - Eluna AI New research shows we can only accurately identify AI writers about 50% of the time. (https://hai.stanford.edu/news/was-written-human-or-ai-tsu) FauxPilot - an open-source GitHub Copilot server(https://github.com/fauxpilot/fauxpilot) Flower , an open-source framework for training AI on distributed data. We move the model to the data instead of moving the data to the model. (https://flower.dev/) OpenAI-Integrated Microsoft Bing Outperforms Google in Page Visits (https://www.gadgets360.com/internet/news/openai-integrated-microsoft-bing-outperforms-google-page-visits-growth-3885069) GitHub Copilot X: GitHub Copilot is evolving to bring chat and voice interfaces, support pull requests, answer questions on docs, and adopt OpenAI’s GPT-4 for a more personalized developer experience. (https://github.blog/2023-03-22-github-copilot-x-the-ai-powered-developer-experience/) Moonshine – open-source, pretrained ML models for satellite (https://github.com/moonshinelabs-ai/moonshine) Mozilla.ai: A startup — and a community — that will build a trustworthy and independent open-source AI ecosystem. Mozilla.ai’s initial focus? Tools that make generative AI safer and more transparent. And, people-centric recommendation systems that don’t misinform or undermine our well-being. (https://blog.mozilla.org/en/mozilla/introducing-mozilla-ai-investing-in-trustworthy-ai/) OpenAI’s policies hinder reproducible research on language models (https://aisnakeoil.substack.com/p/openais-policies-hinder-reproducible) 24-Mar-2023 Adobe has added AI features to Photoshop and Illustrator, while Nvidia has unveiled ‘Picasso’ AI image generation service. ChatGPT-owner OpenAI fixes 'significant issue' exposing user chat titles.A bug in an open-source library caused ChatGPT to leak user conversation titles. Graphic design platform Canva introduces new generative AI tools Gmail for Android, Google Messages to Soon Get Features for AI-Generated Texts Apple: Transformer architecture optimized for Apple Silicon (https://github.com/apple/ml-ane-transformers) ChatGPT plugins, join waitlist (https://openai.com/blog/chatgpt-plugins) Microsoft's paper on OpenAI's GPT-4 had hidden information (https://twitter.com/DV2559106965076/status/1638769434763608064) how to use LoRA to fine-tune LLaMA using Alpaca training data (https://replicate.com/blog/fine-tune-alpaca-with-lora) Helicone: one-line integration logs the prompts, completions, latencies, and costs of your OpenAI requests (https://github.com/Helicone/helicone) RWKV is an RNN with Transformer-level LLM performance, which can also be directly trained like a GPT transformer (parallelizable). (https://github.com/BlinkDL/RWKV-LM) open-source retrieval plugin The open-source retrieval plugin enables ChatGPT to access personal or organizational information sources (with permission). It allows users to obtain the most relevant document snippets from their data sources, such as files, notes, emails or public documentation, by asking questions or expressing needs in natural language. Security considerations The retrieval plugin allows ChatGPT to search a vector database of content, and add the best results into the ChatGPT session. This means it doesn’t have any external effects, and the main risk is data authorization and privacy. Developers should only add content into their retrieval plugin that they are authorized to use and can share in users’ ChatGPT sessions. https://github.com/openai/chatgpt-retrieval-plugin 27-Mar-2023 Autodoc: Toolkit for auto-generating codebase documentation using LLMs (https://github.com/context-labs/autodoc) March 20 ChatGPT outage: Here’s what happened (https://openai.com/blog/march-20-chatgpt-outage) Facebook is going after LLaMA repos with DMCA's (https://twitter.com/theshawwn/status/1638925249709240322) ChatGPT + Wolfram is INSANE! (https://old.reddit.com/r/ChatGPT/comments/1205omc/chatgpt\_wolfram\_is\_insane/) Reproducing the Stanford Alpaca results using low-rank adaptation (LoRA) (https://github.com/chris-alexiuk/alpaca-lora) GOAT, a decentralized way to publish and download AI models.Powered by BitTorrent and Bitcoin.(https://ipfs.io/ipfs/QmYyucgBQVfs9JXZ2MtmkGPAhgUjNgyGE6rcJT1KybQHhp/index.html) Dolly from databricks (https://www.databricks.com/blog/2023/03/24/hello-dolly-democratizing-magic-chatgpt-open-models.html) AI powered Developer Tools 2.0. https://www.sequoiacap.com/article/ai-powered-developer-tools/ Turn your designs into production-ready front-end code for mobile apps and the web (https://www.locofy.ai/) Using ChatGPT Plugins with LLaMA (https://blog.lastmileai.dev/using-openais-retrieval-plugin-with-llama-d2e0b6732f14) 28-Mar-2023 Bing AI now allows 20 prompts per session and can make images for you ChatGPT Outperforms Crowd-Workers for Text-Annotation Tasks (https://arxiv.org/abs/2303.15056) ChatGPT or Grammarly? Evaluating ChatGPT on Grammatical Error Correction Benchmark (https://arxiv.org/abs/2303.13648) AI-controlled Linux Containers (https://github.com/fafrd/aquarium) Microsoft reportedly orders AI chatbot rivals to stop using Bing’s search data (https://www.theverge.com/2023/3/25/23656336/microsoft-chatbot-rivals-stop-using-bing-search-index) 29-Mar-2023 Text2Video-Zero Code and Weights Released by Picsart AI Research (12G VRAM).(https://github.com/Picsart-AI-Research/Text2Video-Zero) Pause Giant AI Experiments: An Open Letter. Huggingface's SF Open-Source AI Meetup officially has 2000 people registered. Cerebras open sources seven GPT-3 models from 111 million to 13 billion parameters. Trained using the Chinchilla formula, these models set new benchmarks for accuracy and compute efficiency.(https://www.cerebras.net/blog/cerebras-gpt-a-family-of-open-compute-efficient-large-language-models/) Independent implementation of LLaMA that is fully open source under the Apache 2.0 license (https://github.com/Lightning-AI/lit-llama) Bootstrap knowledge of LLMs (https://gist.github.com/rain-1/eebd5e5eb2784feecf450324e3341c8d) OPENFLAMINGO: AN OPEN-SOURCE FRAMEWORK FOR TRAINING VISION-LANGUAGE MODELS WITH IN-CONTEXT LEARNING (https://laion.ai/blog/open-flamingo/) gpt4all: a chatbot trained on a massive collection of clean assistant data including code, stories and dialogue (https://github.com/nomic-ai/gpt4all) 30-Mar-2022 Microsoft Security Copilot is a new GPT-4 AI assistant for cybersecurity (https://www.theverge.com/2023/3/28/23659711/microsoft-security-copilot-gpt-4-ai-tool-features) UK details ‘pro-innovation’ approach to AI regulation (https://www.artificialintelligence-news.com/2023/03/29/uk-details-pro-innovation-approach-ai-regulation/) Employees Are Feeding Sensitive Biz Data to ChatGPT, Raising Security Fears (https://www.darkreading.com/risk/employees-feeding-sensitive-business-data-chatgpt-raising-security-fears) In the Age of AI, Don't Let Your Skills Atrophy (https://www.cyberdemon.org/2023/03/29/age-of-ai-skill-atrophy.html) Now ChatGPT is being (mis)used to do #PeerReview (https://mstdn.science/@ukrio/110100752908161183) Bing Chat now has Ads! (https://twitter.com/debarghya\_das/status/1640892791923572737) Cerebras-GPT vs LLaMA AI Model Comparison (https://www.lunasec.io/docs/blog/cerebras-gpt-vs-llama-ai-model-comparison/) Arthur C. Clarke about the future of AI. — 21 September 1964 (https://twitter.com/Rainmaker1973/status/1640016339011076097) ColossalChat: An Open-Source Solution for Cloning ChatGPT With a Complete RLHF Pipeline (https://medium.com/@yangyou\_berkeley/colossalchat-an-open-source-solution-for-cloning-chatgpt-with-a-complete-rlhf-pipeline-5edf08fb538b) Create and Embed Custom AI Assistants with Libraria (https://libraria.dev/) 31-Mar-2023 Deranged New AI Has No Guardrails Whatsoever, Proudly Praises Hitler (https://futurism.com/deranged-ai-no-guardrails) Midjourney Kills Free AI Image Generator Access After Explosion of Deep Fakes (https://decrypt.co/124972/midjourney-free-ai-image-generation-stopped-over-deepfakes) Judge asks ChatGPT to decide bail in murder trial (https://nypost.com/2023/03/29/judge-asks-chatgpt-for-decision-in-murder-trial/) Should you use OpenAI's embeddings? Probably not, and here's why. (https://iamnotarobot.substack.com/p/should-you-use-openais-embeddings) Visual Studio Code and GitHub Copilot (https://code.visualstudio.com/blogs/2023/03/30/vscode-copilot) Llama Hub (https://llamahub.ai/) Finetuning LLMs on a Single GPU Using Gradient Accumulation (https://lightning.ai/pages/blog/gradient-accumulation/) Open source ETL framework for retrieval augmented generation (RAG). Sync data from your SaaS tools to a vector store, where they can be easily queried by GPT apps (https://github.com/ai-sidekick/sidekick) HALTT4LLM - Hallucination Trivia Test for Large Language Models (https://github.com/manyoso/haltt4llm) Vicuna: An Open-Source Chatbot Impressing GPT-4 with 90%* ChatGPT Quality (https://vicuna.lmsys.org/) Iterate.ai Brings Generative AI Capabilities to Interplay, the Low-Code Platform Accelerating Customers’ Digital Innovation (https://www.indianweb2.com/2023/03/iterateai-brings-generative-ai.html) RFdiffusion is an open source method for structure generation, with or without conditional information (a motif, target etc). (https://github.com/RosettaCommons/RFdiffusion) Google denies training Bard on ChatGPT chats from ShareGPT

What are some alternatives?

When comparing flash-attention and RWKV-LM you can also consider the following projects:

xformers - Hackable and optimized Transformers building blocks, supporting a composable construction.

TensorRT - NVIDIA® TensorRT™ is an SDK for high-performance deep learning inference on NVIDIA GPUs. This repository contains the open source components of TensorRT.

DeepSpeed - DeepSpeed is a deep learning optimization library that makes distributed training and inference easy, efficient, and effective.

llama - Inference code for Llama models

memory-efficient-attention-pytorch - Implementation of a memory efficient multi-head attention as proposed in the paper, "Self-attention Does Not Need O(n²) Memory"

alpaca-lora - Instruct-tune LLaMA on consumer hardware

koboldcpp - A simple one-file way to run various GGML and GGUF models with KoboldAI's UI

gpt4all - gpt4all: run open-source LLMs anywhere

alpaca_lora_4bit

RWKV-CUDA - The CUDA version of the RWKV language model ( https://github.com/BlinkDL/RWKV-LM )

nanoGPT - The simplest, fastest repository for training/finetuning medium-sized GPTs.

text-generation-webui - A Gradio web UI for Large Language Models. Supports transformers, GPTQ, AWQ, EXL2, llama.cpp (GGUF), Llama models.