Run this model with HF Jobs

Run FloorIsAwake/Flo-SR3 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/FloorIsAwake/Flo-SR3. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/FloorIsAwake/Flo-SR3 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Flo-SR3

Flo-SR3 (Standard right3) is a 49,152-token, byte-level BPE tokenizer designed for from-scratch pretraining of small and medium English, math, code, and tool-use language models.

Highlights

  • Hardware-friendly 49,152 vocabulary (uint16-safe): 49,152 = 384 × 128, fitting cleanly in uint16 shard storage (< 65,535) and matching SmolLM2's exact vocabulary size.
  • Right-aligned 3-digit grouping (right3): Splits Unicode decimal runs from the right into groups of 1–3 digits (1234567 → 1 | 234 | 567), keeping place-value boundaries consistent for arithmetic and numeric reasoning.
  • Zero unreachable ("zombie") learned tokens: All 48,894 learned BPE tokens have a verified, constructive UTF-8 encoding witness, with 0 multi-word superwords and 0 mismatches across 52 raw-vs-AutoTokenizer boundary probes.
  • Strong held-out compression: Fitted on a 50 MB decontaminated multi-domain corpus (22,606 whole documents, 0 exact or 8-word matches against 29 protected evaluation panels), outperforming SmolLM2 on 13 of 15 held-out panels—including +14.20% fewer tokens on math/STEM and +5.27% on general web.

Quickstart

from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("FloorIsAwake/Flo-SR3")

# 1. Right-aligned 3-digit grouping
print(tokenizer.tokenize("1234567"))
# ['1', '234', '567']

# 2. Lossless UTF-8 round-trip (clean_up_tokenization_spaces=False)
sample = "def f(x):\n    return x + 1234567\n"
ids = tokenizer.encode(sample, add_special_tokens=False)
assert tokenizer.decode(ids, skip_special_tokens=False) == sample

Encoding untrusted or raw text: By default (split_special_tokens=False), literal occurrences of <|endoftext|> and <|pad|> are parsed as control tokens (0 and 1). When tokenizing arbitrary raw documents or user inputs where literal special-token strings must be preserved as ordinary text, pass split_special_tokens=True:

raw_ids = tokenizer.encode(
    "Literal <|endoftext|> marker",
    add_special_tokens=False,
    split_special_tokens=True,
)
assert 0 not in raw_ids
assert tokenizer.decode(raw_ids, skip_special_tokens=False) == "Literal <|endoftext|> marker"

For full pretraining packing, SFT joint-encoding, chat-template, and BPB evaluation recipes, see USAGE_RECIPE.md.

Turnkey Pretraining Shard Prep

To build verified uint16 pretraining shards from local .txt, .jsonl, or .parquet corpora—with deduplication, exact/8-word holdout decontamination, per-token UTF-8 byte lengths (.token_bytes.bin), document offsets (.doc_offsets.bin), and SHA-256 verification—use the companion MIT-licensed CLI FloorIsGround/flo-sr3-data-prep:

pip install git+https://github.com/FloorIsGround/flo-sr3-data-prep.git
flo-sr3-data-prep prepare \
  --train train.jsonl --val val.jsonl \
  --deduplicate --append-eos \
  --output shards
flo-sr3-data-prep verify shards

Tokenizer Specification

Property Value
Vocabulary size 49,152 (0..49,151 contiguous, fits in uint16)
BOS / EOS token <|endoftext|> (ID 0)
PAD token <|pad|> (ID 1)
Byte alphabet IDs 2–257 (256 ByteLevel symbols; 243 valid UTF-8 lead/continuation bytes + 13 unused fallback bytes)
Learned BPE merges 48,894 (IDs 258–49,151), 0 multi-word superwords
Normalizer None (exact UTF-8 preservation)
Post-processor None (add BOS/EOS explicitly during packing or chat formatting)
clean_up_tokenization_spaces false
model_max_length 131,072
tokenizer.json SHA-256 7c8c809f9c5ae6e18e91cc54b229728ba257ddce83bdcc5fad2de9d74e32f285

Pre-tokenization pipeline

Flo-SR3 applies three tokenizers stages in sequence with no normalization:

  1. Right-aligned decimal split (Isolated): \p{Nd}{1,3}(?=(?:\p{Nd}{3})*(?!\p{Nd}))
  2. Standard word / punctuation / whitespace split (Isolated): ?\p{L}+| ?[^\s\p{L}\p{N}]+|\s+(?!\S)|\s+
  3. Byte-level encoding: ByteLevel(add_prefix_space=False, trim_offsets=False, use_regex=False)

Bundled compact chat template

tokenizer_config.json includes a lightweight Jinja chat template supporting system, user, assistant, and tool roles (System:\n..., User:\n..., Assistant:\n...<|endoftext|>\n, and <results>...</results> or ```output tool frames). It rejects reserved special tokens inside message content and ends generation prompts cleanly with Assistant:\n (avoiding trailing-space boundary artifacts). Because the role headers are ordinary vocabulary sequences rather than extra special IDs, you can freely override tokenizer.chat_template if your model uses another chat format.

Verification summary

Verified with transformers==5.24.1 and tokenizers==0.23.3 (see verification.json):

  • 48,894 / 48,894 learned IDs constructively witnessed on valid UTF-8 inputs (0 unreachable IDs).
  • 52 / 52 raw-backend vs. AutoTokenizer boundary probes matched with 0 mismatches.
  • Byte-identical replay: A fresh-process refit reproduced tokenizer.json byte for byte (7c8c809f...).

Intended Use & Limitations

  • Primary use case: From-scratch pretraining of small and medium language models (or domain-focused pretraining pipelines where right3 digit alignment, uint16 packing, and clean code/math/prose balance matter).
  • Not a drop-in swap for existing pretrained weights: Replacing the tokenizer of an already-trained checkpoint (even one with the same 49,152 vocabulary size, such as SmolLM2) requires embedding-matrix transfer (e.g., Fast Vocabulary Transfer / FOCUS / subword-mean initialization) followed by substantial continued pretraining to heal. Tokenizer transplantation onto existing checkpoints has not been benchmarked with Flo-SR3 yet.
  • Language scope: Fitted on English prose, OER, code, math/STEM, spoken dialogue, and tool-use text; non-English compression will fall back toward shorter subwords and byte tokens.
  • Intrinsic compression vs. downstream quality: The benchmark table below measures held-out compression only. Downstream language-model quality depends on the model architecture, training corpus, and compute budget.

Held-Out Compression Benchmark

Measured as UTF-8 bytes per content token (higher is better) with structural EOS excluded (full counts in compression.json). Positive percentages indicate fewer Flo-SR3 tokens than SmolLM2 on identical UTF-8 strings.

Panel UTF-8 bytes Flo-SR3 (B/t) SmolLM2 (B/t) vs. SmolLM2
heldout_math_stem 204,278 3.279 2.814 +14.20%
heldout_general_web 323,220 3.997 3.786 +5.27%
strict_math 1,743,602 3.737 3.608 +3.46%
web_lookup_grounding_eval 79,111 4.153 4.020 +3.20%
heldout_tool_web_lookup 124,703 4.361 4.233 +2.95%
openthink_dev 79,459 3.353 3.260 +2.77%
heldout_python_repl 725,879 3.697 3.639 +1.57%
heldout_oer 207,268 4.436 4.377 +1.32%
four_pillar 204,759 3.849 3.822 +0.69%
strict_val (all) 72,137,840 4.434 4.413 +0.47%
strict_code 1,884,852 3.682 3.667 +0.41%
strict_prose 68,322,568 4.484 4.467 +0.37%
general_dev 502,323 3.909 3.909 +0.01%
tier0 1,311 3.778 3.778 0.00%
heldout_spoken_dialogue 888,249 4.370 4.522 −3.47%

Flo-SR3 uses fewer tokens than SmolLM2 on 13 of 15 panels (tying tier0 and trailing on heldout_spoken_dialogue).


Fit Provenance & Source Terms

Flo-SR3 was fitted on 22,606 whole documents (49,999,692 UTF-8 bytes) selected in deterministic SHA-256 order across nine balanced strata:

Fit Stratum UTF-8 Bytes Share
Non-Wikipedia FineWeb-Edu 17,499,969 35.0%
Natural OER (Wikipedia, OpenStax, LibreTexts, Pressbooks, Stack Exchange) 9,999,998 20.0%
Math / STEM 7,499,968 15.0%
Python code 5,000,000 10.0%
Spoken dialogue (YouTube CC-BY, Ubuntu IRC) 3,499,972 7.0%
REPL / tool-integrated reasoning 2,499,987 5.0%
Lookup / grounded web 1,499,960 3.0%
Transform / synthetic 1,499,885 3.0%
Tool calling 999,953 2.0%
Total 49,999,692 100.0%

Decontamination

29 protected evaluation entries (213,312 strings, including SciQ, ARC-Easy, PIQA, strict validation, and development panels) were indexed with case-folded exact-document and 8-word shingle checks. 383 candidate documents were rejected prior to fitting; replaying the final sample verified 0 exact and 0 eight-word hits.

License & data terms

The released tokenizer package files (tokenizer.json, tokenizer_config.json, special_tokens_map.json, documentation, and verification metadata) are released under the MIT License (see LICENSE).

This package distributes learned tokenizer artifacts only (no raw training text). Public redistribution rights for every underlying source or web document are unverified. Of the 49,999,692 fit bytes:

  • 22,535,337 bytes (45.07%) come from ODC-BY database-licensed datasets (HuggingFaceFW/fineweb-edu, HuggingFaceTB/finemath, IFM/MegaMath), where ODC-BY covers the database while individual web pages remain subject to their respective holders' rights (and Common Crawl terms for FineWeb-Edu).
  • 10,461,379 bytes (20.92%) form the conservative subset with document metadata checked by the source adapters and a single CC-BY, Apache-2.0, or MIT label.
  • The remaining bytes come from strata carrying recorded dataset declarations, book attribution, share-alike (CC-BY-SA), BSD/ISC/Unlicense, or Public Domain source fields (an unspecified scope field alone does not establish individual document redistribution rights).

See provenance.json for exact dataset revisions, SHA-256 digests, recorded terms, and per-source byte counts.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support