Downloads · 30 days
73
27% of all-time downloads
Shivam3002/OxMini-v2
OxMini-v2 is a text generation model from Shivam3002. Use it when you need the model to write or continue text. It is set up for pytorch. The card lists the license as mit.
OxMini v2 is a 2.75M-parameter, CPU-first educational language model. It combines a gated delta-rule recurrent attention approximation (KDA-lite), low-rank latent causal attention (MLA-lite), four residual streams wit…
Downloads · 30 days
73
27% of all-time downloads
All-time downloads
275
Public
Repo size
12.8 MB
Likes
0
Public
Click a slice to open those files.
.safetensors11.1 MB · 86%
From the Hugging Face model README
OxMini v2 is a 2.75M-parameter, CPU-first educational language model. It combines a gated delta-rule recurrent attention approximation (KDA-lite), low-rank latent causal attention (MLA-lite), four residual streams with Sinkhorn-constrained mHC-style routing, SwiGLU blocks, and cached decoding.

V2 replaces v1's Shakespeare-only training with a 3M-character TinyStories base run and revision-pinned, response-only Wikipedia post-training with TinyStories replay. It is measurably better at the held-out instruction format, but it is still far too small for coherent or factual long-form writing.
| Property | Value |
|---|---|
| Parameters | 2,752,568 |
| Context | 320 characters |
| Vocabulary | 117 characters, printable ASCII included |
| Layers | 6 KDA-lite + 2 MLA-lite |
| Width / heads | 144 / 6 |
| Residual streams | 4, Sinkhorn-routed |
| TinyStories test CE / PPL / accuracy | 1.2885 / 3.6272 / 61.54% |
| Held-out SFT CE / PPL / accuracy | 2.0018 / 7.4027 / 45.57% |
| Cached decoding | about 200 chars/s in measured qualitative runs |
See V2_RESULTS.md for the base, pure-SFT, and replay-SFT comparison. The
release is the replay checkpoint because pure SFT improved instruction loss by
slightly more but degraded TinyStories perplexity to 5.4063.
git clone https://huggingface.co/Shivam3002/OxMini-v2
cd OxMini-v2
python -m venv .venv
source .venv/bin/activate
pip install .
from huggingface_hub import snapshot_download
from oxmini import CharTokenizer, OxMiniForCausalLM
from oxmini.generate import generate_text
repo = snapshot_download("Shivam3002/OxMini-v2")
model = OxMiniForCausalLM.from_pretrained(repo)
tokenizer = CharTokenizer.load(f"{repo}/tokenizer.json")
prompt = "User: Write a short story about a helpful robot.\nAssistant:"
print(
generate_text(
model,
tokenizer,
prompt,
max_new_tokens=300,
temperature=0.7,
top_k=40,
seed=20260828,
)
)
The package is plain PyTorch plus safetensors. It does not need
trust_remote_code, and no pickle checkpoint is published.
Base training used 1,200 CPU updates over a deterministic 90/5/5 split of
3,000,000 TinyStories characters. Post-training used 40 source-backed English
Wikipedia leads for response-only SFT and 10 held-out topics for selection.
Each update also replayed TinyStories with weight 0.5 to reduce catastrophic
forgetting. Exact data hashes, revisions, and commands are in V2_RESULTS.md,
posttraining_data/manifest.json, and the repository scripts.
The Wikipedia excerpts remain CC BY-SA 4.0 and retain per-row attribution; see
POSTTRAINING_DATA_LICENSE.md.
OxMini v2 is not a capable assistant. Its unedited outputs contain malformed words, repetition, topic drift, and fabricated statements. It cannot reliably write an essay, answer factual questions, follow complex instructions, or sustain a 1,000-word argument. Character tokenization and the 320-character training context are severe constraints. Evaluation is small, English-only, single-seed, and not a standardized safety or capability benchmark.
Use it for architecture study, CPU training experiments, caching tests, and small ablations only. Do not use it for factual, medical, legal, financial, safety-critical, production, or user-facing decisions.
posttraining_data/manifest.json.