Text Generation
Transformers
Safetensors
English
llama
causal-lm
pretraining
from-scratch
single-gpu
nvidia-l20
text-generation-inference
Instructions to use Epode/Prelude-1B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Epode/Prelude-1B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Epode/Prelude-1B-Base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Epode/Prelude-1B-Base") model = AutoModelForCausalLM.from_pretrained("Epode/Prelude-1B-Base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Epode/Prelude-1B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Epode/Prelude-1B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Epode/Prelude-1B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Epode/Prelude-1B-Base
- SGLang
How to use Epode/Prelude-1B-Base 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 "Epode/Prelude-1B-Base" \ --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": "Epode/Prelude-1B-Base", "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 "Epode/Prelude-1B-Base" \ --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": "Epode/Prelude-1B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Epode/Prelude-1B-Base with Docker Model Runner:
docker model run hf.co/Epode/Prelude-1B-Base
File size: 6,767 Bytes
608ecff e6e3b61 608ecff e6e3b61 608ecff e6e3b61 608ecff e6e3b61 d4737e1 e6e3b61 608ecff | 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 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | ---
language:
- en
library_name: transformers
pipeline_tag: text-generation
tags:
- causal-lm
- llama
- pretraining
- from-scratch
- single-gpu
- nvidia-l20
---
# Prelude-1B-Base
Prelude-1B-Base (formerly L20-1B-20B-Base) is a 1.10B-parameter English causal language model pretrained
from random initialization on 20.0B prediction tokens using one NVIDIA L20.
The tokenizer was also trained from scratch. This is a base completion model,
not an instruction/chat model, and no third-party pretrained checkpoint was
used to initialize it.
## Quick start
```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Epode/Prelude-1B-Base"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
prompt = "Machine learning is"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(
**inputs,
max_new_tokens=80,
do_sample=True,
temperature=0.8,
top_p=0.95,
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
```
The uploaded safetensors preserve the final checkpoint exactly in FP32. Loading
with BF16, as above, substantially reduces inference memory use.
## Architecture
| Field | Value |
|---|---:|
| Parameters | 1,100,048,384 |
| Architecture | LlamaForCausalLM |
| Layers | 22 |
| Hidden size | 2,048 |
| Attention heads / KV heads | 32 / 4 |
| MLP intermediate size | 5,632 |
| Context length | 2,048 |
| Vocabulary | 32,000 byte-level BPE |
| Positional encoding | RoPE, theta 10,000 |
| Weight tying | No |
## Training
The run completed 19,148 optimizer steps and 19,999,703,040 prediction tokens.
It used BF16 mixed precision, compiled PyTorch SDPA, fused AdamW, sequence length
2,048, micro-batch 6, gradient accumulation 85, and an effective global batch
of 510 sequences. The learning rate used 1,000 warmup steps followed by cosine
decay from 4e-4 to 4e-5.
The English training mixture was:
- 42.5% FineWeb-Edu-Dedup, score 4+
- 42.5% DCLM-Baseline
- 3% FineMath-4+
- 12% permissively licensed Stack-Edu code in Python, JavaScript, TypeScript,
C++, and Java at the release-validated educational thresholds
Accepted documents passed English/content filters, normalized-text SHA-256
exact deduplication, and a 13-word benchmark decontamination check. DCLM email
addresses and syntactically valid IPv4 addresses were deterministically
anonymized. The original decontamination list did not explicitly include BoolQ;
results therefore include a six-task sensitivity analysis excluding BoolQ.
## Hardware, throughput, and MFU
Training used exactly one NVIDIA L20 with 46,068 MiB VRAM. The software snapshot
recorded NVIDIA driver 580.159.04, CUDA 13.0, PyTorch 2.12.1+cu130, Transformers
4.56.2, and lm-eval 0.4.9.
A representative live snapshot at step 10,595 recorded:
| Metric | Value |
|---|---:|
| Throughput | 12,845 tokens/s |
| Model FLOP/s | 93.948 TFLOP/s |
| Standard MFU | 71.17% |
| GPU utilization | 100% |
| VRAM use | 45,265 / 46,068 MiB |
| Power | 348.3 W |
MFU is calculated as `model_FLOP/s / 132e12`, using exactly 132 TFLOP/s as the
BF16 peak denominator. This is point-in-time training telemetry, not a full-run
average. A separate 60-step preflight at the selected micro-batch measured
12,586 tokens/s and 36.13 GiB peak allocated memory; micro-batch 8 was rejected
after an out-of-memory failure.
## Evaluation
Final held-out validation loss was **2.4247** (perplexity **11.2990**). External
evaluation used lm-eval 0.4.9, BF16, maximum context 2,048, and fixed seeds.
| Task | Shots | Metric | Score |
|---|---:|---|---:|
| ARC-Challenge | 0 | acc_norm | 33.62% |
| ARC-Easy | 0 | acc_norm | 64.14% |
| HellaSwag | 0 | acc_norm | 45.13% |
| OpenBookQA | 0 | acc_norm | 35.00% |
| PIQA | 0 | acc_norm | 69.59% |
| WinoGrande | 0 | acc | 52.17% |
| BoolQ | 0 | acc | 59.17% |
| LAMBADA OpenAI | 0 | acc | 46.26% |
| TruthfulQA MC2 | 0 | acc | 36.91% |
| MMLU | 5 | acc | 25.31% |
| GSM8K | 5 | flexible exact match | 1.67% |
The primary seven-task macro over HellaSwag, PIQA, WinoGrande, OpenBookQA,
ARC-Easy, ARC-Challenge, and BoolQ is **51.2601%**. Excluding BoolQ gives
**49.9411%**.
Under the same frozen seven-task protocol, this checkpoint:
- beats TinyLlama 1T by **+1.0182 percentage points**, paired task-stratified
bootstrap 95% CI **[+0.1584, +1.8860]**;
- ties TinyLlama 1.5T: +0.0910 pp, 95% CI [-0.7771, +0.9745];
- ties TinyLlama 2T: -0.3019 pp, 95% CI [-1.1978, +0.5871];
- loses to TinyLlama 2.5T: -2.6317 pp, 95% CI [-3.4891, -1.8006].
The intervals cover benchmark-item sampling uncertainty only. They do not cover
training-seed variance and are not adjusted for multiple comparisons. The full
36-checkpoint study contains both wins and losses; it is a frozen candidate set,
not a global census or a claim of universal token-efficiency leadership.
Machine-readable [final benchmark metrics](https://huggingface.co/Epode/Prelude-1B-Base/blob/main/evaluation/final-benchmarks.json),
the complete [36-checkpoint comparison](https://huggingface.co/Epode/Prelude-1B-Base/blob/main/evaluation/efficiency-all-results.md),
and [GPU telemetry](https://huggingface.co/Epode/Prelude-1B-Base/tree/main/training)
are included in this release.

## Limitations
- This base model is not instruction tuned, preference tuned, or safety tuned.
- It may hallucinate, repeat text, produce biased or harmful content, and should
not be used as a factual authority or autonomous decision maker.
- It is English-focused, has a 2,048-token context window, and is weak on
multi-step mathematics in the reported evaluation.
- MMLU 5-shot required left truncation for some examples at the 2,048-token
context limit, so that score should be interpreted with care.
- Exact deduplication and benchmark matching cannot prove the absence of all
semantic near-duplicates, paraphrases, personal information, or contamination.
- Dataset quality filters improve the input distribution but do not guarantee
correctness of every training document or model output.
## Reproducibility and release integrity
The release contains three sharded safetensors files. Conversion verified exact
equality for all 201 tensors against the final Transformers checkpoint. The
release manifest records file hashes, source checkpoint hash, parameter count,
and storage dtype. Training code, compact receipts, derived metrics, confidence
intervals, and plotting scripts are maintained in the accompanying private
GitHub evidence repository.
|