[ Horizon Labs ]

> ls models/twilight-135m/

# Twilight-135M

Our first model: a 135M-parameter base model, pretrained from scratch on 9.81B tokens in 4 hours 21 minutes on a single B200.

It beats GPT-2 (124M) on HellaSwag, ARC-Easy and ARC-Challenge, and ties it on PIQA. How we trained it: the writeup.

It's a base model: it continues text, and isn't tuned for chat. Weights and code are released under Apache 2.0.

# Fig. 1: Benchmarks
TwilightGPT-2
HellaSwag32.131.2
ARC-Easy51.443.8
ARC-Challenge25.222.4
PIQA62.962.9

Zero-shot accuracy, %. HellaSwag and ARC-Challenge are length-normalized. Same scorer for both models.

# Files

# Fig. 2: Architecture
Parameters134.5M
Layers30
Width576
Attention heads9 query / 3 key-value
Feed-forwardSwiGLU, 1,536
PositionsRotary
Vocabulary49,152
Context512 tokens

Weights in float32, split across two safetensors shards.

# Use

Download every file, check them against SHA256SUMS, and sample. twilight.py is a self-contained PyTorch implementation; it runs on CUDA, Apple silicon or CPU.

U=https://files.horiznlabs.dev/twilight-135m
mkdir twilight-135m && cd twilight-135m
for f in README.md LICENSE config.json \
  tokenizer.json twilight.py SHA256SUMS \
  model.safetensors.index.json \
  model-00001-of-00002.safetensors \
  model-00002-of-00002.safetensors
do curl -fsSLO "$U/$f"; done
shasum -a 256 -c SHA256SUMS

pip install torch safetensors tokenizers
python twilight.py "The heart is a muscle that"

# In Python

From inside the folder:

from twilight import load, generate

model, tokenizer = load()
print(generate(model, tokenizer, "The heart is a muscle that"))