Downloads · 30 days
8
17% of all-time downloads
abhishekpoddar/mini-gpt
mini-gpt is a machine learning model from abhishekpoddar. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Description: “A small GPT model (~1-2M parameters) trained on 10,000 TinyStories samples for text generation.”
Downloads · 30 days
8
17% of all-time downloads
All-time downloads
46
Public
Parameters
13.4M
53.6 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors53.6 MB · 92%
From the Hugging Face model README
Description: “A small GPT model (~1-2M parameters) trained on 10,000 TinyStories samples for text generation.”
Training Details: Dataset (TinyStories), model (2 layers, 128 hidden size, 4 heads), 3 epochs, trained on GTX 1650.
Example Usage: python
from transformers import AutoTokenizer, AutoModel
from mini_gpt import MiniGPT, MiniGPTConfig
AutoModel.register(MiniGPTConfig, MiniGPT)
model = MiniGPT.from_pretrained("abhishekpoddar/mini-gpt")
tokenizer = AutoTokenizer.from_pretrained("abhishekpoddar/mini-gpt")
inputs = tokenizer("Once upon a time", return_tensors="pt")
outputs = model.generate(inputs["input_ids"], max_length=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))