Ask HN: Open-source ChatGPT alternatives?
What's the state of the art in open source GPT models right now, in practical terms? If your typical use case is taking a pretrained model and fine tuning it to a specific task, which LLM would yield the best results while running on consumer hardware? Note that I'm specifically asking for software that I can run on my own hardware, I'm not interested in paying OpenAI $0.02 per API request.
I'll start the recommendations with Karpathy's nanoGPT: https://github.com/karpathy/nanoGPT
What else do we have?
63 comments
[ 4.1 ms ] story [ 95.1 ms ] threadIt's bigger brother, 1.3b, uses ~5.5gb of memory but yields slightly more GPT-like answers. Both take ~5-20 seconds to generate a response though, so take that into account when building with it.
https://huggingface.co/EleutherAI/gpt-j-6B
https://huggingface.co/bigscience/bloom
For following instructions, ChatGPT is a lot better but GPT J did relatively well if given enough examples on simple tasks.
For a chatbot, it’s not really useable.
It will handle basic natural language and context clues just fine. It's just not very fast, and the generations probably won't be as thorough as ChatGPT.
The impression I've got is that fine tuning large language models is mostly useful for very simple tasks, such as training a spam or categorization filter.
If you're looking to take a model and then e.g. train it on a few thousand additional pages of documentation in order to get it to answer project-specific questions, I've got the impression that fine tuning isn't actually a useful way to achieve that (I'd love to be proven wrong about this).
Instead, people are getting good results with "retrieval augmented generation" - where you first run a search (or an embeddings-based semantic search) against your docs to find relevant snippets, then feed them to the large language model as part of a glued together prompt.
I wrote about my explorations of this technique here - plenty of other people have written about this too: https://simonwillison.net/2023/Jan/13/semantic-search-answer...
As an example of fine tuning, I might take a pretrained model and then continue training it with a custom dataset that is tailored to a specific text generation task (not classification). Here is an example of a custom dataset that I might fine tune on:
https://github.com/baobabKoodaa/future/blob/8d2ae91e6a6f00c7...
I would like the LLM to generate fictional text in the same style as the fine tuned dataset.
Have you tried fine tuning GPT3 via the OpenAI APIs for this? It should only cost a few dollars for that smaller set of examples, and it would at least help demonstrate it it's possible to get the results you want with the current best-in-class language model before you try to run that against a smaller model that you can fit on your own hardware.
I haven't. That's not a bad idea.
> it would at least help demonstrate it it's possible to get the results you want with the current best-in-class language model before you try to run that against a smaller model that you can fit on your own hardware
The dataset you saw was (mostly) generated with ChatGPT and davinci-002, by using prompt engineering instead of fine tuning. So it's definitely possible to produce good results like this (though no judgment here on the question of prompt engineering vs fine tuning).
https://news.ycombinator.com/item?id=34115698
https://news.ycombinator.com/item?id=33955125
https://news.ycombinator.com/item?id=34163413
https://news.ycombinator.com/item?id=34628256
https://news.ycombinator.com/item?id=34147281
https://news.ycombinator.com/item?id=34445873
They took funding as an open source non profit. Once they got the money they turned into a closed sourced for-profit censorship machine.
If they keep releasing older models and keep their cutting-edge technology for profit I’m fine with it.
https://openai.com/blog/deep-reinforcement-learning-from-hum...
https://openai.com/blog/fine-tuning-gpt-2/
https://openai.com/blog/chatgpt/
People like Anthropic have been able to reproduce it.
Then the VC money came in and they became ClosedAI and a for-profit and releases papers without the model. No better than what DeepMind already does.
The name ‘OpenAI’ now has no meaning. It is a deception and is essentially a Microsoft AI division.
https://en.wikipedia.org/wiki/Foreign_branding
https://www.trychroma.com/
In general a lot of people download models from huggingface, I think that package automates that task.
But seriously I am asking a very similar question with a focus on LLMs for classification (e.g. "Is this an article about a sports game?"), information extraction, clustering and such. I am not so interested in generation (Which I am assuming you are.), however the GPT style embeddings and those are are useful for the kind of work I do and are interchangeable with BERT-like and other embeddings.
"Good" or "Best" is something you have to define for yourself and the one thing every successful A.I. developer has done is develop a facility for testing if the solution was performing acceptably. With that library you can download a model and start working with the model, again, the successful people all tested at least one model. In the time since your post, a run-of-the-mill Python developer could have made some progress. Learn Python or get a non technical co-founder,
For my kind of tasks I want something that handles bigger documents than ChatGPT and when I go shopping for models I cannot find a high quality very large transformer that has been assembled with a tokenizer and trained hard on language tasks. When I look at the literature it seems the very long transformers like reformer wouldn't perform so well if somebody did try to build an LLM so I wait. I am certain that somebody will upload a better model to huggingface someday -- that's the thought process it takes to get an answer for questions like yours.
If you look though at the process used to make ChatGPT-3 able to converse there is the GPT-style embedding and then a process of dialog generation trained on totally different principles which is the "Reinforcement Learning from Human Feedback"
https://www.assemblyai.com/blog/how-chatgpt-actually-works/
and I think you are not going to get that kind of capability open source in that the training data doesn't exist for it. There are many things you have to do once you have that training data, but I think there are many people able to follow that path now that it has been blazed.
Please note that ChatGPT is not able to access past conversations to inform its responses."
https://help.openai.com/en/articles/6787051-does-chatgpt-rem...
Some interesting techniques I've seen involve essentially a ring-buffer and after each turn a call is made to summarize the conversation up to that point and use that as context for subsequent prompt
Although people unfamiliar with "active listening" often find it annoying, this is something I attempt to implement within my conversations (quickly summarizing what I understand after somebody explains something technical). Oftentimes people feel like I'm `interrupting them`, but it is really just a way to stay engaged in two-way conversation.
Eerie how LLM's benefit from this "focus" as similarly as this autistic commenter.
https://open-assistant.io/
https://github.com/LAION-AI/Open-Assistant
$0.02 cents per API request. What I would like to do is provide people a free service on the internet that using an LLM under the hood. If you are so rich that you can burn $10k on an internet hobby project, good for you, but just know that everybody else is not as rich as you.
Also I wasn't "begging for a free home version". In my original question I already provided one option. Sorry, I mean "one free home version". So it's not like I was starved out of options. There are options. I was asking for recommendations.
OPs point was most of us can't burn 10k on a internet hobby project, and it costs probably 10x-100x more to train. How would you expect to provide people a free service? People are training it to open source right now, so please be patient.
I'd gladly pay $0.02 cents/api call if I could be absolutely certain my queries weren't be used for evil.
Sadly, that's not possible.
However, you can fine tune it; and I'm sure with lots of fine tuning and some jiggling of the parameters you can get a half decent custom-purpose solution.
We need the same for ChatGPT and GPT-4.
Any pointers as to where someone like me with software engineering experience but literally no AI knowledge can train my own GPT on my own data sets?
In my case I have downloaded some public domain databases (1-7gb each) and I would like to get some additional insights out of them. I have been querying them and using them to build my company but I’m curious to know if GPT can help me in that regard.
To run your own laptop and cheap we still need much fine tuned training set with much better algorithm .
Right now, most capable ones needs over 120gb of VRAM just inference (run).