r/mlscaling • • 5d ago

OA, R, Emp, Theory Perplexity and Intelligence

Thumbnail
openai.com
37 Upvotes

r/mlscaling • • 6h ago

I built a Rust BPE tokenizer that hits 4.5 GB/s cold (9.0 GB/s on Llama-4-Scout) — 2.5–10x faster than gigatoken, 13–24x faster startup, drop-in for AutoTokenizer

Post image
2 Upvotes

Every time tokenization speed comes up, people point to tiktoken or gigatoken. So I benchmarked tuetoken 0.1.10 against gigatoken 0.11.0, fastokens 0.3.7, tiktoken 0.12.0, and Hugging Face’s tokenizers and transformers. I checked that the token IDs matched exactly on the inputs tested, then ran the cold 1 GB tests in fresh OS processes.

GitHub: https://github.com/tuetoken-org/tuetoken
Install with pip install tuetoken. MIT licensed.

Results on an Apple M4 Max (14 cores):

• Cold 1 GB with o200k_base: tuetoken hit 4.50 GB/s. That’s 2.5× gigatoken (1.79 GB/s), 7.7× fastokens (584 MB/s), 71× tiktoken (63 MB/s), and 474× Hugging Face (9.5 MB/s).

• Model tokenizers on 25 MB of text: Llama 4 Scout hit 9.00 GB/s (3.8× gigatoken), Qwen3-8B 6.77 GB/s (4.1×), Gemma 3 4B 5.07 GB/s (10.2×), Mistral 7B 4.93 GB/s (9.2×), and DeepSeek V3 3.77 GB/s (2.1×). Seed-Coder-8B (6.83 GB/s) and Falcon-H1-7B (2.76 GB/s) also worked out of the box. Neither was supported in gigatoken 0.11.0.

• Startup: Loading tokenizer.json took 7–20 ms, compared with 139–282 ms for gigatoken (13–24× faster) and 84–348 ms for Hugging Face (12–29× faster).

• Padding and truncation: Padding 10,000 docs to 512 tokens hit 6.81 GB/s (10.4× gigatoken). Truncating 50 MB of input to a maximum of 512 tokens took 2.4–2.6 ms for either truncation direction (5.9× faster than gigatoken and 4,381× faster than Hugging Face).

• Whisper: Batch decode_with_timestamps for whisper-large-v3 took 0.098 ms vs. 31.7 ms with transformers (323× faster).

I also tested on Ubuntu with AMD Zen 4, 4 vCPUs, and AVX-512. Tuetoken hit 1.56 GB/s cold and 1.68 GB/s warm, compared with 0.44 and 1.16 GB/s for gigatoken. That’s 3.6× the cold throughput. Startup was 13.1× faster, and tokenizing 100 KB of random hex was 4.7× faster.

To try it, swap your Hugging Face AutoTokenizer import for:

from tuetoken import AutoTokenizer  
tok = AutoTokenizer.from\_pretrained("Qwen/Qwen3-8B")

If you try it on your hardware or with a different model, I’d love to hear what numbers you get.


r/mlscaling • • 13h ago

R Anpaure Pretraining Index (estimating the perplexity of Gemini, Claude, etc)

Thumbnail anpaure.github.io
7 Upvotes

Fable 5.2 and Gemini 4 Carbon have an estimated log loss of 0.749 and 0.756 respectively, close to GPT-6.2 Astra.

Overall the Gemini model family looks amazing, with the (quite old) 3.1 Pro having one of the lowest perplexities ever, and even Gemini 2.5 Pro hanging in doggedly.

Please take with a grain of salt. To be honest, I haven't fully grokked how this approach works, and it may well not. And it's written in Claudese to be extra confusing.

Trace hygiene & telemetry: Both the standalone runner and this dashboard require an exact 8-distinct-letter permutation. Models that wrote truncated prose preambles on >10 items were retried identically with a strict no-prose rule at r_tok = 0 (verified not to inflate scores: Fable 5.2 moved 0.7367 → 0.7356 MRR). OpenRouter omits reasoning-token fields on endpoints that do not report them (defaulting to 0); exact positive-r_tok item counts are shown in the ledger.

Thanks, that clears up everything.


r/mlscaling • • 4h ago

Left to Solve: 59,399 open math problems, attacked by AI agents [crowdsourcing platform]

Thumbnail
lefttosolve.com
1 Upvotes

r/mlscaling • • 6h ago

[Fix] Qwen3.8-27B GGUF crashes on Apple M5 Max — LM Studio settings that work

Thumbnail
gallery
1 Upvotes

Hardware

  • Apple MacBook Pro 16"
  • Chip: Apple M5 Max
  • Memory: 48 GB Unified Memory
  • Storage: 2 TB SSD
  • OS: macOS (Apple Silicon)

Software

  • LM Studio 0.4.29
  • Model: Qwen3.8-27B (GGUF Q4_K_M)

Problem
Qwen3.8-27B (GGUF Q4_K_M) answers the first message, then crashes on the second with an error:

Error messages observed:

  • Engine protocol predict stream returned an error: {"code":500,"message":"Compute error.","type":"server_error"}
  • Engine protocol predict stream returned an error: {"code":500,"message":"got exception: Unexpected empty grammar stack after accepting piece: @ (31)","type":"server_error"}
  • Prediction request aborted but the prediction loop handler of the plugin lmstudio/default-prediction-loop-handler did not abort in time.
  • Cannot send on a terminated channel.

Fix — LM Studio settings that worked
On Apple M5 Max + 48 GB RAM, the following combination resolves the crash:

  1. LM Studio settings: Hardware → GPUs: 1 GPU detected with Metal — Apple M5 Max (VRAM Capacity: 37.44 GB • Metal • deviceId: 0). Toggle OFF (do not use GPU for inference).
  2. Model format: use GGUF Q4_K_M quantized versions only (e.g., Qwen3.8-27B Q4_K_M or Gemma 4 31B QAT Q4_K_M). Do not use MLX or unquantized models.
  3. Max Concurrent Predictions: set to 1 (default is 4).
  4. Unified KV Cache: OFF.
  5. Offload KV Cache to GPU Memory: OFF.
  6. Flash Attention: OFF.

Result
After applying all these settings, multi-turn chat works without errors. Gemma 4 31B QAT (GGUF Q4_K_M) also runs stably on the same hardware.

This should help other users with M-series Macs and 48 GB Unified Memory avoid the same crash.


r/mlscaling • • 20h ago

R, A, Hardware "AWS Challenger: Trainium3 Inference and Microarchitecture Deep Dive", Semi-Analysis

Thumbnail
newsletter.semianalysis.com
6 Upvotes

r/mlscaling • • 11h ago

I tested a small "Anti-Draft" idea for MTP (~6–8% live gain on Strata, and why llama.cpp's p_min loses speed today) — raw data & C++17 header

Thumbnail reddit.com
1 Upvotes

r/mlscaling • • 13h ago

How are teams gating continual model updates without overfitting private evals? [R]

0 Upvotes

Most ML discussion right now is focused on post-training loops, continual RL, and faster model iteration. I have been researching the step right after that: what happens when a shared model keeps getting updated over time, and downstream sites (specific hospitals, tenants, or business units) have to decide whether to accept each new checkpoint without breaking what already works.

We ran a controlled multi-site continual-update study (~100 multi-release trajectories across 4 distinct sites receiving sequential updates to a shared backbone) and ran into four failure modes that surprised us:

  1. Naive local refitting still regresses ~15% of releases. Even when a site refits its local head on its own labelled archive with cross-validated regularization, 14.6% of updates still caused a >0.02 AUC drop on unseen local cases.
  2. Operating thresholds break silently. Raw upstream updates caused 0.14 excess operating-point error relative to an oracle threshold, even when overall ranking looked acceptable.
  3. Upstream regression checks fail as downstream vetoes. Even an upstream early-step canary that detected vendor-head regressions with 0.89–0.90 AUC actually hurt net accuracy when used as a site-level veto, because the upstream check monitors the vendor head rather than the locally adapted system running at the site.
  4. Reusing a private validation panel inflates gains by 40–62%. Repeatedly gating sequential releases against the same ~440-label local holdout set overstated real unseen gains by 40% (+0.0118 reported on the panel vs. +0.0071 actual on unseen cases), and up to 62% on smaller split panels.

We also saw a subtle Day-1 onboarding trap (~6% failure rate): comparing a vendor model out-of-sample against a locally cross-validated fit on a small site archive (160–330 cases) systematically biases toward the vendor model, occasionally locking in a worse-than-random start (0.47 vs. 0.66 AUC).

For people running continually updated models in production (medical, security/SOC, fraud, multi-tenant enterprise, robotics):

  • How are you actually deciding when to promote vs. reject a new checkpoint per site or customer?
  • Do teams just freeze working models and avoid frequent updates, pay for fresh human labels every cycle, or accept some eval overfitting?
  • Are there open tools, papers, or real production patterns tackling this Day-2 release-gating layer well today, or is it mostly custom glue and shadow A/B tests?

Genuinely trying to understand where the field stands on this problem and whether it is a real bottleneck in practice or still mostly a research concern.


r/mlscaling • • 20h ago

D, OP, OA, RL, Safe "GPT-6.2 Astra’s Brain Gets Smart But Its Head Gets Dumb", Zvi Mowshowitz

Thumbnail
thezvi.wordpress.com
3 Upvotes

r/mlscaling • • 1d ago

N, Hardware, T, RL "US chip curbs, distillation crackdown threaten Chinese AI model development, sources say" (Z.ai's GLM-5.5 delayed to as late as 2027Q2; Moonshot doubling major model release cadence up to 12 months, K4 now 2027Q2+?)

Thumbnail reuters.com
8 Upvotes

r/mlscaling • • 1d ago

D OpenAI's pretraining loss is falling ~7x faster since early 2026. Is this real progress or an artifact?

Post image
49 Upvotes

OpenAI published base-model log-perplexity for its models since GPT-3.5. METR's analysis says the rate of decline jumped about 7x in early 2026, which goes against what scaling laws would predict. But it's one dataset (OpenAI's internal codebase), and there could be overfitting, leakage, or release-timing effects. Is this acceleration real?

What evidence would convince you either way?


r/mlscaling • • 1d ago

N, Econ, Hardware "The Mad Dash For Memory Chips—and the Pain It’s Causing Holiday Shoppers: A global shortage has companies scrambling—and it’s sent prices on electronics soaring", WSJ

Thumbnail wsj.com
3 Upvotes

r/mlscaling • • 1d ago

Am I solving the wrong problem by forcing heterogeneous enterprise data into a fixed taxonomy?

Thumbnail reddit.com
0 Upvotes

r/mlscaling • • 1d ago

Layer looping on Qwen2.5-0.5B: a 10-point drop mostly went away

Thumbnail
reddit.com
1 Upvotes

r/mlscaling • • 1d ago

RL Mixture of Steering Vectors

0 Upvotes

okey im lurking around on hugging face trying to see what papers of the day ...
so there was a paper about post training reinforcement learning diffusion transformer as activation steering .

https://arxiv.org/pdf/2611.26627

basically they did this for image generation model (diffusion transformer) thats how i understood from reading the paper . so they did some post train to improve quality of images and also text output better. when i saw that interesting results about their paper first thing comes into my mind is to use this as a post training for normal llm.
so basically idea in short words we want to train vectors which are inserted between layers (similar like you train lora) but with one difference it can insert vector at certain places inside model and you have ability to choose these vectors via trained router similar how mixture of experts works . so yeah i did this thing :)
so after training router + vectors i put them into GGUF file as Model (gemma-4 12b) which you can run normally on llama.cpp basically its integrated vectors similar like mixture of expert models it should work fine without problems :) will attach here reference paper from where i got idea and my paper when finished model . idk if i can add links here so tell me in comments guys :) so i can add link for hugging face + github (there you can find full repo & models)

speed and tokens efficiency


r/mlscaling • • 2d ago

Lossless compression of LLM weights below their per-tensor entropy: Qwen3.8-27B BF16 at 10.43 bits/weight, bit-identical (open codec + paper)

Thumbnail
reddit.com
5 Upvotes

r/mlscaling • • 3d ago

D, Code, T How the memory for 1M tokens shrank from 130TB to 890MB

Post image
5 Upvotes

I wrote a blog post that follows the GPU memory one 1M-token conversation needs, from Llama 1 65B to DeepSeek-V4.1-Flash.

It dives into the different techniques that have enabled this: FlashAttention, Grouped Query Attention, Multi-head Latent Attention, KV Cache quantization, caches that merge several tokens into a single entry, and finally caches that are shared throughout different layers.

https://three.dev/blog/how-the-memory-for-a-million-tokens-shrank


r/mlscaling • • 3d ago

I built an interactive 2D triangular-lattice spatial reasoning benchmark (IKIN ZipGate v2.2) — 0/7 frontier LLMs passed, and 4 converged on the exact same hallucinated detour

Thumbnail
gallery
0 Upvotes

TL;DR: I built IKIN ZipGate v2.2, a deterministic, O(1)-per-step self-avoiding lattice walk engine on a 2D equilateral triangular grid, along with an interactive Hugging Face Space visualizer & auto-grader and a Hugging Face dataset. Under Condition B (where the entire mathematical rulebook is provided verbatim in the prompt), 0 out of 7 frontier model families passed the multi-step rollout torture tests—splitting into distinct, reproducible spatial and JSON-schema failure modes.
Live Interactive Visualizer & Auto-Grader: https://huggingface.co/spaces/Jadeikin-1/ikin-zipgate-visualizer
Benchmark Dataset: https://huggingface.co/datasets/Jadeikin-1/ikin-zipgate-v2.2
How the Benchmark Works Unlike benchmarks relying on fuzzy world knowledge or brute-force global search, ZipGate v2.2 evaluates purely local 1-ring and 2-ring neighborhood state transitions on an axial triangular lattice (q, r) with 60^\circ discrete headings (d \in \{0..5\}):
Chiral Polarity Reflection (\sigma \in \{+1, -1\}): Turn motifs (R = -60^\circ, L = +60^\circ, S = 0^\circ) mirror dynamically whenever \sigma = -1.
Non-Bonded Contact Gain (dc): Counts adjacent trail nodes visited at \vert{}t - i\vert{} > 1 (excluding static obstacles).
Tight-Quarters Escape Vent (\vert{}U_t\vert{} \le 2): Overrides the motif turn when open exits narrow to \le 2, maximizing onward exits E(u) and tie-breaking by lowest dc.
Open-Space Diversion (\vert{}U_t\vert{} > 2): When the preferred motif cell is blocked, diverts to maximize onward exits E(u) and tie-breaks by highest dc (pulling the walk inward to pack tightly).
Coupled Flip Arbitration: Polarity updates follow a strict priority stack: Spiral-Unwind Guard (s_t \ge 3 consecutive contact steps forces a flip and resets the streak) -> Escape Flip Hold (E(u) \ge 3) -> 1-Step Cooldown -> Standard Zipper Flip.
Empirical Results Across 7 Frontier Models (Condition B — Full Spec in Prompt) Every model was given the complete rulebook, initial state vector, obstacle coordinates, and strict JSON schema in a single self-contained prompt:
IKIN ZipGate v2.2 Engine (Baseline) — PASS (7/7 steps) | Strict JSON: PASS Ground-truth deterministic execution, contact counting, and spiral-unwind flip.
Claude — FAIL (0/7 steps) | Strict JSON: PASS Perimeter-Evasion Attractor: Zero collisions, but inverted the open-space dc tie-breaker—skirting outside the cluster (dc=0, sigma=1).
Llama — FAIL (0/7 steps) | Strict JSON: PASS Perimeter-Evasion Attractor: Independently converged on the exact same 7-step dc=0 outer detour ([-2,3] -> ... -> [-4,1]).
Grok — FAIL (0/7 steps) | Strict JSON: PASS Perimeter-Evasion Attractor: Independently converged on the exact same 7-step dc=0 outer detour.
GPT — SCHEMA PARSE FAIL | Strict JSON: FAIL Markdown-Escaped JSON Crash: Backslash-escaped keys/brackets (_, \[, \]) invalid in strict JSON, paired with the identical outer detour.
DeepSeek — FAIL (0/7 steps) | Strict JSON: PASS Triple Collision Pileup: Valid JSON, but stepped straight onto prior history (v3, v4) and a blocked obstacle (-1, 3).
Gemini — SCHEMA PARSE FAIL | Strict JSON: FAIL Truncated Coordinate Arrays: Computed exact state transitions (q, h, dc, sigma), but dropped r-coordinates and left unclosed [ brackets.
Qwen — FAIL (0/5 steps) | Strict JSON: PASS State-Space Freeze: Valid JSON, but locked sigma=1, dc=0 across every step and drifted into an empty loop.
Key Takeaways
The "Perimeter-Evasion" Consensus: Four separate architectures (Claude, Llama, Grok, GPT) avoided all self-intersections and [X] obstacles, yet all four hallucinated the exact same 7-step outer detour. Under open-space diversion (\vert{}U_t\vert{} > 2), LLMs have a strong training prior toward sparse obstacle avoidance (dc = 0) that overrides explicit prompt instructions to break ties by higher contact crowding (dc).
Spatial Load Breaks Structured Output: Multi-step coordinate tracking induces syntax degradation even in models that normally handle JSON reliably—producing dropped array elements (coord=[0]) in Gemini and Markdown-escaped brackets (\[) in GPT.
If you want to test local weights (o3, R1, QwQ, Mistral, custom fine-tunes, etc.), the HF Space has a one-tap Copy Full Prompt button and an auto-grader that plots your model's predicted trajectory in red directly over the ground-truth lattice.


r/mlscaling • • 3d ago

R Envaudit: 1 in 14 "solved" SWE-smith trajectories are wrong fixes; frontier models get full credit for unfinished patches on DeepSWE

Thumbnail
arxiv.org
14 Upvotes

r/mlscaling • • 3d ago

R, A, Econ, Hardware "Economics of Claude-3-Opus Inference", Antra Tessera 2025-07-05 (why it's so expensive for Anthropic to provide a high-quality hosting of old LLMs)

Thumbnail x.com
11 Upvotes

r/mlscaling • • 4d ago

Data "Early result from our Alignment team..." (how GLM 5.3 learns to be a hacker)

10 Upvotes

This is from Surge AI's CEO. I assume it will be a paper at some point.

we trained a model on flawed coding RL environments to see if buggy envs would teach it to become a better cheater.

unfortunately, they did.

...

our Alignment Research team took 682 flawed coding RL environments (ones that didn't pass our quality standards)

we post-trained GLM-5.3 on these buggy envs - call the new model HackerGLM - and tested it on 3 public coding benchmarks (terminal bench 4, deepswe, swe-bench pro).

the results: HackerGLM became a better and more prolific cheater.

- it showed concerning behaviors on 49% of the test tasks - eg, pretending an invented API key was real, or hacking the test suite by shutting down a background service after 2 minutes
- when it cheated, it successfully cheated (i.e., passed the benchmark) 78% of the time

And so on.

Naive question: what examples do we have of frontier models reward hacking that clearly do not involve broken/bad tasks?

It seems like accepted wisdom that large-scale RLVR training itself causes reward-seeking. Is this true? Is there a reason it couldn't be a "bad apples" scenario, where EM is created largely or maybe even mostly by broken tasks present in evals?

Seemingly every test and benchmark (going back to MMLU or before) has broken tasks (sometimes a remarkably large number of them - ie 1/3 of FrontierMath Tier 4 had to be thrown away.) Every model has "you must cheat/guess the grader's password or else you fail" beaten into its weights at some point.

"lol, clanker got an impossible task ¯_(ツ)_/¯" seems to hover over all these incidents like Zeus throwing thunderbolts. It's there in Huggingface, in the various OpenAI breakouts pre- and post- (the original Artifactory breakout started because of a model wrongly locked out of its Google Drive links), in Anthropic's experiments, in this.

If all of these broken tasks were fixed tomorrow by magic (and models retrained), how much would things improve?

Even Apollo Research's Measuring Reward-Seeking via Contrastive Belief Updates ("These results indicate that RL can increase reward-seeking over the course of training...") involve various checkpoints of OpenAI's o3...which presumably trained on broken tasks. (No reason to think it didn't: I remember lots of complaints about that model cheating/lying.)

"Broken tasks = EM" would explain why these reward-on-the-episode hackers seem like a recent phenomenon. In 2021, leading models scored 43.9% on the MMLU - they were not close to the hardest quartile of the test, where the 10-12% wrongly labeled tasks congregated.

(I don't know why he says "unfortunately" when it's a known issue with RL. Knowing how to trigger a bug is often a good first step toward fixing it, as anyone who's debugged something knows.)


r/mlscaling • • 3d ago

New Activation Function?

2 Upvotes

Found this activation function...

zenodo.org/records/24143280

As a SiLU lover, I've always been skeptical of "homemade" activation functions that work well at a smaller parameter counts but have no proof of scaling. I tested this one on 27M parameters to right short stories and it worked well for the amount of time I spent training it which was only a few hours. I never tested SiLU on this same set because I was only trying to see if it worked. I don't have the hardware to scale it so if any of you end up trying it let me know how it goes.


r/mlscaling • • 4d ago

OP, Forecast, RL "I don’t expect superintelligence in 2027: people are updating too quickly", Karthik Tadepalli 2026-11-21

Thumbnail
blog.karthiktadepalli.com
9 Upvotes

r/mlscaling • • 4d ago

Hist, A, OA, Safe "What Would You Do If Your Employer Could Destroy the World?" (interviews with ex-OA/A on how the scaling arms race developed)

Thumbnail
nymag.com
5 Upvotes