LLaVA VS LoRA

Compare LLaVA vs LoRA and see what are their differences.

LLaVA

[NeurIPS'23 Oral] Visual Instruction Tuning (LLaVA) built towards GPT-4V level capabilities and beyond. (by haotian-liu)

LoRA

Code for loralib, an implementation of "LoRA: Low-Rank Adaptation of Large Language Models" (by microsoft)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
LLaVA LoRA
20 34
16,101 9,046
- 8.6%
9.4 5.4
6 days ago about 2 months ago
Python Python
Apache License 2.0 MIT License
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.

LLaVA

Posts with mentions or reviews of LLaVA. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-10.
  • Show HN: I Remade the Fake Google Gemini Demo, Except Using GPT-4 and It's Real
    4 projects | news.ycombinator.com | 10 Dec 2023
    Update: For anyone else facing the commercial use question on LLaVA - it is licensed under Apache 2.0. Can be used commercially with attribution: https://github.com/haotian-liu/LLaVA/blob/main/LICENSE
  • Image-to-Caption Generator
    3 projects | /r/computervision | 7 Dec 2023
    https://github.com/haotian-liu/LLaVA (fairly established and well supported)
  • Llamafile lets you distribute and run LLMs with a single file
    12 projects | news.ycombinator.com | 29 Nov 2023
    That's not a llamafile thing, that's a llava-v1.5-7b-q4 thing - you're running the LLaVA 1.5 model at a 7 billion parameter size further quantized to 4 bits (the q4).

    GPT4-Vision is running a MUCH larger model than the tiny 7B 4GB LLaVA file in this example.

    LLaVA have a 13B model available which might do better, though there's no chance it will be anywhere near as good as GPT-4 Vision. https://github.com/haotian-liu/LLaVA/blob/main/docs/MODEL_ZO...

  • FLaNK Stack Weekly for 27 November 2023
    28 projects | dev.to | 27 Nov 2023
  • Using GPT-4 Vision with Vimium to browse the web
    9 projects | news.ycombinator.com | 8 Nov 2023
    There are open source models such as https://github.com/THUDM/CogVLM and https://github.com/haotian-liu/LLaVA.
  • Is supervised learning dead for computer vision?
    9 projects | news.ycombinator.com | 28 Oct 2023
    Hey Everyone,

    I’ve been diving deep into the world of computer vision recently, and I’ve gotta say, things are getting pretty exciting! I stumbled upon this vision-language model called LLaVA (https://github.com/haotian-liu/LLaVA), and it’s been nothing short of impressive.

    In the past, if you wanted to teach a model to recognize the color of your car in an image, you’d have to go through the tedious process of training it from scratch. But now, with models like LLaVA, all you need to do is prompt it with a question like “What’s the color of the car?” and bam – you get your answer, zero-shot style.

    It’s kind of like what we’ve seen in the NLP world. People aren’t training language models from the ground up anymore; they’re taking pre-trained models and fine-tuning them for their specific needs. And it looks like we’re headed in the same direction with computer vision.

    Imagine being able to extract insights from images with just a simple text prompt. Need to step it up a notch? A bit of fine-tuning can do wonders, and from my experiments, it can even outperform models trained from scratch. It’s like getting the best of both worlds!

    But here’s the real kicker: these foundational models, thanks to their extensive training on massive datasets, have an incredible grasp of image representations. This means you can fine-tune them with just a handful of examples, saving you the trouble of collecting thousands of images. Indeed, they can even learn with a single example (https://www.fast.ai/posts/2023-09-04-learning-jumps)

  • Adept Open Sources 8B Multimodal Modal
    6 projects | news.ycombinator.com | 18 Oct 2023
    Fuyu is not open source. At best, it is source-available. It's also not the only one.

    A few other multimodal models that you can run locally include IDEFICS[0][1], LLaVA[2], and CogVLM[3]. I believe all of these have better licenses than Fuyu.

    [0]: https://huggingface.co/blog/idefics

    [1]: https://huggingface.co/HuggingFaceM4/idefics-80b-instruct

    [2]: https://github.com/haotian-liu/LLaVA

    [3]: https://github.com/THUDM/CogVLM

  • AI — weekly megathread!
    2 projects | /r/artificial | 15 Oct 2023
    Researchers released LLaVA-1.5. LLaVA (Large Language and Vision Assistant) is an open-source large multimodal model that combines a vision encoder and Vicuna for general-purpose visual and language understanding. LLaVA-1.5 achieved SoTA on 11 benchmarks, with just simple modifications to the original LLaVA and completed training in ~1 day on a single 8-A100 node [Demo | Paper | GitHub].
  • LLaVA: Visual Instruction Tuning: Large Language-and-Vision Assistant
    1 project | news.ycombinator.com | 11 Oct 2023
  • LLaVA gguf/ggml version
    1 project | /r/LocalLLaMA | 19 Sep 2023
    Hi all, I’m wondering if there is a version of LLaVA https://github.com/haotian-liu/LLaVA that works with gguf and ggml models?? I know there is one for miniGPT4 but it just doesn’t seem as reliable as LLaVA but you need at least 24gb of vRAM for LLaVA to run it locally by the looks of it. The 4bit version still requires 12gb vram.

LoRA

Posts with mentions or reviews of LoRA. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-08.
  • DECT NR+: A technical dive into non-cellular 5G
    1 project | news.ycombinator.com | 2 Apr 2024
    This seems to be an order of magnitude better than LoRa (https://lora-alliance.org/ not https://arxiv.org/abs/2106.09685). LoRa doesn't have all the features this one does like OFDM, TDM, FDM, and HARQ. I didn't know there's spectrum dedicated for DECT use.
  • Training LLMs Taking Too Much Time? Technique you need to know to train it faster
    1 project | dev.to | 3 Mar 2024
    So to solve this, we tried researching into some optimization techniques and we found LoRA, Which stands for Low-Rank Adaptation of Large Language Models.
  • OpenAI employee: GPT-4.5 rumor was a hallucination
    1 project | news.ycombinator.com | 17 Dec 2023
    > Anyone have any ideas / knowledge on how they deploy little incremental fixes to exploited jailbreaks, etc?

    LoRa[1] would be my guess.

    For detailed explanation I recommend the paper. But the short explanation is that it is a trick which lets you train a smaller, lower dimensional model which when you add to the original model it gets you the result you want.

    1: https://arxiv.org/abs/2106.09685

  • Can a LoRa be used on models other than Stable Diffusion?
    2 projects | /r/StableDiffusion | 8 Dec 2023
    LoRA was initially developed for large language models, https://arxiv.org/abs/2106.09685 (2021). It was later that people discovered that it worked REALLY well for diffusion models.
  • StyleTTS2 – open-source Eleven Labs quality Text To Speech
    10 projects | news.ycombinator.com | 19 Nov 2023
    Curious if we'll see a Civitai-style LoRA[1] marketplace for text-to-speech models.

    1 = https://github.com/microsoft/LoRA

  • Andreessen Horowitz Invests in Civitai, Which Profits from Nonconsensual AI Porn
    1 project | news.ycombinator.com | 14 Nov 2023
    From https://arxiv.org/abs/2106.09685:

    > LoRA: Low-Rank Adaptation of Large Language Models

    > An important paradigm of natural language processing consists of large-scale pre-training on general domain data and adaptation to particular tasks or domains. As we pre-train larger models, full fine-tuning, which retrains all model parameters, becomes less feasible. Using GPT-3 175B as an example -- deploying independent instances of fine-tuned models, each with 175B parameters, is prohibitively expensive. We propose Low-Rank Adaptation, or LoRA, which freezes the pre-trained model weights and injects trainable rank decomposition matrices into each layer of the Transformer architecture, greatly reducing the number of trainable parameters for downstream tasks. Compared to GPT-3 175B fine-tuned with Adam, LoRA can reduce the number of trainable parameters by 10,000 times and the GPU memory requirement by 3 times. LoRA performs on-par or better than fine-tuning in model quality on RoBERTa, DeBERTa, GPT-2, and GPT-3, despite having fewer trainable parameters, a higher training throughput, and, unlike adapters, no additional inference latency.

  • Is supervised learning dead for computer vision?
    9 projects | news.ycombinator.com | 28 Oct 2023
    Yes, your understanding is correct. However, instead of adding a head on top of the network, most fine-tuning is currently done with LoRA (https://github.com/microsoft/LoRA). This introduces low-rank matrices between different layers of your models, those are then trained using your training data while the rest of the models' weights are frozen.
  • Run LLMs at home, BitTorrent‑style
    10 projects | news.ycombinator.com | 17 Sep 2023
    Somewhat yes. See "LoRA": https://arxiv.org/abs/2106.09685

    They're not composable in the sense that you can take these adaptation layers and arbitrarily combine them, but training different models while sharing a common base of weights is a solved problem.

  • New LoRa RF distance record: 1336 km / 830 mi
    1 project | news.ycombinator.com | 7 Sep 2023
    With all the naive AI zealotry on HN can you really fault me?

    They're referring to this:

    https://arxiv.org/abs/2106.09685

  • Open-source Fine-Tuning on Codebase with Refact
    2 projects | dev.to | 5 Sep 2023
    It's possible to fine-tune all parameters (called "full fine-tune"), but recently PEFT methods became popular. PEFT stands for Parameter-Efficient Fine-Tuning. There are several methods available, the most popular so far is LoRA (2106.09685) that can train less than 1% of the original weights. LoRA has one important parameter -- tensor size, called lora_r. It defines how much information LoRA can add to the network. If your codebase is small, the fine-tuning process will see the same data over and over again, many times in a loop. We found that for a smaller codebase small LoRA tensors work best because it won't overfit as much -- the tensors just don't have the capacity to fit the limited training set exactly. As the codebase gets bigger, tensors should become bigger as well. We also unfreeze token embeddings at a certain codebase size. To pick all the parameters automatically, we have developed a heuristic that calculates a score based on the source files it sees. This score is then used to determine the appropriate LoRA size, number of finetuning steps, and other parameters. We have tested this heuristic on several beta test clients, small codebases of several files, and large codebases like the Linux kernel (consisting of about 50,000 useful source files). If the heuristic doesn't work for you for whatever reason, you can set all the parameters yourself.

What are some alternatives?

When comparing LLaVA and LoRA you can also consider the following projects:

MiniGPT-4 - Open-sourced codes for MiniGPT-4 and MiniGPT-v2 (https://minigpt-4.github.io, https://minigpt-v2.github.io/)

LyCORIS - Lora beYond Conventional methods, Other Rank adaptation Implementations for Stable diffusion.

CogVLM - a state-of-the-art-level open visual language model | 多模态预训练模型

ComfyUI - The most powerful and modular stable diffusion GUI, api and backend with a graph/nodes interface.

FastChat - An open platform for training, serving, and evaluating large language models. Release repo for Vicuna and Chatbot Arena.

ControlNet - Let us control diffusion models!

mPLUG-Owl - mPLUG-Owl & mPLUG-Owl2: Modularized Multimodal Large Language Model

peft - 🤗 PEFT: State-of-the-art Parameter-Efficient Fine-Tuning.

llama.cpp - LLM inference in C/C++

alpaca-lora - Instruct-tune LLaMA on consumer hardware

image2dsl - This repository contains the implementation of an Image to DSL (Domain Specific Language) model. The model uses a pre-trained Vision Transformer (ViT) as an encoder to extract image features and a custom Transformer Decoder to generate DSL code from the extracted features.

LLaMA-Adapter - [ICLR 2024] Fine-tuning LLaMA to follow Instructions within 1 Hour and 1.2M Parameters