cd /news/large-language-models/what-happens-before-spark-writes-ber… · home › topics › large-language-models › article
[ARTICLE · art-178436] src=dev.to ↗ pub= topic=large-language-models verified=true sentiment=· neutral

What happens before Spark writes “Berlin”?

HartsyInference compared its CPU implementation of the Spark-X2.6-4B model against an F32 PyTorch reference script built from the checkpoint's modeling code, finding the two agreed on the top eight next-token logits to four decimal places and on all twelve greedy token choices for a Berlin prompt. Reducing the sliding window to four shifted scores by up to 8.0 while both implementations still matched on the top eight logits and greedy outputs. The November 1 test used the real five-shard checkpoint with BF16 weights and F32 activations, but covers only one prompt on CPU, leaving GPU, quantized weights and prompts beyond 8,192 tokens untested.

recommendation

Validate custom inference implementations against a reference script by comparing top-k logits and greedy token sequences, including after changing the sliding window size.

more in playbook: Inference and self-hosting
by read1 min views2 publishedNov 30, 2026

The prompt stops just before the name of Germany’s capital. HartsyInference compared its CPU implementation of Spark-X2.6-4B with an F32 PyTorch script written from the checkpoint’s modeling code. Both started with Berlin and continued through Italy and Rome, picking the same token at each of the next 12 steps.

The team also inspected the scores behind that first choice. The top eight next-token logits agreed to four decimal places. Then they reduced the sliding window to four. Scores shifted by up to 8.0, while the two implementations still agreed on the top eight and all twelve greedy choices.

The November 1 test used the real five-shard checkpoint, BF16 weights and F32 activations. The comparison covers one prompt on CPU. Both implementations draw on the same model definition, so they can share a mistaken interpretation. GPU, quantized weights and prompts longer than 8,192 tokens remain outside this test.

── more in #large-language-models 4 stories · sorted by recency
── more on @hartsyinference 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/what-happens-before-…] indexed:0 read:1min 2026-11-30 · —