kyujinpy/CoT-llama-2k-7b

Model

3

stars

17

commits

4

linked in READMEs

Dec 2, 2024

updated

endpoints_compatible
llama
pytorch
safetensors
text-generation
text-generation-inference
transformers

README

(주)미디어그룹사람과숲과 (주)마커의 LLM 연구 컨소시엄에서 개발된 모델입니다
The license is cc-by-nc-sa-4.0.

CoT-llama2-7B

img

More detail repo(Github): CoT-llama2

Model Details

Model Developers Kyujin Han (kyujinpy)

Input Models input text only.

Output Models generate text only.

Model Architecture

CoT-llama2 is an auto-regressive language model based on the LLaMA2 transformer architecture.

Base Model Llama-2-ko-7b

Training Dataset

I use KoCoT_2000.
Using DeepL, translate about kaist-CoT.

I use A100 GPU 40GB and COLAB, when trianing.

Training Hyperparameters

HyperparametersValue
batch_size64
micro_batch_size1
Epochs15
learning_rate1e-5
cutoff_len2048
lr_schedulerlinear
base_modelbeomi/llama-2-ko-7b

Model Benchmark

LM Eval Harness - Korean (polyglot branch)

Question Answering (QA)

COPA (F1)

Model0-shot5-shot10-shot50-shot
Polyglot-ko-1.3b0.71960.71930.72040.7206
Polyglot-ko-3.8b0.75950.76080.76380.7788
Polyglot-ko-5.8b0.77450.76760.77750.7887
Polyglot-ko-12.8b0.79370.81080.80370.8369
Llama-2-Ko-7b 20B0.73880.76260.78080.7979
Llama-2-Ko-7b 40B0.74360.79270.80370.8259
KO-platypus2-7B-EX0.75090.78990.80290.8290
CoT-llama2-7B(ours)0.75280.78880.79980.8210

Natural Language Inference (NLI; 자연어 추론 평가)

HellaSwag (F1)

Model0-shot5-shot10-shot50-shot
Polyglot-ko-1.3b0.52470.52600.52780.5427
Polyglot-ko-3.8b0.57070.58300.56700.5787
Polyglot-ko-5.8b0.59760.59980.59790.6208
Polyglot-ko-12.8b0.59540.63060.60980.6118
Llama-2-Ko-7b 20B0.45180.46680.47260.4828
Llama-2-Ko-7b 40B0.45620.46570.46980.4774
KO-platypus2-7B-EX0.45710.44610.43710.4525
CoT-llama2-7B(ours)0.45430.45540.46060.4579

Question Answering (QA)

BoolQ (F1)

Model0-shot5-shot10-shot50-shot
Polyglot-ko-1.3b0.35520.47510.41090.4038
Polyglot-ko-3.8b0.43200.52630.49300.4038
Polyglot-ko-5.8b0.43560.56980.51870.5236
Polyglot-ko-12.8b0.48180.60410.62890.6448
Llama-2-Ko-7b 20B0.36070.67970.68010.6622
Llama-2-Ko-7b 40B0.57860.69770.70840.7144
KO-platypus2-7B-EX0.60280.69790.70160.6988
CoT-llama2-7B(ours)0.58520.69470.70590.7213

Classification

SentiNeg (F1)

Model0-shot5-shot10-shot50-shot
Polyglot-ko-1.3b0.67900.62570.55140.7851
Polyglot-ko-3.8b0.48580.79500.73200.7851
Polyglot-ko-5.8b0.33940.88410.88080.9521
Polyglot-ko-12.8b0.91170.90150.93450.9723
Llama-2-Ko-7b 20B0.48550.82950.87110.8513
Llama-2-Ko-7b 40B0.45940.76110.72760.9370
KO-platypus2-7B-EX0.58210.76530.79910.8643
CoT-llama2-7B(ours)0.50450.80540.79420.9446

Implementation Code

### KO-Platypus
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

repo = "kyujinpy/CoT-llama-2k-7b"
CoT-llama = AutoModelForCausalLM.from_pretrained(
        repo,
        return_dict=True,
        torch_dtype=torch.float16,
        device_map='auto'
)
CoT-llama_tokenizer = AutoTokenizer.from_pretrained(repo)

Readme format: beomi/llama-2-ko-7b


Contributors

kyujinpy

16 commits

SFconvertbot

1 commits

kyujinpy/CoT-llama-2k-7b

Model

3

stars

17

commits

4

linked in READMEs

Dec 2, 2024

updated

endpoints_compatible
llama
pytorch
safetensors
text-generation
text-generation-inference
transformers

README

(주)미디어그룹사람과숲과 (주)마커의 LLM 연구 컨소시엄에서 개발된 모델입니다
The license is cc-by-nc-sa-4.0.

CoT-llama2-7B

img

More detail repo(Github): CoT-llama2

Model Details

Model Developers Kyujin Han (kyujinpy)

Input Models input text only.

Output Models generate text only.

Model Architecture

CoT-llama2 is an auto-regressive language model based on the LLaMA2 transformer architecture.

Base Model Llama-2-ko-7b

Training Dataset

I use KoCoT_2000.
Using DeepL, translate about kaist-CoT.

I use A100 GPU 40GB and COLAB, when trianing.

Training Hyperparameters

HyperparametersValue
batch_size64
micro_batch_size1
Epochs15
learning_rate1e-5
cutoff_len2048
lr_schedulerlinear
base_modelbeomi/llama-2-ko-7b

Model Benchmark

LM Eval Harness - Korean (polyglot branch)

Question Answering (QA)

COPA (F1)

Model0-shot5-shot10-shot50-shot
Polyglot-ko-1.3b0.71960.71930.72040.7206
Polyglot-ko-3.8b0.75950.76080.76380.7788
Polyglot-ko-5.8b0.77450.76760.77750.7887
Polyglot-ko-12.8b0.79370.81080.80370.8369
Llama-2-Ko-7b 20B0.73880.76260.78080.7979
Llama-2-Ko-7b 40B0.74360.79270.80370.8259
KO-platypus2-7B-EX0.75090.78990.80290.8290
CoT-llama2-7B(ours)0.75280.78880.79980.8210

Natural Language Inference (NLI; 자연어 추론 평가)

HellaSwag (F1)

Model0-shot5-shot10-shot50-shot
Polyglot-ko-1.3b0.52470.52600.52780.5427
Polyglot-ko-3.8b0.57070.58300.56700.5787
Polyglot-ko-5.8b0.59760.59980.59790.6208
Polyglot-ko-12.8b0.59540.63060.60980.6118
Llama-2-Ko-7b 20B0.45180.46680.47260.4828
Llama-2-Ko-7b 40B0.45620.46570.46980.4774
KO-platypus2-7B-EX0.45710.44610.43710.4525
CoT-llama2-7B(ours)0.45430.45540.46060.4579

Question Answering (QA)

BoolQ (F1)

Model0-shot5-shot10-shot50-shot
Polyglot-ko-1.3b0.35520.47510.41090.4038
Polyglot-ko-3.8b0.43200.52630.49300.4038
Polyglot-ko-5.8b0.43560.56980.51870.5236
Polyglot-ko-12.8b0.48180.60410.62890.6448
Llama-2-Ko-7b 20B0.36070.67970.68010.6622
Llama-2-Ko-7b 40B0.57860.69770.70840.7144
KO-platypus2-7B-EX0.60280.69790.70160.6988
CoT-llama2-7B(ours)0.58520.69470.70590.7213

Classification

SentiNeg (F1)

Model0-shot5-shot10-shot50-shot
Polyglot-ko-1.3b0.67900.62570.55140.7851
Polyglot-ko-3.8b0.48580.79500.73200.7851
Polyglot-ko-5.8b0.33940.88410.88080.9521
Polyglot-ko-12.8b0.91170.90150.93450.9723
Llama-2-Ko-7b 20B0.48550.82950.87110.8513
Llama-2-Ko-7b 40B0.45940.76110.72760.9370
KO-platypus2-7B-EX0.58210.76530.79910.8643
CoT-llama2-7B(ours)0.50450.80540.79420.9446

Implementation Code

### KO-Platypus
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

repo = "kyujinpy/CoT-llama-2k-7b"
CoT-llama = AutoModelForCausalLM.from_pretrained(
        repo,
        return_dict=True,
        torch_dtype=torch.float16,
        device_map='auto'
)
CoT-llama_tokenizer = AutoTokenizer.from_pretrained(repo)

Readme format: beomi/llama-2-ko-7b


Contributors

kyujinpy

16 commits

SFconvertbot

1 commits