/nakta

Samsung Computer Engineering Challenge 7th place

Primary LanguagePython

front

주요 성과

Speed Test

Kernel Speed Test

Kernel Speed

Operation Performance Improvement (%)
Attention 279.11%
RMSNorm 392.75%
RotaryEmbedding 133.37%
SwiGLU 33.53%
Rebuild Padding 987%

Hellaswag Validation Set Speed Test

Validation Speed

Accuracy Test

Model Accuracy
LLAMA 83.01%
Nakta 83.01%

Accuracy drop 없이 2.87배 빠른 모델 구현

실행 가이드

환경 구축

repository 를 clone 후 다음 스크립트를 실행해주세요.

chmode +x ./setting.sh  
./setting.sh

weight 변환

python convert.py {original weight path} {output path}

speed + accuracy test 실행

스크립트 실행전 weight 의 경로와 tokenizer 의 경로를 수정해주세요.(tokenizer 의 경우 llama original tokenizer.model 경로를 지정해주세요)

chmod +x ./nakta5_test.sh  
./nakta5_test.sh

주요 구현 링크

RMSNorm
Rotary Embedding
SwiGLU
Rebuild Padding Batch Scheduler *Memory Efficient Attention 의 경우 Pytorch 2.0.0 의 구현을 사용하였음.

참고 프로젝트