TinyStories-GR Llama 120M

A from-scratch, Llama-3.1-architecture causal language model trained to generate plausible short children's stories in Modern Greek. Part of a size-ablation family trained on the same data, tokenizer, and recipe -- only model size changes between them. Full architecture details are in this repo's config.json.

Model family

Size Params Val loss
120M 118.98M 1.4402
60M 59.98M 1.5185
30M 30.48M 1.6646
5M 4.82M 2.1269

Tokenizer

A custom byte-level BPE tokenizer, vocab size 16640 (16384 learned merges + the 256-entry byte alphabet). Built from the Llama 3.2 tokenizer's tokenization pipeline (regex pre-tokenizer, ByteLevel encoding/decoding) but retrained from scratch on the Greek corpus below, keeping only bos/eos special tokens (not Llama's ~254 unused reserved/fine-tuning placeholder tokens).

Training data

alexliap/tinystories-gr: 2,141,648 Greek translations of the TinyStories dataset. Trained for 1 epoch (~413M tokens) on sequences packed to 256 tokens (no padding, no truncation -- long stories span multiple packed sequences).

Sample generation

Greedy decoding, run until the model emits eos on its own (capped at 256 tokens):

Prompt: Μια φορά κι έναν καιρό, ένα μικρό κορίτσι

Completion (227 tokens, ended on eos):

Μια φορά κι έναν καιρό, ένα μικρό κορίτσι που το έλεγαν Λίλυ πήγε στο πάρκο με τη μαμά της. Είδαν ένα μεγάλο δέντρο με πολλά φύλλα. Η Λίλυ ήθελε να σκαρφαλώσει στο δέντρο, αλλά η μαμά της είπε ότι ήταν πολύ επικίνδυνο. Η Λίλυ στεναχωρήθηκε, αλλά άκουσε τη μαμά της.

Καθώς περπατούσαν, είδαν έναν άντρα να παίζει κιθάρα. Η μαμά της Λίλυ της είπε ότι ήταν μουσικός και ότι θα μπορούσε να παίξει κι εκείνη. Η Λίλυ χάρηκε πολύ και ρώτησε αν μπορούσε να δοκιμάσει. Ο άντρας είπε ναι και της έδωσε την κιθάρα.

Η Λίλυ προσπάθησε να παίξει κιθάρα, αλλά δεν ήξερε πώς. Ο άντρας της είπε ότι χρειαζόταν εξάσκηση για να μάθει. Η Λίλυ δεν ήξερε τι σήμαινε αυτό, αλλά ήθελε να δοκιμάσει. Ο άντρας της έδειξε πώς να κρατάει την κιθάρα και πώς να την κρατάει. Η Λίλυ προσπάθησε ξανά και ξανά, αλλά δεν μπορούσε να παίξει κιθάρα.

Ο άντρας είπε ότι θα τη βοηθούσε. Της έδειξε πώς να κρατάει την κιθάρα και πώς να την κρατάει. Η Λίλυ προσπάθησε ξανά και ξανά, αλλά δεν μπορούσε να παίξει κιθάρα. Ο άντρας είπε ότι θα τη βοηθούσε αργότερα. Η Λίλυ στεναχωρήθηκε, αλλά ήξερε ότι ο άντρας ήταν καλός. Τον αποχαιρέτησε και γύρισε στη μαμά της.

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

repo_id = "alexliap/tinystories-gr-llama-120m"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(repo_id)

prompt = "Μια φορά κι έναν καιρό,"
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
output = model.generate(input_ids, max_new_tokens=200, do_sample=False, eos_token_id=tokenizer.eos_token_id)
print(tokenizer.decode(output[0], skip_special_tokens=True))

Limitations

Trained on a single narrow domain (short, simple children's stories) for one epoch -- not a general-purpose language model. Expect fluent, grammatical Modern Greek within that domain, and degraded coherence/factuality well outside of it.

Downloads last month
14
Safetensors
Model size
0.1B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for alexliap/tinystories-gr-llama-120m

Finetuned
(939)
this model

Dataset used to train alexliap/tinystories-gr-llama-120m

Collection including alexliap/tinystories-gr-llama-120m