nanogptrs
1.0.0
이것은 Andrej Karpathy의 YT 비디오에서 Nanogpt 모델을 구현 한 것입니다 : https://www.youtube.com/watch?v=kcc8fmeb1ny&t=12
https://github.com/laurentmazare/tch-rs/blob/main/examples/min-gpt/main.rs 및 https://github.com/karpathy/nanogpt/blob/master/model.py의 도움으로.
MicroMamba 환경 (또는 콘다) 생성 :
micromamba env create -f environment.yml환경 활성화 :
micromamba activate nanogptrs export LD_LIBRARY_PATH=/opt/conda/lib/python3.10/site-packages/torch/lib/: $LD_LIBRARY_PATH./data/download.sh
./models/download.sh gpt2
cargo run --release -- --device=cuda --restore-from models/gpt2/model.safetensors generate --max-len 32 --prompt " Once upon a time " gpt2cargo run --release -- --device=cuda train --n-epochs=3 --final-checkpoint-path=models/nanogptrs.safetensors nano-gpt결국 (내 타이탄 XP에서 ~ 5H)는 다음과 같은 것을 생산해야합니다.
DUCHESS OF YORK:
Here comes already.
EXTOLY:
O, by the means of your crown?
KING HENRY VI:
Brother, that my lord, change thou givest queen.
KING RICHARD II:
Mine honour, because I am advertised
The queen our is not your voice. Would thy sight
Next Rome, among, insible express to dictliffe:
For ere for goings
Abova drunking redel her food pain soul to every it.
QUEEN MARGARET:
I took! O, if you so, good and the Montague of slave,
That he's breathing which holy a holy brats.