Koala: A Dialogue Model for Academic Research

 

Koala: A Dialogue Model for Academic Research

Introduction

The accidental leak of the weights associated with Meta AI’s LLM LLaMA has sparked tremendous innovation in the open-source LLM space. Since the furious leak, we have seen models like Alpaca, Vicuna, ChatLlama, and several others expand on the foundations of LLaMA to build innovative conversational agents that match the capabilities of ChatGPT. One of the latest additions to the list is Koala (yes, I know, another animal-named model), a chatbot created by Berkeley AI Research (BAIR) that fine-tunes LLaMA on conversations gathered from the internet.

The core goal of Koala is to highlight the balance between mega-large closed-source LLMs and smaller, open-source LLMs. BAIR’s thesis is that smaller models can achieve performance that matches mega models like ChatGPT with a fraction of the cost while also improving in areas such as fine-tuning, transparency, and many others.

Koala

Koala is a version of LLaMA fine-tuned on dialogue data scraped from the web and public datasets, including high-quality responses to user queries from other large language models, as well as question-answering datasets and human feedback datasets. Koala has been specifically trained on interaction data scraped from the web, with a focus on data that includes interaction with highly capable closed-source models such as ChatGPT. The resulting model, Koala-13B, demonstrates competitive performance to existing models based on human evaluation of real-world user prompts.

The results suggest that using high-quality datasets can overcome some of the limitations of smaller models and may even match the capabilities of large closed-source models in the future. The research team recommends that the community should prioritize curating high-quality datasets, as this may enable the creation of safer, more factual, and more capable models than simply increasing the size of existing systems.

One of the interesting aspects of Koala was the data sources used for training. The fine-tuning datasets include data curated from ChatGPT dialogs. The fine-tuning strategy included the following datasets:

· ShareGPT: Around 60K dialogues shared by users on ShareGPT were collected through public APIs. The team deduplicated to the user-query level to ensure data quality and removed non-English conversations. The resulting dataset comprises approximately 30K examples.

· HC3: The team used the human and ChatGPT responses from the HC3 English dataset, which includes roughly 60K human answers and 27K ChatGPT answers for approximately 24K questions. This results in a total of around 87K question-answer examples.

· OIG: A subset of components from the Open Instruction Generalist dataset curated by LAION was used, including the grade-school-math-instructions, the poetry-to-songs, and the plot-screenplay-books-dialogue datasets. The selected subset results in a total of around 30K examples.

· Stanford Alpaca: The team included the dataset used to train the Stanford Alpaca model, which contains approximately 52K examples generated by OpenAI’s text-DaVinci-003 through the self-instruct process. It is worth noting that HC3, OIG, and Alpaca datasets are single-turn question answering while the ShareGPT dataset is dialogue conversations.

· Anthropic HH: The team utilized the Anthropic HH dataset, which includes around 160K human-rated examples. Each example consists of a pair of responses from a chatbot, one of which is preferred by humans. The dataset provides both capabilities and additional safety protections for the model.

· OpenAI WebGPT: The OpenAI WebGPT dataset includes approximately 20K comparisons where each example comprises a question, a pair of model answers, and metadata. The answers are rated by humans with a preference score.

· OpenAI Summarization: The OpenAI summarization dataset contains approximately 93K examples, each consisting of human feedback regarding the summarizations generated by a model. Human evaluators chose the superior summary from two options.

A comparison between Koala, ChatGPT, and open-source models like Alpaca can be seen in the following matrix:



Datasets and Training

A primary obstacle in building dialogue models is curating training data. Prominent chat models, including ChatGPT, Bard, Bing Chat, and Claude use proprietary datasets built using significant amounts of human annotation. To construct Koala, we curated our training set by gathering dialogue data from the web and public datasets. Part of this data includes dialogues with large language models (e.g., ChatGPT) that users have posted online.

Rather than maximizing quantity by scraping as much web data as possible, we focus on collecting a small high-quality dataset. We use public datasets for question answering, human feedback (responses rated both positively and negatively), and dialogues with existing language models. 

Limitations and Safety

Like other language models, Koala has limitations and can be harmful when misused. We observe that Koala can hallucinate and generate non-factual responses with a highly confident tone, likely due to the fine-tuning dialogue. Perhaps an unfortunate implication of this is that smaller models inherit the confident style of larger language models before they inherit the same level of factuality—if true, this is a limitation that is important to study in future work. When misused, the hallucinated responses from Koala can potentially facilitate the spread of misinformation, spam, and other content.

Koalas can hallucinate inaccurate information in a confident and convincing tone. Beyond hallucinations, Koala shares deficiencies with other chatbot language models. Some of which include:

  • Biases and Stereotypes: Our model will inherit biases from the dialogue data it was trained on, possibly perpetuating harmful stereotypes, discrimination, and other harms.
  • Lack of Common Sense: While large language models can generate text that appears to be coherent and grammatically correct, they often lack common sense knowledge that humans take for granted. This can lead to nonsensical or inappropriate responses.
  • Limited Understanding: Large language models can struggle to understand the context and nuances of dialogue. They can also have difficulty identifying sarcasm or irony, which can lead to misunderstandings.

To address the safety implications of Koala, we included adversarial prompts in the dataset from ShareGPT and Anthropic HH to make the model more robust and harmless. To further mitigate potential misuse, we deploy OpenAI’s content moderation filter in our online demo to flag and remove unsafe content. We will be cautious about the safety of Koala, and we are committed to performing further safety evaluations of it while also monitoring our interactive demo. 

Conclusion

We hope that the Koala model will serve as a useful platform for future academic research on large language models: the model is capable enough to exhibit many of the capabilities that we associate with modern LLMs while being small enough to be finetuned or utilized with more limited computing.

Reference

1.     https://bair.berkeley.edu/blog/2023/04/03/koala/

2.    https://medium.com/towards-artificial-intelligence/meet-koala-berkeley-universitys-llama-based-model-fine-tuned-with-chatgpt-dialogues-bbb657cfbb38

HITANSH LAKKAD

Business Analytics intern at Hunnarvi Technologies Pvt Ltd in collaboration with Nanobi Analytics.

VIEWS ARE PERSONAL

#koala #LLM #AI #businessanalytics #technology #hunnarvi #nanobi #isme

 

 

 

 

 

Comments

Popular posts from this blog