Loading…
Loading…
This model is a custom transformer-based language model trained on the TinyStories dataset, designed for creative text generation tasks such as storytelling and conversational agents. This model is purely an academic project and should not be used in production or practical applications.
This model utilizes a custom tokenizer with Byte Pair Encoding (BPE) and has been trained with a smaller architecture to balance efficiency and performance. It is designed for generating coherent and contextually relevant short stories. However, a known issue with the tokenizer causes spaces between tokens to appear repeated, leading to suboptimal text output quality.
This model is intended for academic and research purposes only. It demonstrates a proof of concept for training smaller transformer-based language models.
The model may reflect biases present in the training data, leading to unintended or inappropriate outputs. Additionally, the tokenizer issue can result in suboptimal and incoherent text generations.
This model is meant for research and demonstration purposes. Users should validate outputs critically and avoid using it for practical applications.
from transformers import AutoModelForCausalLM, PreTrainedTokenizerFast
model = AutoModelForCausalLM.from_pretrained("amusktweewt/tiny-stories-v1")
tokenizer = PreTrainedTokenizerFast.from_pretrained("amusktweewt/tiny-stories-v1")
prompt = "Once upon a time,"
inputs = tokenizer(prompt, return_tensors="pt", return_token_type_ids=False)
outputs = model.generate(**inputs, max_new_tokens=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
The model was trained on the TinyStories dataset, consisting of curated short stories. Preprocessing ensured consistent formatting and tokenization using a custom BPE tokenizer.
<sos>, <pad>, <|endoftext|>, and <unk>A subset of the training data was used for evaluation, focusing on coherence and storytelling quality.
The model generates coherent short stories suitable for research demonstration but is limited by tokenizer issues and should not be used in real-world scenarios.
amusktweewt
For questions or feedback, contact amusktweewt.