Downloads · 30 days
34
24% of all-time downloads
falconlee236/nanogpt-gpt2-124m-custom
nanogpt-gpt2-124m-custom is a machine learning model from falconlee236. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
이 모델은 Andrej Karpathy의 nanoGPT 프레임워크를 기반으로 밑바닥부터(from scratch) 학습시킨 GPT-2 Small (124M) 호환 언어 모델입니다. Hugging Face의 transformers 라이브러리에서 즉시 사용할 수 있도록 표준 safetensors 포맷으로 변환되었습니다.
Downloads · 30 days
34
24% of all-time downloads
All-time downloads
139
Public
Parameters
124M
498 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors498 MB · 100%
From the Hugging Face model README
이 모델은 Andrej Karpathy의 nanoGPT 프레임워크를 기반으로 밑바닥부터(from scratch) 학습시킨 GPT-2 Small (124M) 호환 언어 모델입니다. Hugging Face의 transformers 라이브러리에서 즉시 사용할 수 있도록 표준 safetensors 포맷으로 변환되었습니다.
학습 과정의 Loss 변화, 연산 속도, 그리고 시스템 리소스 사용량 등 상세한 실험 기록은 아래 링크에서 확인하실 수 있습니다. 👉 WandB 학습 대시보드 보기 (Run: b07uovmb)
모델 학습에 사용된 주요 하이퍼파라미터와 하드웨어 스펙은 다음과 같습니다.
3g.20gb)bfloat16 (Underflow 방지 및 연산 최적화)이 모델은 OpenAI의 공식 GPT-2 토크나이저와 완벽하게 호환됩니다. 아래 파이썬 코드를 통해 모델을 불러오고 텍스트를 생성해 볼 수 있습니다.
from transformers import GPT2LMHeadModel, GPT2Tokenizer
# 1. 토크나이저와 모델 불러오기
tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
model = GPT2LMHeadModel.from_pretrained("falconlee236/nanogpt-gpt2-124m-custom")
# 2. 입력 문장 설정
input_text = "The future of artificial intelligence is"
input_ids = tokenizer.encode(input_text, return_tensors='pt')
# 3. 텍스트 생성
output = model.generate(
input_ids,
max_length=50,
do_sample=True,
temperature=0.8,
top_k=50,
pad_token_id=tokenizer.eos_token_id
)
# 4. 결과 출력
print(tokenizer.decode(output[0], skip_special_tokens=True))