Downloads · 30 days
156
3% of all-time downloads
0rn0/llama2-15m-tinystories-sft
llama2-15m-tinystories-sft is a text generation model from 0rn0. Use it when you need the model to write or continue text. It is set up for pytorch. The card lists the license as mit.
- Architecture: Llama 2 (custom implementation) - Parameters: ~15.2M - Context Length: 256 tokens - Embedding Dim: 288 - Attention Heads: 6 - KV Heads: 6 (Multi-Head Attention) - Transformer Layers: 6 - Tokenizer: Lla…
Downloads · 30 days
156
3% of all-time downloads
All-time downloads
4.8K
Public
Parameters
15.2M
91.7 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors30.4 MB · 98%
From the Hugging Face model README
Pre-trained from scratch on the TinyStories dataset. Pre-trained weights available at 0rn0/llama2-15m-tinystories.
Fine-tuned for 3 epochs on 0rn0/tinystories-instruct-balanced, a curated instruction-tuning dataset with balanced happy/sad endings (50-50 split, ~325K examples).
SFT Hyperparameters:
Training Results:
This is a custom PyTorch model (not transformers-compatible). Requires source code from the GitHub repository.
git clone https://github.com/aryandeore/llama2-sft.git
cd llama2-sft
uv sync
Write a story about: {topic}
With: {ending} ending
### Story:
Where {ending} is either happy or sad.
from models.llama2 import Transformer
model = Transformer.from_pretrained("0rn0/llama2-15m-tinystories-sft")
model.eval()
uv run python generate.py \
--topic "a brave knight" \
--ending sad \
--temperature 0.7 \
--max-tokens 192
Prompt: Write a story about: a little girl and her dog
Once upon a time, there was a little girl named Sophie who had a small dog named Buddy. Every morning, Sophie and Buddy would run to the park together. One sunny day, Sophie accidentally dropped her favorite toy near the big oak tree. Buddy immediately began to sniff around the grass, searching everywhere. Finally, Buddy found it! Sophie was so happy and hugged her dog tightly. From that day on, Sophie knew that Buddy would always be there to help her find anything she lost. Sophie and Buddy played together in the park every single day, and they were the very best of friends forever.
Prompt: Write a story about: a boy who lost his favorite toy
Once there was a young boy named Thomas who loved his wooden toy train. He played with it every single day and took it everywhere he went. One afternoon, Thomas left his beloved toy train at the park by accident. When he realized it was missing, he rushed back to search for it. He looked everywhere but could not find his precious toy. Thomas felt very sad and disappointed. His parents tried to comfort him, but nothing seemed to help. Thomas went to bed that night with tears in his eyes, wishing he could have his toy train back.