Instructions to use khkstudios/dassie-50m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use khkstudios/dassie-50m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="khkstudios/dassie-50m")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("khkstudios/dassie-50m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use khkstudios/dassie-50m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "khkstudios/dassie-50m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "khkstudios/dassie-50m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/khkstudios/dassie-50m
- SGLang
How to use khkstudios/dassie-50m with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "khkstudios/dassie-50m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "khkstudios/dassie-50m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "khkstudios/dassie-50m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "khkstudios/dassie-50m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use khkstudios/dassie-50m with Docker Model Runner:
docker model run hf.co/khkstudios/dassie-50m
dassie-50m
Named after the dassie (rock hyrax), the small, round, rock-sunbathing mammal of South Africa.
A ~54.8M parameter Llama-style language model trained from scratch on TinyStoriesV2 (GPT-4 subset). It writes short, simple children's stories in English.
Built as a learning project. All code (model, tokenizer training, training loop, export) is at https://github.com/keegalix/dassie-50m.
Quick start
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("keegalix/dassie-50m")
model = AutoModelForCausalLM.from_pretrained("keegalix/dassie-50m")
inputs = tok("Once upon a time", return_tensors="pt")
out = model.generate(**inputs, max_new_tokens=200, do_sample=True, temperature=0.8, top_p=0.95)
print(tok.decode(out[0], skip_special_tokens=True))
No trust_remote_code is needed. The weights are a standard LlamaForCausalLM, and
generation_config.json already sets the sampling defaults above.
llama.cpp / Ollama / LM Studio
python llama.cpp/convert_hf_to_gguf.py ./dassie-50m --outfile dassie-50m-f16.gguf --outtype f16
./llama.cpp/build/bin/llama-cli -m dassie-50m-f16.gguf -p "Once upon a time" -n 200
Model details
| Architecture | Decoder-only transformer (Llama: RMSNorm, RoPE, SwiGLU, pre-norm) |
| Parameters | ~54.8M (tied input/output embeddings) |
| Layers / hidden / heads | 10 / 640 / 10 (head dim 64) |
| FFN hidden | 1728 |
| Context length | 512 tokens |
| Tokenizer | Byte-level BPE, 8,192 vocab, trained on TinyStoriesV2 |
| Special token | <|endoftext|> (id 0) serves as BOS, EOS and pad |
Training
| Data | TinyStoriesV2-GPT4-train, ~530M tokens; 0.5% of stories held out for validation |
| Text cleaning | Curly quotes and dashes normalized to ASCII |
| Optimizer | AdamW (β 0.9/0.95, wd 0.1), peak LR 1e-3, warmup 500 steps, cosine decay to 1e-4 |
| Batch | 131,072 tokens/step (32 × 8 accum × 512) |
| Schedule | 8,000 steps (~1.05B tokens, ~2 epochs) |
| Best checkpoint | step TBD (TBD tokens) |
| Hardware | Apple Mac Mini M4 (PyTorch MPS, bf16 autocast) |
| Validation loss | TBD (perplexity TBD) |
The full loss curve is in training_log.csv.
Samples
TBD after training.
Limitations
- It only knows the narrow world of TinyStories: simple vocabulary, short stories for young children.
- It isn't instruction-tuned and doesn't answer questions; it continues text.
- It can produce repetitive or inconsistent stories, and any biases in the GPT-4-generated dataset carry over.
- It isn't suitable for any production or factual use.
License & citation
The model weights and code are released under MIT. The training data is TinyStories by Ronen Eldan and Yuanzhi Li (paper), distributed under CDLA-Sharing-1.0.
@article{eldan2023tinystories,
title = {TinyStories: How Small Can Language Models Be and Still Speak Coherent English?},
author = {Eldan, Ronen and Li, Yuanzhi},
journal = {arXiv preprint arXiv:2305.07759},
year = {2023}
}