MACHINE LEARNING

완전한 오픈소스와 언어모델 / OLMo: Open Language Model

24_bean 2024. 2. 11. 20:33

https://blog.allenai.org/olmo-open-language-model-87ccfc95f580

 

최근 AI2는 Huggingface와 Github을 통해 대규모 언어 모델을 훈련하고 실험할 수 있는 프레임워크를 공개하며 첫번째 오픈 언어 모델(OLMo)를 출시했습니다.

 

아래 링크는 관련 논문 및 사이트입니다.

 

Github: https://github.com/allenai/OLMo

 

GitHub - allenai/OLMo: Modeling, training, eval, and inference code for OLMo

Modeling, training, eval, and inference code for OLMo - GitHub - allenai/OLMo: Modeling, training, eval, and inference code for OLMo

github.com

 

공개 블로그: https://blog.allenai.org/olmo-open-language-model-87ccfc95f580

 

OLMo: Open Language Model

A State-Of-The-Art, Truly Open LLM and Framework

blog.allenai.org

 

Huggingface 7B 모델: https://huggingface.co/allenai/OLMo-7B

 

allenai/OLMo-7B · Hugging Face

Model Card for OLMo 7B OLMo is a series of Open Language Models designed to enable the science of language models. The OLMo models are trained on the Dolma dataset. We release all code, checkpoints, logs (coming soon), and details involved in training thes

huggingface.co

 

논문: https://arxiv.org/abs/2402.00838

 

OLMo: Accelerating the Science of Language Models

Language models (LMs) have become ubiquitous in both NLP research and in commercial product offerings. As their commercial importance has surged, the most powerful models have become closed off, gated behind proprietary interfaces, with important details o

arxiv.org

 

자세한 설명은 오히려 첨부한 공개 블로그를 참조하시면 좋을 것 같습니다.

 

아래에 해당 논문의 Abstract을 첨부합니다.


Abstract

 

 

언어 모델들은 이제 NLP 연구와 상업적 제품 모두에 없어서는 안 될 존재가 되었습니다. 그러나 상업적 가치가 커짐에 따라, 가장 성능이 뛰어난 모델들은 독점 인터페이스 뒤로 숨겨지고, 그 훈련 데이터, 구조, 그리고 개발 과정에 대한 중요 정보는 비공개로 남아있습니다. 이러한 정보는 모델의 편향성과 잠재적 위험을 포함하여 과학적으로 연구하는 데 매우 중요하기 때문에, 우리는 연구 커뮤니티가 강력하면서 완전히 개방된 언어 모델에 접근할 수 있어야 한다고 생각합니다. 이런 맥락에서, 우리는 언어 모델링의 과학을 구축하고 탐구하기 위한 프레임워크와 함께, 최신 기술의 진정으로 개방된 언어 모델인 OLMo의 첫 출시를 상세히 소개하는 이 기술 보고서를 준비했습니다. 이전의 많은 시도들이 모델 가중치와 추론 코드만 공개한 것과 달리, 우리는 OLMo와 그에 따른 전체 프레임워크, 훈련 데이터, 그리고 훈련 및 평가 코드까지 포함하여 공개함으로써, 개방 연구 커뮤니티를 지원하고 새로운 혁신의 물결을 일으킬 수 있기를 바랍니다.

 


Dataset (Dolma)

본 프로젝트의 가장 주목할 점은 Pre-training 시 사용했던 데이터셋을 완전히 공개했다는 점입니다.

 

 

Ref: https://huggingface.co/datasets/allenai/dolma

 

allenai/dolma · Datasets at Hugging Face

You need to agree to share your contact information to access this dataset This repository is publicly accessible, but you have to accept the conditions to access its files and content. Access to this dataset is automatically granted upon accepting the AI2

huggingface.co

 

아래와 같은 방법으로 다운로드 하실 수 있습니다.

DATA_DIR="<path_to_your_data_directory>"
PARALLEL_DOWNLOADS="<number_of_parallel_downloads>"
DOLMA_VERSION="<version_of_dolma_to_download>"

git clone https://huggingface.co/datasets/allenai/dolma
mkdir -p "${DATA_DIR}"


cat "dolma/urls/${DOLMA_VERSION}.txt" | xargs -n 1 -P "${PARALLEL_DOWNLOADS}" wget -q -P "$DATA_DIR"

 

Load (Python)

import os
from datasets import load_dataset

os.environ["DATA_DIR"] = "<path_to_your_data_directory>"
dataset = load_dataset("allenai/dolma", split="train")