Views
No views yet
transformers library update (to v5.3.0) on 2026-03-11 silently broke the DeepSeek-V3.2 tokenizer's encode/decode pipeline:Metaspace pre-tokenizer was configured to use ▁ (U+2581, SentencePiece convention) for space replacement, but the BPE vocabulary uses Ġ (U+0120, GPT-2 convention). This mismatch caused:"Water boils" encoded to ['Water', 'bo', 'ils'] instead of ['ĠWater', 'Ġboils']tok.decode() lost all spaces. Round-trip encode→decode of "The meaning of life" returned "Themeaningoflife"transformers==4.48.0 (+ tokenizers==0.21.4), which correctly handles the Ġ space prefix. Also added a runtime fix in n.py that patches the ▁→Ġ mismatch if detected.| Parameter | Value |
|---|---|
| Parameters | 698M |
| Hidden dim | 1024 |
| Layers | 24 |
| Heads | 16 |
| Rank | 128 |
| Expansion ratio | 2.0x |
| Vocab | 128,815 (DeepSeek-V3.2 tokenizer) |
| Architecture | Joint AR + SAT (autoregressive + span-aware transformer) |
| Training target | 35B tokens |
| Tokens seen (at restart) | ~10.83B (30.9%) |
transformers<=4.48.0 for correct tokenizer behavior:pip install transformers==4.48.0 tokenizers==0.21.4n.py which auto-patches the ▁/Ġ mismatch.Water boils at one hundred degrees in the 1990s, and a year after that. "It's not just that, but it makes you think." He said: "I don't think I'm going to make a deal for the rest of my life."
transformers.pipeline() model yet. Use the AGILLM training/inference script (nB300.py) with the pinned tokenizer stack above.1from huggingface_hub import hf_hub_download, list_repo_files
2
3repo_id = "MarxistLeninist/AGILLM-3-large-v2"
4
5def step_number(path: str) -> int:
6 return int(path.rsplit("step", 1)[1].split(".", 1)[0])
7
8checkpoint_files = [
9 path for path in list_repo_files(repo_id)
10 if path.startswith("pretrain_delta_step") and path.endswith(".pt")
11]
12latest = max(checkpoint_files, key=step_number)
13ckpt_path = hf_hub_download(repo_id=repo_id, filename=latest)
14print(ckpt_path)pretrain_step*.pt checkpoint is available, prefer it for optimizer-preserving resumes. Delta checkpoints are weight-only and are fine for text generation.1python nB300.py infer \
2 --mode ar \
3 --ckpt ./pretrain_delta_step27775678.pt \
4 --prompt "Water boils at one hundred degrees" \
5 --max_new 120 \
6 --greedy \
7 --plain-output1python nB300.py infer \
2 --mode ar \
3 --ckpt ./pretrain_delta_step27775678.pt \
4 --prompt "The history of machine learning began with" \
5 --max_new 180 \
6 --temperature 0.7 \
7 --top_p 0.9 \
8 --repetition_penalty 1.3 \
9 --frequency_penalty 0.3 \
10 --plain-output1python nB300.py infer \
2 --mode sat \
3 --ckpt ./pretrain_delta_step27775678.pt \
4 --prompt "In a quiet orbital station above Jupiter," \
5 --max_new 180 \
6 --temperature 0.5 \
7 --top_k 30 \
8 --top_p 0.9 \
9 --presence_penalty 0.6 \
10 --frequency_penalty 1.0 \
11 --plain-output| Use case | Prompt |
|---|---|
| Short factual completion | The capital of France is |
| Scientific prose | Photosynthesis is the process by which |
| Narrative continuation | The old radio began speaking just after midnight, and |
| Instruction-style completion | Write a concise explanation of gradient descent: |
| Dialogue continuation | User: What causes rain?\nAssistant: |