Stability AI, 세계 최초의 오픈 소스 RLHF LLM 챗봇인 StableVicuna 출시

몇 일 전에 Stability AI의 공개 언어 모델인 StableLM을 소개해드렸었는데요,

오늘은 RLHF 방식으로 학습한 StableVicuna를 공개하여 다시금 소식을 들고 왔습니다 ㅎㅎ

아래는 공식 블로그와, 공식 블로그의 내용을 DeepL의 도움을 빌어 번역한 결과입니다.


배경 / Background

최근 몇 달 동안 챗봇의 개발과 출시가 활발하게 이루어졌습니다. 지난 봄에 출시된 Character.ai의 챗봇부터 11월의 ChatGPT, 12월의 Bard에 이르기까지 채팅용 언어 모델을 튜닝하여 만든 사용자 경험은 뜨거운 화두였습니다. 오픈 액세스 및 오픈 소스 대안의 등장은 이러한 관심을 더욱 부추겼습니다.
In recent months, there has been a significant push in the development and release of chatbots. From Character.ai's chatbot last spring to ChatGPT in November and Bard in December, the user experience created by tuning language models for chat has been a hot topic. The emergence of open access and open-source alternatives has further fueled this interest.

오픈 소스 챗봇의 현재 환경 / The Current Environment of Open Source Chatbots

이러한 채팅 모델의 성공은 인스트럭션 미세 조정과 인간 피드백을 통한 강화 학습(RLHF)이라는 두 가지 훈련 패러다임 덕분입니다. 이러한 종류의 모델을 훈련하는 데 도움이 되는 오픈 소스 프레임워크(예: trlX, trl, DeepSpeed Chat, ColossalAI)를 구축하기 위한 많은 노력이 있었지만, 두 가지 패러다임이 모두 적용된 오픈 액세스 및 오픈 소스 모델은 부족합니다. 대부분의 모델에서 인스트럭션 미세 조정은 복잡성을 수반하기 때문에 RLHF 학습 없이 적용됩니다.
The success of these chat models is due to two training paradigms: instruction finetuning and reinforcement learning through human feedback (RLHF). While there have been significant efforts to build open source frameworks for helping train these kinds of models, such as trlX, trl, DeepSpeed Chat and ColossalAI, there is a lack of open access and open source models that have both paradigms applied. In most models, instruction finetuning is applied without RLHF training because of the complexity that it involves.

최근 Open Assistant, Anthropic, Stanford는 채팅 RLHF 데이터 세트를 대중에게 쉽게 제공하기 시작했습니다. 이러한 데이터 세트는 trlX에서 제공하는 간단한 RLHF 훈련과 결합되어 오늘 소개하는 최초의 대규모 인스트럭션 핀튜닝 및 RLHF 모델의 근간이 됩니다: StableVicuna.
Recently, Open Assistant, Anthropic, and Stanford have begun to make chat RLHF datasets readily available to the public. Those datasets, combined with the straightforward training of RLHF provided by trlX, are the backbone for the first large-scale instruction fintuned and RLHF model we present here today: StableVicuna.

최초의 대규모 오픈 소스 RLHF LLM 챗봇 소개 / Introducing the First Large-Scale Open Source RLHF LLM Chatbot

사람의 피드백을 통한 강화 학습(RHLF)을 통해 학습된 최초의 대규모 오픈 소스 챗봇인 StableVicuna를 소개하게 되어 자랑스럽게 생각합니다. StableVicuna는 명령어를 미세 조정한 LLaMA 13b 모델인 Vicuna v0 13b의 추가 명령어 미세 조정 및 RLHF 학습 버전입니다. 관심이 있는 독자는 여기에서 Vicuna에 대한 자세한 내용을 확인할 수 있습니다.
We are proud to present StableVicuna, the first large-scale open source chatbot trained via reinforced learning from human feedback (RHLF). StableVicuna is a further instruction fine tuned and RLHF trained version of Vicuna v0 13b, which is an instruction fine tuned LLaMA 13b model. For the interested reader, you can find more about Vicuna here.

다음은 챗봇을 사용한 몇 가지 예시입니다,
Here are some of the examples with our Chatbot,

  1. 기본적인 수학 계산하기 / Ask it to do basic math
  2. 코드 작성 요청하기 / Ask it to write code
  3. 문법 관련 도움 요청하기 / Ask it to help you with grammar

비슷한 규모의 다른 오픈 소스 챗봇과 비교한 StableVicuna의 전반적인 성능을 보여주는 여러 벤치마크는 다음과 같습니다.
Similarly, here are a number of benchmarks showing the overall performance of StableVicuna compared to other similarly sized open source chatbots.

StableVicuna의 강력한 성능을 달성하기 위해, 우리는 Vicuna를 기본 모델로 활용하고 Steinnon et al.Ouyang et al.에서 설명한 일반적인 3단계 RLHF 파이프라인을 따릅니다. 구체적으로, 우리는 세 가지 데이터셋을 혼합하여 감독된 미세조정(SFT)으로 기본 Vicuna 모델을 추가로 훈련시킵니다:
In order to achieve StableVicuna’s strong performance, we utilize Vicuna as the base model and follow the typical three-stage RLHF pipeline outlined by Steinnon et al. and Ouyang et al. Concretely, we further train the base Vicuna model with supervised finetuning (SFT) using a mixture of three datasets:

  • 35개 언어로 66,497개의 대화 트리에 분산된 161,443개의 메시지로 구성된 사람이 생성하고 사람이 주석을 단 어시스턴트 스타일의 대화 코퍼스인 OASST1(OpenAssistant Conversations Dataset)을 사용합니다;
  • OpenAssistant Conversations Dataset (OASST1), a human-generated, human-annotated assistant-style conversation corpus comprising 161,443 messages distributed across 66,497 conversation trees, in 35 different languages;
  • GPT3.5 Turbo에서 생성된 437,605개의 프롬프트와 응답으로 구성된 데이터 세트인 GPT4All Prompt Generations;
  • GPT4All Prompt Generations, a dataset of 437,605 prompts and responses generated by GPT-3.5 Turbo;
  • 알파카(Alpaca): OpenAI의 텍스트 다빈치 엔진에서 생성된 52,000개의 명령어와 데모로 구성된 데이터 세트.
  • And Alpaca, a dataset of 52,000 instructions and demonstrations generated by OpenAI's text-davinci-003 engine.

다음 RLHF 선호도 데이터 세트에 대한 추가 SFT 모델에서 먼저 초기화된 보상 모델을 훈련하기 위해 trlx를 사용합니다:
We use trlx to train a reward model that is first initialized from our further SFT model on the following RLHF preference datasets:

  • OpenAssistant 대화 데이터세트(OASST1)에는 7213개의 선호도 샘플이 포함되어 있습니다;
  • OpenAssistant Conversations Dataset (OASST1) contains 7213 preferences samples;
  • 160,800개의 인간 라벨이 포함된 AI 어시스턴트의 유용성 및 무해성에 대한 선호도 데이터 세트인 Anthropic HH-RLHF;
  • Anthropic HH-RLHF, a dataset of preferences about AI assistant helpfulness and harmlessness containing 160,800 human labels;
  • 요리부터 철학까지 18개 주제 영역의 질문/지시에 대한 응답에 대한 348,718개의 집단적 인간 선호도 데이터 세트인 스탠포드 인간 선호도(SHP)가 있습니다.
  • And Stanford Human Preferences (SHP), a dataset of 348,718 collective human preferences over responses to questions/instructions in 18 different subject areas, from cooking to philosophy.

마지막으로, trlX를 사용하여 근거리 정책 최적화(PPO) 강화 학습을 수행하여 SFT 모델의 RLHF 훈련을 수행하여 StableVicuna에 도달합니다!
Finally, we use trlX to perform Proximal Policy Optimization (PPO) reinforcement learning to perform RLHF training of the SFT model to arrive at StableVicuna!

StableVicuna-13B 모델 얻기 / Obtaining StableVicuna-13B

StableVicuna는 물론 허깅페이스 허브에 있습니다! 이 모델은 원래 LLaMA 모델에 대한 가중치 델타로 다운로드할 수 있습니다. StableVicuna-13B를 얻으려면 여기에서 웨이트 델타를 다운로드할 수 있습니다. 단, 원본 LLaMA 모델에 대한 액세스 권한이 있어야 하며, 이를 위해서는 GitHub 리포지토리에 제공된 링크 또는 여기를 사용하여 별도로 LLaMA 가중치를 신청해야 합니다. 가중치 델타와 LLaMA 가중치가 모두 확보되면 GitHub 리포지토리에 제공된 스크립트를 사용하여 이를 결합하여 StableVicuna-13B를 얻을 수 있습니다.
StableVicuna is of course on the HuggingFace Hub! The model is downloadable as a weight delta against the original LLaMA model. To obtain StableVicuna-13B, you can download the weight delta from here. However, please note that you also need to have access to the original LLaMA model, which requires you to apply for LLaMA weights separately using the link provided in the GitHub repo or here. Once you have both the weight delta and the LLaMA weights, you can use a script provided in the GitHub repo to combine them and obtain StableVicuna-13B.

곧 출시될 챗봇 인터페이스를 소개합니다. / Announcing Our Upcoming Chatbot Interface

챗봇과 함께 개발 막바지 단계에 있는 곧 출시될 채팅 인터페이스를 미리 선보이게 되어 기쁘게 생각합니다. 다음 스크린샷을 통해 사용자들이 기대할 수 있는 기능을 살짝 엿볼 수 있습니다.
Alongside our chatbot, we are excited to preview our upcoming chat interface which is in the final stages of development. The following screenshots offer a glimpse of what users can expect.

gr_1.png

gr_2.png

지속적인 개선을 위한 우리의 약속 / Our Commitment to Continuous Improvement

이것은 StableVicuna의 시작에 불과합니다! 앞으로 몇 주에 걸쳐 이 챗봇을 반복적으로 개선하고 Stable Foundation 서버에 Discord 봇을 배포할 예정입니다. 사용자 경험을 개선하는 데 도움이 되는 소중한 피드백을 제공해 주시기 바랍니다. 당분간은 이 링크를 방문하여 허깅페이스 공간에서 모델을 사용해 보실 수 있습니다.
This is just the beginning for StableVicuna! Over the coming weeks, we will be iterating on this chatbot and deploying a Discord bot to the Stable Foundation server. We encourage you to try StableVicuna and provide us with valuable feedback to help us improve the user experience. For the time being, you can try the model on a HuggingFace space by visiting this link.

Goose on!

감사의 말 / Acknowledgments

StableVicuna 모델을 트레이닝해준 Duy Phung에게 큰 감사를 드립니다. 또한 이 프로젝트에 생명을 불어넣는 데 중요한 역할을 해주신 오픈소스 기여자 분들께도 감사의 말씀을 전하고 싶습니다.
Big thanks to Duy Phung who trained the StableVicuna model. We’d also like to extend our gratitude to our open-source contributors who have played a crucial role in bringing this project to life.

  • Philwee는 StableVicuna의 평가에 도움을 주었습니다.
  • Philwee who assisted in the evaluation of StableVicuna.
  • RLHF 데이터 세트에 대한 조기 액세스를 제공한 OpenAssistant 팀.
  • The OpenAssistant team for providing us with early access to their RLHF dataset.
  • Gradio 데모 작업을 도와준 CarperAI의 Jonathan.
  • Jonathan from CarperAI for working on the Gradio demo.
  • Hugging Face에서 Gradio 데모를 설정하는 데 도움을 준 Hugging Face의 Poli와 AK.
  • Poli and AK from Hugging Face for helping us set up the Gradio demo in Hugging Face.

길어서 안 읽고 스크롤 내리셨을 분들을 위해... 주요 링크들을 뽑아봤습니다 :sweat_smile:


StableVicuna 13b 모델 다운로드는 아래 링크에서 가능합니다.

Vicuna 에 대한 내용은 다음 링크에서 확인 가능합니다.

StableVicuna 데모는 아래 링크에서 사용해보실 수 있습니다