Downloads · 30 days
809
18% of all-time downloads
segestic/Tinystories-gpt-0.1-3m
Tinystories-gpt-0.1-3m 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.
from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.frompretrained("segestic/Tinystories-gpt-0.1-3m")
Downloads · 30 days
809
18% of all-time downloads
All-time downloads
4.4K
Public
Parameters
3.7M
15 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors15 MB · 91%
From the Hugging Face model README
from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("segestic/Tinystories-gpt-0.1-3m")
model = AutoModelForCausalLM.from_pretrained("segestic/Tinystories-gpt-0.1-3m")
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)
from transformers import pipeline
pipe = pipeline("text-generation", model="segestic/Tinystories-gpt-0.1-3m")
prompt = "where is the little girl"
output = pipe(prompt, max_length=1000, num_beams=1)
generated_text = output[0]['generated_text']
print(generated_text)