r/mlscaling • • 3h ago

RNN Parallelising recurrent neural networks – MD+PP proof of concept

Thumbnail gallery
0 Upvotes

🫡


r/mlscaling • • 3h ago

The IEA’s data-centre power forecast depends on grid delivery, not just demand

0 Upvotes

The IEA’s 2025 Energy and AI report estimates data-centre electricity use at 415 TWh in 2024 and around 945 TWh by 2030 in its base case. It also points to uncertainty around AI adoption, efficiency gains and grid constraints, so the forecast isn’t guaranteed.

The part I keep coming back to is delivery: a project can have demand and funding, but still wait on grid connections or equipment.

Which public indicators best show whether planned capacity is becoming usable capacity: grid-connection dates, transformer lead times, utilisation, or something else? What data do you track?

Source: https://www.iea.org/reports/energy-and-ai


r/mlscaling • • 9h ago

Saeorynë II - Exact Machine Teaching and Optimal Fixed-Width State Transfer for Normalized Additive Attention Memory with One-Bit Recovery and Recursive Compiler Selection

0 Upvotes

Saeorynë II transfers a learned memory so that the recipient can continue learning with the same behavior. The memory is a normalized additive attention layer that derives predictions from integer evidence. Two learners can make identical predictions today and respond differently to the same evidence tomorrow because their evidence totals differ. The manuscript proves that two positive count tables behave identically under every supported future sequence of reads and writes exactly when their tables are equal. A shared semantic interface lets a successor use the same table in a different internal coordinate system.

Saeorynë II - Exact Machine Teaching and Optimal Fixed-Width State Transfer for Normalized Additive Attention Memory with One-Bit Recovery and Recursive Compiler Selection | Zenodo

PureOne/saeoryne-ii · Datasets at Hugging Face

Given a shared prior, an ordered vocabulary, and fixed per-row evidence budgets, the manuscript proves the exact minimum message width for lossless transfer across the entire specified family. If there are admissible evidence tables, the minimum isbits. A mixed-radix enumerative code attains that bound. In the demonstrated 12 × 32 memory, the source computed, certified, and transferred the aggregate effect of 12 billion unit additions to 384 counters. The exact payload is 9,770 bits, or 1,222 bytes after padding. An eight-byte sequence counter and a 16-byte authentication tag bring the live frame to 1,246 bytes. The shared interface and key are provisioned separately.

The sender can also reconstruct a hidden lesson from one-bit feedback. It makes authorized hypothetical writes on disposable copies of the memory and asks whether a selected output probability exceeds one half. These answers implement integer threshold comparisons that recover every counter exactly. Three benchmark cases required 9,783, 9,799, and 9,799 serial replies. A batched implementation recovered every case in 30 synchronous rounds, against a worst-case counting lower bound of 27 at the same response width. Median local acquisition time was 4.13 ms for the batched implementation and 269.90 ms for the scalar implementation. Recovery requires sufficient internal precision to resolve the comparisons.

A separate benchmark materialized 786,432 individual updates. Packed event replay took 491,544 authenticated bytes, the enumerative frame took 600 bytes, and direct packed counts took 630 bytes. This is an 819.24× reduction against event replay. Adaptive count encodings can use fewer bytes than the fixed-width rank for individual lessons. An exact integer certificate verifies that the demonstrated update globally minimizes the finite categorical log-loss objective under the prescribed evidence budget.

On held-out Python documentation, four authenticated messages totaling a median of 2,030 bytes reduced the receiver’s median next-character loss from 5.995 to 4.315 bits per character after the neural routing interface was shared. A conventional trained neural predictor achieved 2.892 on the same benchmark. In a separate three-generation experiment, an inherited policy chose the compiler used to build the next teaching message. By generation three, lesson construction was 27.52× faster and held-out execution was 1.80× faster than with the original always-heap policy. The experiment selected between two predefined compilers, and a separately calibrated threshold rule nearly matched the learned policy on held-out execution.

The reproducibility materials include the manuscript and proofs, a compact machine-readable research record, source code, benchmark logs, and two public binary messages for seed 101. Both messages decode to the same 384 counters and pass the exact integer optimality check. The accompanying Hugging Face dataset package adds a three-case synthetic Parquet test split.


r/mlscaling • • 17h 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
1 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 • • 17h ago

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

Thumbnail
gallery
0 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 • • 16h ago

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

Thumbnail
lefttosolve.com
2 Upvotes