A Reproducible Systems Stack for Domain-Specialized Small Language Models: Tokenizer, Training, and Evaluation on Constrained Hardware.

We present a complete, reproducible systems stack for building domain-specialized small language models (SLMs) on resource-constrained hardware. Our implementation combines a production-grade Rust Byte Pair Encoding (BPE) tokenizer with a custom Python-based trans-former training pipeline designed for Apple Silicon (MPS). Using a 23M-parameter decoder-only transformer with RoPE, RMSNorm, and SwiGLU—trained on 81K physics arXiv papers—we achieve a physics QA score of 0.550 on a 20-question multiple-choice benchmark, outper- forming GPT-2 Large (774M) by 69% despite being 33×smaller. We document the complete iterative development process: from an initial model exhibiting early-EOS collapse (P(EOS)=0.9999), through root-cause analysis (missing causal mask, EOS-heavy training data), to a fixed architecture achieving P(EOS)=0.0000 with document packing. The contribution is a transparent, end-to-end reference implementation demonstrating that domain specialization decisively outperforms scale for narrow factual tasks.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-26
DOI
https://doi.org/10.5281/zenodo.24552388
Primary Topic
Topic Modeling
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

A Reproducible Systems Stack for Domain-Specialized Small Language Models: Tokenizer, Training, and Evaluation on Constrained Hardware.

Jaydip Singh
Zenodo (CERN European Organization for Nuclear Research)
Topic Modeling
preprint

A Reproducible Systems Stack for Domain-Specialized Small Language Models: Tokenizer, Training, and Evaluation on Constrained Hardware.

Jaydip Singh
preprint en

Abstract

We present a complete, reproducible systems stack for building domain-specialized small language models (SLMs) on resource-constrained hardware. Our implementation combines a production-grade Rust Byte Pair Encoding (BPE) tokenizer with a custom Python-based trans-former training pipeline designed for Apple Silicon (MPS). Using a 23M-parameter decoder-only transformer with RoPE, RMSNorm, and SwiGLU—trained on 81K physics arXiv papers—we achieve a physics QA score of 0.550 on a 20-question multiple-choice benchmark, outper- forming GPT-2 Large (774M) by 69% despite being 33×smaller. We document the complete iterative development process: from an initial model exhibiting early-EOS collapse (P(EOS)=0.9999), through root-cause analysis (missing causal mask, EOS-heavy training data), to a fixed architecture achieving P(EOS)=0.0000 with document packing. The contribution is a transparent, end-to-end reference implementation demonstrating that domain specialization decisively outperforms scale for narrow factual tasks.

Zenodo (CERN European Organization for Nuclear Research)
Topic Modeling
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
A Reproducible Systems Stack for Domain-Specialized Small Language Models: Tokenizer, Training, and Evaluation on Constrained Hardware. — Jaydip Singh · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS