What Is HuggingChat, And Is It Better Than ChatGPT?

With the immediate popularity and widespread adoption of ChatGPT, generative AI chatbots have seen a massive jump in interest and use. From Google launching Bard to Microsoft rolling out ChatGPT-powered Bing, many tech giants have been racing to create or integrate AI into their products to avoid falling behind the competition.

Twitter is full of threads on the best ways to optimize workflows using ChatGPT and other AI tools. There was that ill-fated endless AI-generated sitcom based on Seinfeld that ran on Twitch and endless meta-articles on using AI chatbots to create prompts for AI art generators. That is to say, many people and companies have seized on the opportunities afforded by AI tools like ChatGPT.

However, this corporate rush to capitalize on the generative AI trend has had one glaring issue for those interested in security and research — most of the best-performing chatbots accessible to the public are closed source. This means that their source codes aren't visible to the general public, so there is no way to be certain as to how a given tool works and no way to build upon or learn from it without paying whichever company owns that specific tool.

This is where Hugging Face comes in with its open-source alternative to ChatGPT, HuggingChat.

Meet HuggingChat and Hugging Face

HuggingChat is a free and open-source product of Hugging Face, a U.S. company that primarily provides users and community members with tools to build, train and deploy machine learning models based on open-source code and technologies. While it is now a platform for open-source software that also supports private use via services such as its Private Hub, Hugging Face has come full circle from its beginnings as a company that started by making a chatbot, which could help explain the success of HuggingChat.

HuggingChat results from a collaboration between Hugging Face and Large-scale Artificial Intelligence Open Network. HuggingFace used the LLaMa model created by LAION's Open Assistant, for which HuggingChat is essentially a user interface. The benefit is that since the core model, training data, and HuggingChat are open source, users can gain full access to their inner workings, replicate, and improve upon them.

As of April 2023, HuggingChat had 30 billion parameters, compared to GPT 3.5's 175 billion parameters and GPT 4's rumored 1 trillion parameters. While this may pale compared to the closed-source competition, Hugging Face claims it is the best-performing open-source AI chatbot available. It also plans to expose all good-quality chat models in the future, to expand beyond LLaMa.

Using HuggingChat for regular prompts

If you have used ChatGPT, HuggingChat's UI will look very familiar, with a text box at the bottom of the window and a history of past prompts on the left. As with ChatGPT, you type in your prompt, it takes a second or two, and then starts to write its response as you watch.

Regarding the quality of the responses provided by HuggingChat and ChatGPT to general queries, the latter seems to come out ahead. However, your mileage may vary depending on the quality of the prompt you provide and whether you force it to base its response on new material that may be outside its data set.

Multiple outlets have found that HuggingChat is prone to hallucinate, i.e., generate a confident response that is fabricated but coherent at best and nonsensical at worst. Its training data likely require cleaning, as its answers to intentionally provocative prompts show a relative lack of safeguards compared to ChatGPT. This could be due to a host of reasons, including the fact that the training data was crowdsourced to an extent. The model HuggingChat uses was made with a training methodology known as reinforcement learning from human feedback, which uses a set of questions and answers validated by humans to train the AI to follow instructions given to it. This method makes it particularly susceptible to the biases of the participants and biases created by the group's makeup.

Other uses and verdict

Regarding responses for more specific task-based queries such as coding requests, HuggingChat performs better but is still different from ChatGPT 3.5 and 4. HuggingChat will return the complete code at once when asked for code, while ChatGPT will return detailed instructions along with the requested code. As for the efficacy of the code itself, it will likely vary from prompt to prompt.

HuggingChat also attempts to differentiate itself from the competition by leaning into features the Hugging Face founders integrated into their first chatbot targeted at teens – personalization and establishing an "authentic bond" with users. Again, your mileage may vary, as it may be hard to establish an authentic bond with a chatbot that spouts incel talking points or claims to have woken up inside a box.

Having spent significantly less time in development and a much smaller number of parameters than ChatGPT, it would appear that while HuggingChat has a good base, it lacks the refinement and capability that ChatGPT 3.5 and 4 possess. Its most significant strength is that it is fully open-source, which means it could see some big improvements in the future and will be much easier to hold accountable when things go wrong, unlike its closed-source counterpart. For most users, though, the transparency and customizability of HuggingChat will come second to ChatGPT's capabilities.