Text Generation
Transformers
Safetensors
GGUF
English
olmo2
base-model
from-scratch
reproducible-training
Eval Results (legacy)
Instructions to use tarpous/zero-125m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tarpous/zero-125m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tarpous/zero-125m")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tarpous/zero-125m") model = AutoModelForCausalLM.from_pretrained("tarpous/zero-125m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use tarpous/zero-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 tarpous/zero-125m:F16 # Run inference directly in the terminal: llama cli -hf tarpous/zero-125m:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf tarpous/zero-125m:F16 # Run inference directly in the terminal: llama cli -hf tarpous/zero-125m:F16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf tarpous/zero-125m:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf tarpous/zero-125m:F16
Use Docker
docker model run hf.co/tarpous/zero-125m:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use tarpous/zero-125m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tarpous/zero-125m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tarpous/zero-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tarpous/zero-125m:F16
- SGLang
How to use tarpous/zero-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 "tarpous/zero-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": "tarpous/zero-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 "tarpous/zero-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": "tarpous/zero-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use tarpous/zero-125m with Ollama:
ollama run hf.co/tarpous/zero-125m:F16
- Unsloth Desktop
- Docker Model Runner
How to use tarpous/zero-125m with Docker Model Runner:
docker model run hf.co/tarpous/zero-125m:F16
- Lemonade
How to use tarpous/zero-125m with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tarpous/zero-125m:F16
Run and chat with the model
lemonade run user.zero-125m-F16
List all available models
lemonade list
- Atomic Chat
|
Download README.md from tarpous/zero-125m: direct link, hf CLI and curl.
- Browser
- Download file 7.13 kB
-
https://huggingface.co/tarpous/zero-125m/resolve/main/README.md
- Command line
-
hf download hf://tarpous/zero-125m/README.md
-
curl -L -o README.md https://huggingface.co/tarpous/zero-125m/resolve/main/README.md
7.13 kB
| license: apache-2.0 | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| datasets: | |
| - HuggingFaceFW/fineweb-edu | |
| language: | |
| - en | |
| tags: | |
| - olmo2 | |
| - base-model | |
| - gguf | |
| - from-scratch | |
| - reproducible-training | |
| model-index: | |
| - name: zero-125m | |
| results: | |
| - task: | |
| type: text-generation | |
| name: Text generation | |
| dataset: | |
| name: FineWeb-Edu sample-10BT, fixed non-wrapping validation windows | |
| type: HuggingFaceFW/fineweb-edu | |
| split: validation | |
| metrics: | |
| - type: perplexity | |
| name: Validation perplexity | |
| value: 27.799 | |
| - type: loss | |
| name: Validation mean loss | |
| value: 3.324985 | |
| - task: | |
| type: text-generation | |
| name: Text generation | |
| dataset: | |
| name: FineWeb-Edu sample-10BT, fixed non-wrapping test windows | |
| type: HuggingFaceFW/fineweb-edu | |
| split: test | |
| metrics: | |
| - type: perplexity | |
| name: Test perplexity | |
| value: 29.970 | |
| - type: loss | |
| name: Test mean loss | |
| value: 3.400198 | |
| # zero-125m | |
| `zero-125m` is a 124,680,960-parameter OLMo2-compatible base language model | |
| trained from scratch on 2,500,001,792 FineWeb-Edu tokens. It is the released | |
| dense model from the | |
| [`lm-from-zero`](https://github.com/tarpous/lm-from-zero) project, which covers | |
| the complete path from byte-level BPE tokenization to local serving. | |
| This repository includes the native Transformers model and tokenizer, F16 and | |
| Q8_0 GGUF derivatives, evaluation evidence, and the full technical report. | |
|  | |
| [Technical report](lm-from-zero-technical-report.pdf) | | |
| [Source and reproducibility](https://github.com/tarpous/lm-from-zero) | | |
| [Capture evidence](assets/pi-demo-evidence.json) | |
| ## Intended use | |
| The model is intended for research, education, systems experiments, conversion | |
| tests, and local inference demonstrations. It is a pretrained base model. It | |
| has not been aligned for assistant use and should not be treated as a reliable | |
| chatbot, factual reference, or safety-critical system. | |
| ## Training | |
| - Architecture: OLMo2-compatible causal decoder | |
| - Parameters: 124,680,960 | |
| - Layers: 12 | |
| - Hidden width: 768 | |
| - Query heads: 12 | |
| - Key/value heads: 4 | |
| - Context length: 2,048 tokens | |
| - Vocabulary: 32,000 byte-level BPE tokens | |
| - Training tokens: 2,500,001,792 | |
| - Data: FineWeb-Edu `sample-10BT`, immutable revision | |
| `87f09149ef4734204d70ed1d046ddc9ca3f2b8f9` | |
| - Optimizer: AdamW with linear warmup and cosine decay | |
| - Numerical format: bfloat16 training with fp32 optimizer state | |
| - Hardware: one NVIDIA RTX 4080 SUPER | |
| The tokenizer, shard manifest, model configuration, checkpoint, evaluation, | |
| and converted package are connected by recorded hashes. The native | |
| Transformers export has an exact maximum fp32 logit error of 0.0 against the | |
| project checkpoint in the recorded parity evaluation. | |
| `model.safetensors` stores float32 tensors and is 498,738,888 bytes. That | |
| precision is deliberate: it is what makes the exact logit-parity check above | |
| meaningful, because the released file is bit-identical in value to the project | |
| checkpoint rather than a re-quantized copy of it. Load with | |
| `dtype=torch.bfloat16` for inference, or take one of the GGUF files below if a | |
| smaller download matters more than parity. | |
| ## Evaluation | |
| Evaluation uses fixed, non-wrapping FineWeb-Edu windows. | |
| | Split | Mean loss | Perplexity | | |
| |---|---:|---:| | |
| | Validation | 3.324985 | 27.799 | | |
| | Test | 3.400198 | 29.970 | | |
| These measurements describe next-token likelihood under this tokenizer and | |
| window protocol. They are not instruction-following, factuality, or safety | |
| scores. | |
|  | |
|  | |
| The `figures/` directory also carries the 20M architecture study, the dense | |
| ablation screening, and the local judge calibration from the wider project. | |
| ## Transformers usage | |
| ```python | |
| import torch | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| model_id = "tarpous/zero-125m" | |
| tokenizer = AutoTokenizer.from_pretrained(model_id) | |
| model = AutoModelForCausalLM.from_pretrained( | |
| model_id, | |
| dtype=torch.bfloat16, | |
| device_map="auto", | |
| ) | |
| inputs = tokenizer("Once upon a time,", return_tensors="pt").to(model.device) | |
| with torch.inference_mode(): | |
| output = model.generate( | |
| **inputs, | |
| max_new_tokens=64, | |
| do_sample=False, | |
| ) | |
| print(tokenizer.decode(output[0], skip_special_tokens=True)) | |
| ``` | |
| This is a base model, so continuations may be repetitive, abrupt, or | |
| inaccurate. A prompt formatted as a conversation does not turn it into an | |
| instruction-following model. | |
| ## GGUF files | |
| | File | Size | SHA-256 | | |
| |---|---:|---| | |
| | `zero-125m-f16.gguf` | 250,567,744 bytes | `4863f80ea315fc0713da86750f71cddc8dfbec09c0d3f8a853cee650220027ab` | | |
| | `zero-125m-q8_0.gguf` | 133,708,864 bytes | `401866c0a19e803eea19b00e056915a37b05ebe1146430b618355071680b8692` | | |
| The Q8_0 artifact produced 76.5 decoded tokens per second in the recorded | |
| bounded CUDA llama.cpp smoke. Throughput is hardware and build dependent. | |
| Conversion details and the pre-tokenizer compatibility patch are documented in | |
| the project repository. | |
| ## Broader project evidence | |
| The project also trained a 20M dense FineWeb model and separate TinyStories | |
| models near 20M parameters using dense attention, Mamba-2, and masked discrete | |
| diffusion. It includes dense ablations, supervised fine-tuning, DPO, and local | |
| judge calibration. Those results describe the research project and are not | |
| additional training stages of this released base checkpoint. | |
| The full report is available in this model repository as | |
| `lm-from-zero-technical-report.pdf` and in the GitHub release. | |
| ## Limitations | |
| - The model is small and was trained for only 2.5 billion tokens. | |
| - It is a base model without safety or instruction tuning. | |
| - FineWeb-Edu may contain errors, bias, personal information, and other | |
| undesirable web content despite dataset-level filtering. | |
| - The model can generate false, biased, offensive, repetitive, or incoherent | |
| text. | |
| - Evaluation covers held-out language-model loss, not downstream capability or | |
| responsible-deployment criteria. | |
| - The planned 125M FineWeb Mamba-2 and masked-diffusion runs were not completed. | |
| - The planned 500-prompt cross-judge calibration was not completed. | |
| Users are responsible for evaluating the model in their own setting and for | |
| adding safeguards appropriate to any application. | |
| ## Citation | |
| ```bibtex | |
| @software{tarpous2026lmfromzero, | |
| author = {tarpous}, | |
| title = {lm-from-zero: A Local-First, Reproducible Language-Model Pipeline from Tokenization to Serving}, | |
| year = {2026}, | |
| url = {https://github.com/tarpous/lm-from-zero} | |
| } | |
| ``` | |
| ## License | |
| The model weights, tokenizer, GGUF files, and code are released under | |
| Apache-2.0. The technical report and its figures are released under CC BY 4.0. | |