from Hacker News

Show HN: A fully open-source (Apache 2.0)implementation of llama

by osurits on 3/28/23, 5:33 PM with 52 comments

We believe that AI should be fully open source and part of the collective knowledge.

The original LLaMA code is GPL licensed which means any project using it must also be released under GPL.

This "taints" any other code and prevents meaningful academic and commercial use.

Lit-LLaMA solves that for good.

  • by adeon on 3/28/23, 7:35 PM

    I think implying that GPL is not "fully open source" is a hot take. It's specifically designed to ensure you and anyone you distribute your code gets the same freedoms. Maybe you don't agree that it's a good license but that is its intention. GPL vs BSD-type licenses I guess is decades long argument by now.

    Maybe I'm a naive idealist but IMO the GPL-family of licenses are underrated. You can use them to make sure you don't work for free for someone who won't share their improvements.

    I liked the choice of AGPL for AUTOMATIC1111 Stable Diffusion web UI. (https://github.com/AUTOMATIC1111/stable-diffusion-webui)

    Commercial interests are very allergic to AGPL which ensures the project stays community-run and new features and fixes will prioritize the most ordinary user doing things for fun.

  • by ipsum2 on 3/28/23, 8:48 PM

    FYI, there's something fishy going on in this thread. Multiple people from the LightningAI team theaniketmaurya (developer advocate for Lightning AI) and rasbt (developer at Lightning AI) are shilling for this post without disclosing their affiliations. The account that submitted this (osurits) also only has two comments, also with the same behavior.

    Having interacted with the Lightning AI team in the past, this is unsurprising behavior.

  • by querez on 3/28/23, 6:58 PM

    IANAL, but this seems very fishy to me: 1) I don't understand how this isn't a derivative work of the original code, as I very highly doubt you've done a clean room implementation. I doubt this would hold up in court.

    2) Doesn't the original FB license also apply to the weights? Just re-implementing the code would not change the license on the weights. So while THE CODE may now be re-licensed, the weights would still fall under the original license.

    I'd love if someone with more legal understanding could shed some light on this.

  • by 2Gkashmiri on 3/28/23, 6:26 PM

    Bs.

    Prevents meaningful academic.....

    How the hell does agpl prevent academic use? Commercial use sure because agpl follows 4 freedoms and commercial often wants to take someone else's work, slap their brand without acknowledging the original work. That and the downstream is often closed source for "business reasons" which causes their users to not enjoy the fruits of the first party's licensing.

    Where does academia come into it? Are researchers now keeping everything under wraps for "shareholders interests"?

    Isn't academia supposed to be open culture from the start without any restrictions so what am I missing or are they mixing two unrelated things?

    Also, I think I might be wrong but isn't it merely converting llama into their version? Uh ...

  • by alexb_ on 3/28/23, 7:33 PM

    >GPL...prevents meaningful academic and commercial use

    WTF are you talking about?

  • by homarp on 3/28/23, 8:14 PM

    llama.cpp is also MIT

    https://github.com/ggerganov/llama.cpp

    previously discussed here https://news.ycombinator.com/item?id=35100086

    and one of the rust wrapper: https://news.ycombinator.com/item?id=35171527 (also MIT)

  • by barefeg on 3/28/23, 7:00 PM

    But aren’t the weights still not for commercial use?
  • by ficiek on 3/28/23, 8:09 PM

    If you hate GPL so much then I assume that you don't run any GPL licensed code on your machines then. I admire your resolve because I would think that is pretty hard!
  • by javimh on 3/29/23, 11:29 PM

    No, the GPL doesn't prevent meaningful academic or commercial use; rather, it seeks to prevent individuals from taking advantage of free software to limit the freedom of other users. It is important to note that if you live in a free country, there are laws that protect the liberties of all citizens and prevent actions that could restrict those freedoms.
  • by blendergeek on 3/29/23, 1:11 AM

    > We believe that AI should be fully open source and part of the collective knowledge.

    As do I.

    > The original LLaMA code is GPL licensed which means any project using it must also be released under GPL.

    Yep. This ensures that AI is "fully open source and part of the collective knowledge."

    > This "taints" any other code and prevents meaningful academic and commercial use.

    Taints? As in "makes fully open source"? Isn't that the goal?

    > Lit-LLaMA solves that for good.

    Lit-LLaMA helps people create proprietary closed-source AI instead of the fully open source AI required by Llama. Okay.

  • by nynx on 3/28/23, 7:23 PM

    There are already a million ways to run LLaMA. This doesn't change the issue at all, which is that the weights aren't commercially licensed.
  • by nl on 3/29/23, 12:04 AM

    Just noting that HuggingFace has a Llama code implementation[1]. It's also under an Apache 2 license.

    While this seems to be nice code I don't particularly see any reason to use that over HuggingFace transformers, where you can easily swap out alternative implementations.

    Also, going to legal restrictions on the Facebook LLama code when there are much stronger restrictions on the use of the model seems an odd thing to do. It's true that in some - not all - jurisdictions it is possible the model might not be copyrightable - but you'd have a bold legal department to rely on those arguments. It's also moderately likely that an instruction-tuned Llama (like Alpaca) would be copyrightable even in those jurisdictions.

    TL;DR: Use the HuggingFace transformers library. You can experiment with Llama and switch to truly free models like GPT-J or anything new that arrives very easily.

    [1] https://huggingface.co/docs/transformers/main/model_doc/llam...

  • by AmuVarma on 3/28/23, 6:33 PM

    Llama by FB is under a non-commercial license not a GPL license, so I assume you are using a different base model, what model is that?
  • by leke on 3/29/23, 11:40 AM

    I'm still confused about this. Does it require you to have a chatGPT API key for it to work?
  • by yewnork on 3/28/23, 5:59 PM

    I see this as a win for the AI community. The key for LLMs is to enable people to train collaboratively and innovate more quickly in this space. Are there any examples or demos available that showcase the capabilities of "lit-llama"?
  • by theaniketmaurya on 3/28/23, 5:38 PM

    I am in love with this implementation considering the ability to run on 8 GB VRAM and Apache 2.0 license.
  • by rasbt on 3/28/23, 5:41 PM

    I guess that means time to fire up a few GPUs later today and get some weights! We should have a weight exchange platform for that maybe, haha.