Open Source Language Models
- Manu Anish
- May 4, 2023
- 3 min read
General Access to Powerful Language Models (LLaMa 30B SFT, Vicuna): Open Source and Free Alternatives to ChatGPT
Introduction
Language models are transforming the way we interact with computers and the internet. These models use machine learning algorithms to understand and generate human language, making it possible for us to have natural conversations with machines.
GPT-4
OpenAI's GPT-4 3 is one of the most advanced language models currently available, but it's not accessible to everyone. The model is proprietary, and its use is limited to a select group of companies and developers.
Open Source Language Models
Open source language models, on the other hand, are freely available to everyone, making it possible for individuals and organizations of all sizes to build intelligent applications powered by natural language processing.
HuggingChat
One of the most promising open source language models is LLaMa (Language Learning Machine) 30B SFT, developed by Open Assistant . LLaMa 30B SFT is a language model that's been fine-tuned on a large corpus of data, making it capable of generating high-quality responses to a wide range of questions and queries.
LLaMa 30B SFT is currently being used in HuggingChat, an open source alternative to ChatGPT , a popular chatbot powered by GPT-3. HuggingChat is built on top of Hugging Face's Inference API infrastructure, making it possible for anyone to deploy and customize their own chatbot powered by LLaMa 30B SFT.
Vicuna-13B
Another open source language model that's generating a lot of buzz is Vicuna-13B. Developed by a team of researchers from UC Berkeley, CMU, Stanford, MBZUAI, and UC San Diego, Vicuna-13B has been fine-tuned on user-shared conversations collected from ShareGPT.
Preliminary evaluation using GPT-4 as a judge shows Vicuna-13B achieves more than 90% quality of OpenAI ChatGPT and Google Bard 1while outperforming other models like LLaMa and Stanford Alpaca in more than 90% of cases.

Vicuna-13B is freely available for non-commercial use, along with its code and weights. The model is impressive and capable of generating well-structured and detailed responses to a wide range of questions and prompts.
Summary
In conclusion, open source language models like LLaMa 30B SFT and Vicuna-13B are changing the game when it comes to natural language processing. They're making it possible for anyone to build intelligent applications powered by advanced language models without having to pay for expensive proprietary software.
The availability of these models is democratizing access to natural language processing technology, and it's exciting to see what new and innovative applications will emerge as a result.
Extra!
Code snippet to run LLama 30B SFT on your own machine:
from transformers import LlamaForCausalLM, LlamaTokenizer
model_dir = "path/to/model/xor"
tokenizer = LlamaTokenizer.from_pretrained(model_dir)
model = LlamaForCausalLM.from_pretrained(model_dir)
input_text = "Hello, how are you?"
input_ids = tokenizer.encode(input_text, return_tensors="pt")
generated_ids = model.generate(input_ids=input_ids, max_length=50, do_sample=True)
generated_text = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
print(generated_text)References
“Language Model.” Wikipedia, 29 Apr. 2023. Wikipedia, https://en.wikipedia.org/w/index.php?title=Language_model&oldid=1152313105. ↩
Brown, Tom B., et al. Language Models Are Few-Shot Learners. arXiv, 22 July 2020. arXiv.org, https://doi.org/10.48550/arXiv.2005.14165. ↩
OpenAI. GPT-4 Technical Report. arXiv, 27 Mar. 2023. arXiv.org, https://doi.org/10.48550/arXiv.2303.08774. ↩
GPT-4. https://openai.com/research/gpt-4. Accessed 1 May 2023. ↩
Touvron, Hugo, et al. LLaMA: Open and Efficient Foundation Language Models. arXiv, 27 Feb. 2023. arXiv.org, https://doi.org/10.48550/arXiv.2302.13971. ↩
Open Assistant. https://open-assistant.io/. Accessed 1 May 2023. ↩
HuggingChat. https://hf.co/chat. Accessed 1 May 2023. ↩
Introducing ChatGPT. https://openai.com/blog/chatgpt. Accessed 1 May 2023. ↩
“Vicuna: An Open-Source Chatbot Impressing GPT-4 with 90%* ChatGPT Quality.” Vicuna: An Open-Source Chatbot Impressing GPT-4 with 90%* ChatGPT Quality, https://vicuna.lmsys.org/. Accessed 1 May 2023. ↩
Lmsys/Fastchat-T5-3b-v1.0 · Hugging Face. https://huggingface.co/lmsys/fastchat-t5-3b-v1.0. Accessed 1 May 2023. ↩
Bard. https://bard.google.com. Accessed 1 May 2023. ↩
Stanford CRFM. https://crfm.stanford.edu/2023/03/13/alpaca.html. Accessed 1 May 2023. ↩











I am the author and I think I did a pretty good job.