YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

GPT-2 in PyTorch

GPT-style language model built from scratch in PyTorch, trained on a subset of WikiText-103 corpus. Model trained on an NVIDIA A100 GPU โ€” full run completes in ~6 minutes.

Install

python -m venv venv && venv\Scripts\activate
pip install -r requirements.txt

Train

python main.py --gpu --tokenizer tiktoken

Inference

python inference.py --prompt "Once upon a time" --gpu

Pretrained weights load automatically from triton329/gpt2 on HuggingFace.

Example output

Once upon a time . At the early 20th century , though it was seen by the time
in 1864 , it lacks a 1804 Antigua โ€“ 5 @-@ class submarine of the hurricane...
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support