Text Generation
Transformers
Safetensors
GGUF
English
llama
pretraining
from-scratch
text-generation-inference
Instructions to use perletter/dot-125m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use perletter/dot-125m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="perletter/dot-125m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("perletter/dot-125m") model = AutoModelForCausalLM.from_pretrained("perletter/dot-125m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use perletter/dot-125m with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf perletter/dot-125m:Q4_K_M # Run inference directly in the terminal: llama cli -hf perletter/dot-125m:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf perletter/dot-125m:Q4_K_M # Run inference directly in the terminal: llama cli -hf perletter/dot-125m:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf perletter/dot-125m:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf perletter/dot-125m:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf perletter/dot-125m:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf perletter/dot-125m:Q4_K_M
Use Docker
docker model run hf.co/perletter/dot-125m:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use perletter/dot-125m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "perletter/dot-125m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "perletter/dot-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/perletter/dot-125m:Q4_K_M
- SGLang
How to use perletter/dot-125m 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 "perletter/dot-125m" \ --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": "perletter/dot-125m", "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 "perletter/dot-125m" \ --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": "perletter/dot-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use perletter/dot-125m with Ollama:
ollama run hf.co/perletter/dot-125m:Q4_K_M
- Unsloth Studio
How to use perletter/dot-125m with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for perletter/dot-125m to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for perletter/dot-125m to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for perletter/dot-125m to start chatting
- Docker Model Runner
How to use perletter/dot-125m with Docker Model Runner:
docker model run hf.co/perletter/dot-125m:Q4_K_M
- Lemonade
How to use perletter/dot-125m with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull perletter/dot-125m:Q4_K_M
Run and chat with the model
lemonade run user.dot-125m-Q4_K_M
List all available models
lemonade list
- Atomic Chat
File size: 4,377 Bytes
c6f7b49 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | ---
license: apache-2.0
language:
- en
library_name: transformers
tags:
- text-generation
- llama
- pretraining
- from-scratch
pipeline_tag: text-generation
---
# Dot-125M
Dot-125M is a 125M-parameter (133.7M actual), Llama-3-style decoder-only transformer,
pretrained **entirely from scratch** β no fine-tuning or continued pretraining from an
existing checkpoint β by **[Perletter](https://perletter.com)**, part of Chirping Waves
Limited (Ireland).
It was trained on 2.0B tokens (4 epochs over a 500M-token filtered, deduplicated sample
of [FineWeb-Edu](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu)) on a single
consumer laptop GPU.
This is a **base (pretrained) language model** β it has not been instruction-tuned,
RLHF'd, or chat-templated. It completes text; it does not reliably follow instructions
or hold a conversation.
## Model details
| | |
|---|---|
| Parameters | 133.7M |
| Architecture | Llama-3-style decoder-only, GQA, RoPE, RMSNorm, SwiGLU, tied embeddings |
| Layers / heads / KV heads | 12 / 12 / 4 |
| Hidden size | 960 |
| Context length | 512 |
| Vocab size | 16,384 (byte-level BPE, trained from scratch on the training split) |
| Training tokens | 2.0B (4 epochs Γ 500M-token corpus) |
| Training data | [FineWeb-Edu](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu) (`sample-10BT`), quality-filtered + exact/near-deduplicated, English only |
| License | Apache 2.0 |
## Benchmarks
Compared against GPT-2-small (124M, ~10B training tokens) β see full write-up for
methodology.
**Bits-per-byte (primary metric, tokenizer-fair comparison), on a held-out test split:**
| | bpb | ppl |
|---|---|---|
| **Dot-125M** | **1.0142** | 20.64 |
| GPT-2-small | 1.0281 | 27.19 |
**lm-evaluation-harness:**
| task | Dot-125M | GPT-2-small |
|---|---|---|
| arc_easy (acc) | 48.23% | 43.81% |
| hellaswag (acc_norm) | 30.86% | 31.14% |
| piqa (acc) | 61.43% | 62.89% |
| winogrande (acc) | 49.57% | 51.62% |
| lambada_openai (acc) | 23.02% | 32.56% |
Mixed on the individual benchmark tasks (stronger on arc_easy, weaker on
lambada_openai's long-range prediction β expected given the token/context budget:
Dot-125M saw 500M unique tokens across 4 epochs at 512 context vs. GPT-2's ~10B tokens
single-pass at 1024 context), but wins on the primary bits-per-byte metric.
**Quantization** (GGUF, via llama.cpp): Q8_0 stays within 0.01% bpb of full-precision
f16. Q4_K_M is available but falls back to a different quant scheme for most tensors
(this model's hidden size isn't a multiple of 256, the k-quant block size) β still only
~0.17% bpb degradation vs. f16, but not "true" Q4_K_M. Q8_0/Q4_0/Q5_0/Q5_1 are the
quant types this model size supports natively.
## Intended use
Research, experimentation, and demonstration of from-scratch small-LM pretraining. Not
instruction-tuned β do not expect chat-assistant behavior out of the box. Not suitable
for production use requiring factual reliability, safety filtering, or instruction
following without further fine-tuning.
## How to use
**Transformers (safetensors):**
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("perletter/Dot-125M")
model = AutoModelForCausalLM.from_pretrained("perletter/Dot-125M")
inputs = tok("The history of the internet", return_tensors="pt")
out = model.generate(**inputs, max_new_tokens=50)
print(tok.decode(out[0], skip_special_tokens=True))
```
**llama.cpp (GGUF):**
```bash
llama-cli -m model-Q8_0.gguf -p "The history of the internet" -n 50
```
## Limitations
- Small model, small training budget β general knowledge and reasoning are limited
compared to larger contemporary models.
- English only.
- Base model only β no safety fine-tuning, no RLHF, no instruction-tuning. It will
complete harmful, biased, or false text if prompted toward it, the same as any
unaligned base LM.
- 512-token context window.
## License
Apache 2.0 β the model weights are freely available for any use, including commercial,
with no attribution requirement beyond the license notice. See `LICENSE`.
The training code/pipeline used to produce this model is **not** included in this
release.
## Citation
```
@misc{dot125m2026,
title = {Dot-125M},
author = {Perletter, part of Chirping Waves Limited},
year = {2026},
url = {https://perletter.com}
}
```
|