Downloads · 30 days
436
38% of all-time downloads
segestic/Tinystories-0.1-9m
Tinystories-0.1-9m is a text generation model from segestic. Use it when you need the model to write or continue text. It is set up for transformers.
We tried to use the huggingface transformers library to recreate the TinyStories models on Consumer GPU. Output model has 9 million parameters.
Downloads · 30 days
436
38% of all-time downloads
All-time downloads
1.1K
Public
Repo size
112 MB
Likes
0
Public
Click a slice to open those files.
.bin55.8 MB · 94%
From the Hugging Face model README
We tried to use the huggingface transformers library to recreate the TinyStories models on Consumer GPU. Output model has 9 million parameters.
Tweaked code of springtangent (https://github.com/springtangent/tinystoriestrainer/blob/main/tinystories_train.py)
Code credit - springtangent
------ EXAMPLE USAGE ---
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("segestic/Tinystories-0.1-9m")
model = AutoModelForCausalLM.from_pretrained("segestic/Tinystories-0.1-9m")
prompt = "Once upon a time there was"
input_ids = tokenizer.encode(prompt, return_tensors="pt")
output = model.generate(input_ids, max_length = 1000, num_beams=1)
output_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(output_text)