CoolFace
Modelpublic

beomi/Yi-Ko-34B

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
7likes36downloads
Model Card

Update

@2024.07.08: Update LICENSE into Apache 2.0!🎉

beomi/Yi-Ko-34B

Yi-Ko series models serve as advanced iterations of 01-ai/Yi models, benefiting from an expanded vocabulary and the inclusion of Korean/English corpus in its further pretraining. Just like its predecessor, Yi-Ko series models operate within the broad range of generative text models that stretch from 6 billion to 34 billion parameters. This repository focuses on the 34B pretrained version, which is tailored to fit the Hugging Face Transformers format. For access to the other models, feel free to consult the index provided below.

Model Details

Model Developers Junbum Lee (Beomi)

Variations Yi-Ko-34B will come in a range of parameter sizes — 6B and 34B — with Ko(Korean+English).

Input Models input text only.

Output Models generate text only.

Model Architecture

Yi-Ko series models are an auto-regressive language model that uses an optimized transformer architecture based on Llama-2*.

<small>*Yi model architecture is based on Llama2, so it can be loaded via LlamaForCausalLM class on HF.</small>

Model NameTraining DataParamsContext LengthGQATrained TokensLRTrain tokens (per batch)
Yi-Ko-34BA mix of Korean + English online data34B4kO40B+5e<sup>-5</sup>4M

Vocab Expansion

Model NameVocabulary SizeDescription
Original Yi-Series64000Sentencepiece BPE
Expanded Yi-Ko Series78464Sentencepiece BPE. Added Korean vocab and merges

Tokenizing "안녕하세요, 오늘은 날씨가 좋네요.ㅎㅎ"

Model# of tokensTokens
Original Yi-Series47['<0xEC>', '<0x95>', '<0x88>', '<0xEB>', '<0x85>', '<0x95>', '하', '<0xEC>', '<0x84>', '<0xB8>', '<0xEC>', '<0x9A>', '<0x94>', ',', '▁', '<0xEC>', '<0x98>', '<0xA4>', '<0xEB>', '<0x8A>', '<0x98>', '은', '▁', '<0xEB>', '<0x82>', '<0xA0>', '<0xEC>', '<0x94>', '<0xA8>', '가', '▁', '<0xEC>', '<0xA2>', '<0x8B>', '<0xEB>', '<0x84>', '<0xA4>', '<0xEC>', '<0x9A>', '<0x94>', '.', '<0xE3>', '<0x85>', '<0x8E>', '<0xE3>', '<0x85>', '<0x8E>']
Expanded Yi-Ko Series10['▁안녕', '하세요', ',', '▁오늘은', '▁날', '씨가', '▁좋네요', '.', 'ㅎ', 'ㅎ']
<small>*Equal Korean vocab with Llama-2-Ko Series</small>

Tokenizing "Llama 2: Open Foundation and Fine-Tuned Chat Models"

Model# of tokensTokens
Original Yi-Series21['The', '▁Y', 'i', '▁series', '▁models', '▁are', '▁large', '▁language', '▁models', '▁trained', '▁from', '▁scratch', '▁by', '▁developers', '▁at', '▁', '0', '1', '.', 'AI', '.']
Expanded Yi-Ko Series21['▁The', '▁Y', 'i', '▁series', '▁models', '▁are', '▁large', '▁language', '▁models', '▁trained', '▁from', '▁scratch', '▁by', '▁developers', '▁at', '▁', '0', '1', '.', 'AI', '.']
<small>*Equal Korean vocab with Llama-2-Ko Series</small><small>Since Expanded Yi-Ko Series* prepends _ at the beginning of the text(to ensure same tokenization for Korean sentences), it shows negilible difference for the first token on English tokenization. </small>

Model Benchmark

LM Eval Harness - Korean Benchmarks

TasksVersionFiltern-shotMetricValueStderr
kmmlu_directN/Anone5exact_match0.5027±0.1019
kobest_boolq1none5acc0.9202±0.0072
none5f10.9202±N/A
kobest_copa1none5acc0.8480±0.0114
none5f10.8479±N/A
kobest_hellaswag1none5acc0.5320±0.0223
none5f10.5281±N/A
none5acc_norm0.6340±0.0216
kobest_sentineg1none5acc0.9874±0.0056
none5f10.9874±N/A
haeraeN/Anone5acc0.7965±0.0116
none5acc_norm0.7965±0.0116
- haeraegeneralknowledge1none5acc0.5114±0.0378
none5acc_norm0.5114±0.0378
- haerae_history1none5acc0.8511±0.0260
none5acc_norm0.8511±0.0260
- haeraeloanword1none5acc0.8402±0.0283
none5acc_norm0.8402±0.0283
- haeraerareword1none5acc0.8642±0.0170
none5acc_norm0.8642±0.0170
- haeraestandardnomenclature1none5acc0.8301±0.0305
none5acc_norm0.8301±0.0305

LICENSE

Apache 2.0 (for research)

For commercial purpose, mailto: jun@beomi.net to acquire Yi-Ko sereis commercial license.

Acknowledgement

The training is supported by TPU Research Cloud program.