Hi. I gave the final V2 another try, including a follow-up on the tokenizer issue from last time:
I ran the original V2 Preview and final V2 checkpoints on an L4 with the same inference harness. The direction of the improvements you reported is visible in my tests too: more arithmetic responses finish naturally, some now give the right numerical result, and the final checkpoint assigns substantially higher probability to short Python sequences. Great to see the project reach the 50B-token stage.
| Observation | V2 Preview | Final V2 |
|---|---|---|
| Generation trials completed without a runtime error | 78/78 | 78/78 |
| Reached the end token | 56/78 | 70/78 |
| Arithmetic, compact input, final-equation scoring | 0/24 | 4/24 |
| Arithmetic, normalized input, final-equation scoring | 0/24 | 5/24 |
| Code token perplexity, eight short snippets | 14.08 | 4.93 |
| Prose token perplexity, eight short snippets | 22.49 | 22.16 |
| Requested JSON object successfully returned, four selected greedy prompts | 0/4 | 0/4 |
These are my own small diagnostic tests. The arithmetic rows use a separate, post-hoc final-equation review; the original automatic scores were zero for both checkpoints. This is not a reproduction of your mixed-digit benchmark, and code perplexity is not code execution accuracy.
Your expanded tokenizer cleanup also works on the examples it was intended for: 17/17 of your regression cases and 210/216 exact round trips on my older panel, versus 194/216 with the Preview cleaner. I also tried an alternative encoding that preserves all 32,001 token IDs and eliminates the 17 tested internal-space collisions. However, it did not improve answer correctness with the existing weights in my follow-up. I would treat it as an option for future tokenizer design, not a drop-in replacement.
For your planned continuation towards 100B tokens, I would keep the current tokenizer as the default. For exact code, paths or structured text, retaining raw IDs and raw decoded text separately from the cleaned display, and adding a few paired intentional-space tests, would be useful low-cost steps. The results and optional experiment are below; none of these requires a change to your current roadmap.
1. How I compared the two checkpoints
Exact model versions and the environment
| Item | Historical V2 Preview | Final V2 |
|---|---|---|
| Repository revision | 6cbfa34ce45ce28d31bf841652eeb30cf4465c64 |
aa846d169f182f555f9c65d6ce96ed2b4f585230 |
| Checkpoint filename | Freedream-1B-Instruct-V2-preview.pt |
Freedream-1B-Instruct-V2.pt |
| File size (bytes) | 3,942,273,967 | 1,954,714,498 |
| Base training tokens, as described in the model documentation | 24.1B | 50B |
| Vocabulary size used by the loaded model | 32,001 | 32,001 |
Pinned trees: original Preview and final V2. I used the original Preview, not the experimental optimizer variant.
Recorded SHA-256 values (both weight digests and sizes matched the recorded Hub file metadata):
Preview checkpoint:
cf3ad26a3f2c6a51ed2b6eb0a661ba5ff383eadfb93d13fcd618872b3685add5
Final checkpoint:
9fd31220c7bc9dbccd6cc65b2562b3a9982f93c8e9d293883520d2f2c5489498
Common tokenizer_v2.json:
4ad58e6c2bf1f1ec5bfd0f27098f9c76d0553b983fa6f16fa0d92d24ea234c16
Colab NVIDIA L4, PyTorch 2.14.1+cu130, BF16, tokenizers==0.23.3. The common tokenizer is byte-identical to my earlier Preview test. Both checkpoints use the final chat script model classes, cached forward, and raw Tokenizers with ByteLevel decoding.
Restricted loading (weights_only=True, CPU mapping, mmap=True, strip _orig_mod.) was strict, with finite CUDA logits. Both checkpoints have 340 BF16 state entries, 977,302,784 unique parameters, a (32001, 1792) embedding and tied input/output storage. Preview also has optimizer/scheduler entries; file size is not a quantization comparison. This is not a full interactive CLI test. I would not use unrestricted pickle for unfamiliar weights.
What was held constant
The 78 trials per checkpoint comprise 48 arithmetic, 14 practical and 16 policy-bundle trials. Matched rendered prompts, IDs, seeds, settings and caps agree. Fresh context each time, no tools. The main comparison uses true greedy decoding.
The rendered prompt uses the released system text and role markers (with a final newline after the assistant marker). Here is an example:
<|system|>
Your name is Freedream. You are a helpful AI assistant created from scratch.
<|end|>
<|user|>
7 + 5 = ?
<|end|>
<|assistant|>
The IDs matched build_prompt_ids with empty history. The arithmetic cap was 400 new tokens, with 1,024 for relevant legacy practical prompts. Role markers other than EOS were masked, and EOS was allowed after the configured minimum. UNK was counted from generated IDs even when the normal decode hid it.
| Setting | Common greedy | Final default bundle | Preview default bundle |
|---|---|---|---|
| Temperature | 0 | 0.1 | 0.5 |
| Top-k | 0 (disabled) | 0 (disabled) | 50 |
| Top-p | 1 | 1 | 0.90 |
| Repetition penalty | 1 | 1 | 1.15 |
| No-repeat n-gram | Disabled | Disabled | 3 |
| Minimum new tokens before EOS allowed | 1 | 1 | 5 |
Bundles come from the final script and Preview script at the final revision. The Preview repetition penalty applies from the first step. Positive temperature 0.1 uses multinomial sampling, not greedy. These are bundles, not independent sampler ablations.
Pretraining length, data mixture and SFT changed together. The paired checkpoint comparison cannot isolate their individual contributions.
2. Arithmetic, code modelling, and generation
Arithmetic: a change in both answers and response format
The arithmetic panel was intentionally small. It has six additions, six subtractions, six multiplications and six exact divisions, including a subtraction whose answer is negative. I supplied each problem twice, for example 7+5= and 7 + 5 = ?. The latter is the surface form used by the input normalizer in the final chat script. All 48 trials per checkpoint in this part used the same greedy policy and a cap of 400 generated tokens.
Final V2 reached EOS on 48/48 arithmetic trials, versus 37/48 with Preview. Both original strict-format and answer scorers returned zero in all four groups; the final model often produced reasoning-like text and a final equation that the extractor did not recognize.
I kept the original scores and separately regraded the saved responses. Credit requires EOS and a final numeric equation matching both operands, their order, and the operator, or a correct standalone number as the entire response. No scanning for intermediate numbers, evaluation of generated expressions, or credit for capped responses.
| Checkpoint / input | Original strict score | Original answer score | Correct on final-equation review | Incorrect numeric answer satisfying the extraction rule | No qualified numeric answer (including cap) |
|---|---|---|---|---|---|
| Preview / compact | 0 | 0 | 0 | 1 | 23 |
| Preview / normalized | 0 | 0 | 0 | 0 | 24 |
| Final / compact | 0 | 0 | 4 | 18 | 2 |
| Final / normalized | 0 | 0 | 5 | 19 | 0 |
The following are actual final lines from the saved final V2 responses, not examples generated again for this post.
| Original problem | Final line with compact input | Final line with normalized input |
|---|---|---|
1+1= |
1+1=2 |
1 + 1 = 2 |
7+5= |
7+5 = 12 |
7 + 5 = 12 |
9+8= |
9+8 = 15 |
9 + 8 = 17 |
58+37= |
58+37 = 77 |
58 + 37 = 95 |
8-3= |
8-3=7 |
8 - 3 = 5 |
2*3= |
2*3=6 |
2 * 3 = 9 |
7*8= |
7*8 = 56 |
7 * 8 = 80 |
For final V2: two problems correct in both forms, two only compact, three only normalized, seventeen neither. The normalizer helps some inputs and hurts others; it changes more than whitespace.
| Operation | Preview compact | Preview normalized | Final compact | Final normalized |
|---|---|---|---|---|
| Addition | 0/6 | 0/6 | 2/6 | 4/6 |
| Subtraction | 0/6 | 0/6 | 0/6 | 1/6 |
| Multiplication | 0/6 | 0/6 | 2/6 | 0/6 |
| Division | 0/6 | 0/6 | 0/6 | 0/6 |
There are only six cases per operation. The result supports the direction of your mixed-digit arithmetic finding (1% versus 24%), not its exact magnitude. I would keep exact output-format compliance, the correctness of the final number, the consistency of intermediate calculation and termination separate. In this run eight compact and three normalized Preview responses reached the cap; two final compact division responses ended in expressions rather than numeric right-hand sides and were not credited. The final output can be much easier to extract without necessarily being correct.
Retaining the prompt, expected answer, raw continuation IDs/text, extracted answer and stop reason allows regrading both checkpoints without rerunning inference. Strict-format and final-answer scores answer different questions.
Code and prose likelihood
| Panel | Number of sequences | Scored tokens | Preview PPL | Final PPL |
|---|---|---|---|---|
| Python snippets | 8 | 138 | 14.0820 | 4.9308 |
| Prose snippets | 8 | 84 | 22.4854 | 22.1638 |
| Short snippet | Scored targets | Preview NLL/token | Final NLL/token |
|---|---|---|---|
def add(a, b): ... return a + b |
15 | 2.067 | 1.065 |
def square(x): ... return x * x |
13 | 3.332 | 1.545 |
for i in range(5): ... print(i) |
15 | 2.092 | 1.164 |
def first(xs): ... return xs[0] |
17 | 2.919 | 1.746 |
data = {"ok": True, "count": 2} |
17 | 2.852 | 1.979 |
def is_even(n): ... return n % 2 == 0 |
19 | 2.696 | 1.348 |
def total(values): ... return sum(values) |
16 | 2.565 | 1.693 |
def clamp(x, lo, hi): ... return max(lo, min(x, hi)) |
26 | 2.651 | 1.947 |
Each short snippet was encoded as plain text using the common tokenizer, not as a chat question. The first token supplies context rather than a prediction target; PPL is exp(sum NLL / target count). All eight code snippets improved in mean NLL, while the prose examples were mixed. The ellipses in the labels represent actual newlines and indentation. Training-data overlap is unknown.
For someone who already has the model and raw tokenizer loaded, this illustrates the shifted-target calculation. It is not a complete model-loading script:
import math
import torch
import torch.nn.functional as F
@torch.inference_mode()
def short_panel_ppl(model, tokenizer, texts):
model.eval()
device = next(model.parameters()).device
nll_sum = 0.0
target_count = 0
for text in texts:
ids = tokenizer.encode(text, add_special_tokens=False).ids
if len(ids) < 2:
raise ValueError("Need at least two tokens per snippet")
if 0 in ids:
raise ValueError("Unexpected UNK in the likelihood panel")
x = torch.tensor([ids], dtype=torch.long, device=device)
logits = model(x)[0, :-1].float()
losses = F.cross_entropy(logits, x[0, 1:], reduction="none")
if not torch.isfinite(losses).all().item():
raise ValueError("Non-finite loss")
nll_sum += float(losses.sum())
target_count += losses.numel()
if not target_count:
raise ValueError("Empty panel")
return math.exp(nll_sum / target_count)
Perplexity documentation: match tokenization, context and scored targets; pool losses rather than average per-snippet PPL. Your HumanEval-solution PPL and this synthetic diagnostic have a consistent direction but different values and protocols. Neither measures executable-code correctness.
Practical output and generation settings
Neither checkpoint satisfied the requested JSON object on four common-greedy prompts. The final checkpoint naturally terminated on one, with the final object:
{"ok": "true"}
This parses, but the generated value is the string "true", not the requested Boolean true. The other three final JSON cases capped; all four Preview cases capped with repeated fence-like text. None of three Python function tasks met the limited requested contract checks. No generated code was executed. Syntax, required callable, functional tests in isolation, and exact text are different checks.
| Lane | Preview reached EOS | Final reached EOS |
|---|---|---|
| Main arithmetic (48) | 37 | 48 |
| Main practical (14) | 8 | 9 |
| Final default settings (8) | 5 | 6 |
| Preview default settings (8) | 6 | 7 |
| Total (78) | 56 | 70 |
Eight prompts per bundle and one seed per condition: no individual sampler attribution. I stored generated IDs, special-inclusive and ordinary decode, cleaned and loop-truncated display. Final generated two UNKs in Markdown copy; Preview generated none. EOS and attractive output are not correctness.
3. The released tokenizer and the useful decoding workaround
The regression cases that are now working
CPU test with released tokenizer, Preview and final cleaners, and tokenizer_fix.py, on Tokenizers 0.23.3.
| Panel | Raw decoder | Preview cleaner | Final cleaner | Final display path |
|---|---|---|---|---|
| Your 17 regression examples | 1/17 | 9/17 | 17/17 | 17/17 |
| Older diagnostic panel | 22/216 | 194/216 | 210/216 | 209/216 |
| Intentional-space diagnostic | 5/28 | 15/28 | 11/28 | 10/28 |
| Balanced punctuation-pair strings | 0/34 | 17/34 | 17/34 | 17/34 |
Final chat and standalone cleaners agreed on all 296 rows (216 historical, one chat, 17 author regressions, 28 intentional-space, 34 paired strings). These are selected diagnostics, not corpus frequencies. Remaining historical UNKs are CR and NUL, not {. This follows the Preview discussion.
Why the extra space is a different problem from a missing character
BPE contains 32,000 entries, total vocabulary 32,001. The brace is added at ID 32000; 16 other ordinary punctuation entries already exist in BPE but are registered as added tokens. Five actual special tokens are separate.
Added-token matching isolates text segments before ordinary pre-tokenization. With add_prefix_space=True, the following segment may receive the same encoding as one with an actual space. See ByteLevel and AddedToken. Issue #1174 reports a similar symptom; it is closed, but I have not established a resolution applicable here.
Input A: left@right
Input B: left@ right
Released tokenizer:
A = [2388, 36, 1310]
B = [2388, 36, 1310]
All 17 ordinary-punctuation pairs collide and have identical raw and cleaned output. The input distinction is already lost before the model sees the IDs. A decoder cannot uniquely recover it; the original text or offsets are separate information. This does not contradict the cleaner working on its intended examples.
Where preserving spaces changes the meaning of the text
| Input | Raw decoded text | Final cleaner output |
|---|---|---|
# Heading |
# Heading |
#Heading |
a@ b |
a@ b |
a@b |
{"text":"a@ b"} |
{ "text":"a@ b"} |
{"text":"a@b"} |
{"text":"a@b"} |
{ "text":"a@ b"} |
{"text":"a@b"} |
The JSON outputs both parse, but cleanup changes the string value. Markdown heading syntax and indentation also depend on whitespace. Keep raw and cleaned output separately, and check text equality, syntax and typed values independently. The next section gives a CPU-only reproduction of the collisions and a possible encoding change.
4. A tokenizer-only alternative with the same token IDs
Moving the ordinary punctuation into the regular BPE path
I call the in-memory candidate native_prefix: insert { into BPE at the existing ID 32000, remove all 17 ordinary AddedToken registrations, and retain the five special tokens, merges, normalizer, decoder and add_prefix_space=True. The other 16 characters already have BPE entries. The two prefix-off variants are controls, not deployment recommendations.
Results from the actual Tokenizers library
| Condition | Exact /216 | Only one extra leading space /216 | Other difference without UNK /216 | UNK /216 | Changed ID sequences /216 | Internal collisions /17 | Changed previous prompts /78 |
|---|---|---|---|---|---|---|---|
released |
22 | 167 | 25 | 2 | 0 | 17 | 0 |
native_prefix |
2 | 212 | 0 | 2 | 45 | 0 | 3 |
released_no_prefix |
214 | 0 | 0 | 2 | 194 | 0 | 78 |
native_no_prefix |
214 | 0 | 0 | 2 | 194 | 0 | 78 |
Actual Tokenizers 0.23.3 results. native_prefix gives 214/216 exact OR one extra leading space (only 2 exact, 212 leading-only), versus 189/216 released. Its strict exact score falls; the gain is removing internal differences and the tested collisions. Prefix-off changes far more ID sequences.
All four variants preserve all 32,001 token/ID mappings and single-ID decoding in both special-token modes.
released native_prefix
left@right [2388,36,1310] [2388,36,3760]
left@ right [2388,36,1310] [2388,36,1310]
Native punctuation also preserves a@b versus a@ b in raw JSON round trips, allowing the outer prefix space. The existing cleaner erases the difference again. CR/NUL UNKs, leading-space collisions and tested special-role boundary behavior remain with prefix enabled. This is not a fully lossless or byte-complete tokenizer.
A reproducible construction of the alternative
The following snapshot-specific CPU test downloads only the tokenizer. It verifies the original and creates in-memory copies; no checkpoint or cache file is changed.
import copy
import hashlib
import json
from pathlib import Path
from huggingface_hub import hf_hub_download
from tokenizers import Tokenizer
from tokenizers.decoders import ByteLevel
path = hf_hub_download(
"Digilidaahz/Freedream-1B-Instruct-V2", "tokenizer_v2.json",
revision="aa846d169f182f555f9c65d6ce96ed2b4f585230",
)
# 'path' is the pinned tokenizer file downloaded in the previous example.
original_bytes = Path(path).read_bytes()
expected_sha = (
"4ad58e6c2bf1f1ec5bfd0f27098f9c76"
"d0553b983fa6f16fa0d92d24ea234c16"
)
assert hashlib.sha256(original_bytes).hexdigest() == expected_sha
spec = json.loads(original_bytes)
# Check the assumptions of this exact tokenizer snapshot first.
assert spec["normalizer"] is None
assert spec["pre_tokenizer"]["type"] == "ByteLevel"
assert spec["pre_tokenizer"]["add_prefix_space"] is True
assert spec["model"]["type"] == "BPE"
assert spec["model"]["unk_token"] == "<|unk|>"
base_vocab = spec["model"]["vocab"]
assert len(base_vocab) == 32000
assert "{" not in base_vocab
assert 32000 not in base_vocab.values()
assert all("{" not in a and "{" not in b
for a, b in spec["model"]["merges"])
ordinary = [a for a in spec["added_tokens"] if not a["special"]]
chars = '#$%&<>@[]\\^_`{|}~'
assert len(ordinary) == len(chars) == 17
assert {a["content"] for a in ordinary} == set(chars)
for a in ordinary:
text = a["content"]
expected_id = 32000 if text == "{" else base_vocab[text]
assert a["id"] == expected_id
special = [a for a in spec["added_tokens"] if a["special"]]
assert {a["content"]: a["id"] for a in special} == {
"<|unk|>": 0, "<|user|>": 1, "<|assistant|>": 2,
"<|system|>": 3, "<|end|>": 4,
}
# Use a separate in-memory copy, not the repository/cache file.
def make_spec(native_punctuation, prefix_space):
result = copy.deepcopy(spec)
if native_punctuation:
result["model"]["vocab"]["{"] = 32000
result["added_tokens"] = copy.deepcopy(special)
result["pre_tokenizer"]["add_prefix_space"] = prefix_space
assert result["model"]["merges"] == spec["model"]["merges"]
assert all(result["model"]["vocab"][s] == i
for s, i in base_vocab.items())
return result
specs = {
"released": make_spec(False, True),
"native_prefix": make_spec(True, True),
"released_no_prefix": make_spec(False, False),
"native_no_prefix": make_spec(True, False),
}
tokenizers = {}
for name, value in specs.items():
t = Tokenizer.from_str(json.dumps(value, ensure_ascii=False))
t.decoder = ByteLevel()
tokenizers[name] = t
released = tokenizers["released"]
assert released.get_vocab_size() == 32001
for name, t in tokenizers.items():
assert t.get_vocab() == released.get_vocab(), name
for i in range(32001):
assert t.id_to_token(i) == released.id_to_token(i), (name, i)
for skip in (False, True):
assert t.decode([i], skip_special_tokens=skip) == released.decode(
[i], skip_special_tokens=skip
), (name, i, skip)
# Now test differences in actual sequence encodings.
for name, t in tokenizers.items():
n_same = 0
for ch in chars:
a = t.encode("left" + ch + "right", add_special_tokens=False).ids
b = t.encode("left" + ch + " right", add_special_tokens=False).ids
n_same += int(a == b)
print(name, "identical-ID punctuation pairs:", n_same, "/ 17")
Expected collision counts, in the printed order: 17, 0, 0, 0. The code uses the exact released tokenizer snapshot; it does not modify the file or download weights. The checks are specific to this configuration: an added token absent from the base vocabulary could become unrepresentable if removed, and a protocol token’s matching or whitespace options may be essential. I would keep any experimental serialized tokenizer under a separate filename/revision, not overwrite the original.
An embedding-size check cannot establish ID identity; ID identity cannot establish sequence identity.
Of the 78 complete rendered prompts, three changed with native_prefix: JSON path, URL copy and Markdown copy. All 48 arithmetic and 16 policy inputs stayed identical. Neither 45/216 nor 3/78 measures drift across the training corpus. The ID map is an embedding/interface invariant, not proof of unchanged sequences, probabilities or model behavior.
5. Does the existing model make use of the new encoding?
The distinction between representability and learned behavior
Second L4/BF16 experiment: same final checkpoint and hash, strict CUDA load; only input encoder varies, with released decoder/cleaner fixed and no weight changes. The CPU prerequisite replayed all 296 earlier rows and 78 prior prompts without mismatch. This is not an end-to-end new-tokenizer deployment.
A forced-choice diagnostic
For each punctuation pair I asked if there was a space immediately before right. Ordinary controls: leftright vs left right, left-right vs left- right.
34 punctuation and four control questions per encoder (76 total). Fresh context; compare next-token Yes/No logits. Verified that full prompt plus each label (Yes, No, Yes, No) preserves the prompt ID prefix and adds one token, so the comparison is at a valid seam. Also scored leading-space label variants.
| Forced-choice diagnostic | Released encoder | Native punctuation encoder |
|---|---|---|
| Punctuation questions correct | 17/34 | 17/34 |
| Punctuation pairs with both sides correct | 0/17 | 0/17 |
| Ordinary control questions correct | 2/4 | 2/4 |
| Ordinary control pairs with both sides correct | 0/2 | 0/2 |
All 76 restricted choices prefer Yes, including the alternate label spellings. Unrestricted argmax was ID 32 each time, so these are not free-generation Yes/No answers.
Released collision pairs have identical margins; candidate margins sometimes change but no decision changes. Ordinary controls also fail to discriminate, limiting this test. Pair-level scoring exposes constant-label bias. This is not evidence that the model could never recognize the distinction.
Open generation: exact copying and JSON
16 prompts per encoder: 14 exact-copy and two JSON. Twelve copy prompts contrast six punctuation characters with/without a space; four practical prompts revisit path, URL, Markdown and intentional whitespace.
Common greedy, cap 160 for copy pairs and 400 for the four practical cases. Check requested output, not an arbitrary mention of the target in intermediate text.
| Generation diagnostic | Released encoder | Native punctuation encoder |
|---|---|---|
| Copy and JSON trials executed | 16/16 | 16/16 |
| Correct requested output, raw evaluator | 0/16 | 0/16 |
| Correct requested output, visible evaluator | 0/16 | 0/16 |
| End token reached | 1/16 | 0/16 |
| Generation cap reached | 15/16 | 16/16 |
All raw responses begin with < think> ; 31/32 cap, and the one EOS result also fails. Malformed closing tags limit extraction. Eight of nine changed-input pairs change generated IDs; all seven unchanged-input pairs produce identical IDs. Changed is not necessarily better.
The candidate repairs representability but did not improve correctness with fixed weights here. The poor controls and caps limit inference about model ability. The unchanged output cleaner may erase real spaces; adapted weights or a changed output pipeline would be separate experiments.
6. A small KV-cache and runtime check
Checking the cached path against the full forward path
Fixed-ID cached/full comparisons, not separate free-running generations. Tiny float32 CPU model (dim 32, 2 layers, 4 heads, context 64, vocab 97): max absolute logit difference 5.96e-8, closeness check passed.
On the actual L4/BF16 checkpoints I tested prefix/chunk pairs (16,1), (64,3), (256,1), (256,8), comparing the last prefill position and appended positions: 17 positions per checkpoint.
| Check | Preview weights | Final weights |
|---|---|---|
| Same highest-logit token ID, cached versus full | 17/17 | 17/17 |
| Largest observed absolute logit difference (BF16) | 0.15625 | 0.3125 |
Finite but not bitwise equal. Argmax agreement does not imply identical probabilities. Single-token cached decode can attend to all available keys; multi-token chunks need a causal mask offset by prefix length, plus matching RoPE offsets. SDPA API background (runtime was 2.14.1).
A short replay timing check
Fixed 16 continuation IDs, two repeats per mode and prefix; rates exclude separately measured prefill.
| Checkpoint | Prefix length | Cached replay (tokens/s) | Full replay (tokens/s) |
|---|---|---|---|
| Preview | 64 | 48.95 | 48.44 |
| Preview | 256 | 47.13 | 46.89 |
| Final | 64 | 48.40 | 47.53 |
| Final | 256 | 48.88 | 47.48 |
Small differences at these lengths, not evidence of 4,096-context or RTX 5080 throughput. This implementation concatenates K/V. For further timing, use longer fixed prefixes, CUDA synchronization, repeats and peak memory. Full multi-turn CLI/history handling was not tested.
7. Low-cost options for V3 and future tokenizer training
I would keep the current project direction as the default
Continue training: keep the current encoding and role markers as the default. Preserve the tokenizer revision alongside checkpoint and tokenized dataset. A fixed diagnostic panel helps compare 50B and later checkpoints without changing evaluation inputs.
Precise code, paths or data: retain raw IDs, decoded output and original source text where needed, alongside cleaned chat. Add paired spaces, headings, URLs, paths, JSON string values, indentation and outer whitespace to CPU regressions. Check exact equality, syntax and typed values separately.
Explore native punctuation: separate tokenizer/data revision, original as control. Same ID map does not mean the same sequences. A small matched adaptation experiment could evaluate exact text, ordinary controls, likelihood and instruction following separately. Do not assume better round trips improve generation.
If training data are already token-ID streams, mixed encodings may be numerically valid but change the distribution. Record tokenizer identity; re-encode original text, not decoded old IDs, when changing encoding. The old collision cannot be undone from IDs alone. This is conditional, not a claim about your pipeline.
Fresh ByteLevel BPE tokenizer: BpeTrainer accepts initial_alphabet; ByteLevel has 256 byte symbols. Example for new training, not editing existing weights:
from tokenizers import pre_tokenizers, trainers
trainer = trainers.BpeTrainer(
vocab_size=32000,
initial_alphabet=pre_tokenizers.ByteLevel.alphabet(),
# Set the intended special tokens and other training options here.
)
This trainer option alone does not guarantee exact decoding or identify the original training cause. Align limit_alphabet, normalizer, added tokens, merges, pre-tokenizer and decoder with the intended coverage and test before training.
A possible small evaluation ladder
| Check | What it establishes |
|---|---|
| Coverage and paired ID tests | Representability and distinguishability |
| Vocabulary and prompt identity | Mapping and sequence compatibility, separately |
| Cached/full forward | Runtime parity on the tested sequence |
| Paired tasks and ordinary controls | Observed model behavior |
| Raw decode, syntax, types and values | Application-output fidelity |
The CPU checks are cheap; once IDs differ, model tests with working controls can establish whether that difference is useful. The progress on arithmetic and code likelihood, and your successful cleaner regressions, are already useful results. The additional tokenizer experiment is an optional design note for the next stage, not a requirement for continuing training.