CK
AI & ML interests
Recent Activity
Organizations
ZeroFLops gives a byte-level transformer a counted memory: n-gram tables, word tables, a document cache and page-structure "senses", all counted once from the enwik8 training text. No gradients, built in minutes. The transformer learns how to use it. ๐ฆ Only enwik8, no outside data, no pretrained models.
๐งช This week: 25+ controlled A/B runs (20k-step tests, 2 seeds each, validation set)
๐ฏ Per-byte gate, "whom to trust here": โ0.020 bpc with only 7,000 parameters, and โ0.033 when the text has been read many times
๐งญ Page structure + scoreboard senses: โ0.005
โ๏ธ Averaged weights: โ0.005
๐ Class cache: โ0.004
๐ค 6-byte contexts: โ0.003
โ Bigger cache, longer history, longer contexts: ยฑ0. The memory is saturated; the gains come from how it's used.
๐ Recipe total: 1.201 โ 1.148 bpc, as much as doubling the training
๐ Looking inside:
The model trusts the document cache twice as much when the cache is sure (gate 1.00 vs 0.49).
Switching off the late long-context gate costs 0.021 bpc.
62% of the improvement comes from words new to the article, so the transformer does real work, not just copying.
๐ Where we stand (enwik8 test, every byte, 39.5M parameters):
1.018 bpc ยท loss 0.705 ยท perplexity 2.025
0.980 bpc with learning while reading ยท loss 0.679 ยท perplexity 1.972
๐ Next: the gold run (all winners, about 1.2M steps). My estimates:
๐ฏ 0.98โ1.00 bpc, perplexity โค 2.0: better than a coin flip per byte
๐ฏ 0.94โ0.96 bpc with learning while reading
๐ For reference: Transformer-XL 277M scores 0.99, and 0.94 with dynamic evaluation
Code follows .. if someone is interested ๐
ZeroFLops gives a byte-level transformer a counted memory: n-gram tables, word tables, a document cache and page-structure "senses", all counted once from the enwik8 training text. No gradients, built in minutes. The transformer learns how to use it. ๐ฆ Only enwik8, no outside data, no pretrained models.
๐งช This week: 25+ controlled A/B runs (20k-step tests, 2 seeds each, validation set)
๐ฏ Per-byte gate, "whom to trust here": โ0.020 bpc with only 7,000 parameters, and โ0.033 when the text has been read many times
๐งญ Page structure + scoreboard senses: โ0.005
โ๏ธ Averaged weights: โ0.005
๐ Class cache: โ0.004
๐ค 6-byte contexts: โ0.003
โ Bigger cache, longer history, longer contexts: ยฑ0. The memory is saturated; the gains come from how it's used.
๐ Recipe total: 1.201 โ 1.148 bpc, as much as doubling the training
๐ Looking inside:
The model trusts the document cache twice as much when the cache is sure (gate 1.00 vs 0.49).
Switching off the late long-context gate costs 0.021 bpc.
62% of the improvement comes from words new to the article, so the transformer does real work, not just copying.
๐ Where we stand (enwik8 test, every byte, 39.5M parameters):
1.018 bpc ยท loss 0.705 ยท perplexity 2.025
0.980 bpc with learning while reading ยท loss 0.679 ยท perplexity 1.972
๐ Next: the gold run (all winners, about 1.2M steps). My estimates:
๐ฏ 0.98โ1.00 bpc, perplexity โค 2.0: better than a coin flip per byte
๐ฏ 0.94โ0.96 bpc with learning while reading
๐ For reference: Transformer-XL 277M scores 0.99, and 0.94 with dynamic evaluation
Code follows .. if someone is interested ๐
My estimate in all units:
Stage Bits per byte Loss (nats per byte) Perplexity per byte
Now, measured (e8l) 1.018 0.705 2.025
Now + learning while reading, measured 0.980 0.679 1.972
Gold run 0.98โ1.00 0.679โ0.693 1.97โ2.00
Gold run + learning while reading 0.94โ0.96 0.652โ0.665 1.92โ1.95
Generation 2 + Transformer-XL memory, with learning while reading 0.92โ0.94 0.638โ0.652 1.89โ1.92
enwik8 test, bits per byte (lower is better):
โข 39.5M params: 1.018, and 0.980 with dynamic evaluation (learning while reading)
โข 86.3M params: 1.027 / 0.976
โข 85.3M without the memory: 1.075 / 0.999
Honest caveat: the tables hold 82M count entries (a 1.1 GB file) on top of
the parameters. The memory is built by counting, no gradients, but the
model still runs a normal transformer.
Model: Chris4K/zeroflops-enwik8-lm
Code: https://github.com/Ckal/ZeroFLops-paper
enwik8 test, bits per byte (lower is better):
โข 39.5M params: 1.018, and 0.980 with dynamic evaluation (learning while reading)
โข 86.3M params: 1.027 / 0.976
โข 85.3M without the memory: 1.075 / 0.999
Honest caveat: the tables hold 82M count entries (a 1.1 GB file) on top of
the parameters. The memory is built by counting, no gradients, but the
model still runs a normal transformer.
Model: Chris4K/zeroflops-enwik8-lm
Code: https://github.com/Ckal/ZeroFLops-paper
@yano2mch Good question. Order matters a lot within a text and hardly at all between
texts.
Within a document: the memory only helps because repeats are nearby. If you
shuffled the words or sentences, the cache and the long contexts would find
almost nothing and the score would get much worse.
Between documents: during training the windows are sampled at random
anyway, so reordering the training files changes little.
On compression: yes. Bits per byte is compression, so putting similar
articles next to each other would make text easier to predict. Some
Hutter Prize compressors reorder Wikipedia articles for exactly that
reason. For a benchmark it isn't allowed, though: the test file has a
fixed order.
Thanks, that's a great connection. Honest scope first: my memory is much
lower-level than yours. It counts which byte followed which context, plus
what already appeared earlier in the current document. No facts, no
experience, no "what worked".
But the principle is the same: knowledge that lives outside the weights,
built without training, and looked up when needed. One thing I measured
fits your idea well: the document cache matters most. A passage the model
has seen before costs 0.69 bits per byte instead of 1.8, even 6,000 bytes
later, while a plain transformer forgets it after its 512-byte window.
Code and models are up now: https://github.com/Ckal/ZeroFLops-paper
Can a small transformer do more by remembering differently?
39.5M parameters + discrete count tables + document cache.
1.017 BPC on enwik8.
No gradient updates needed to build the memory.
Exploring a different way to scale language modeling: not just more parameters, but better memory.
Paper & code follows ... if someones interested
AI agents now read mail, open files, browse the web and run shell commands. A single crafted email was enough for EchoLeak (CVE-2025-32711), and a coding agent wiped a production database during a code freeze. The risk has moved from what models say to what agents do.
ViKernel is a security kernel that sits at the tool-call boundary, like an OS kernel at the system-call boundary. Every tool call gets ALLOW or DENY before it runs, and every verdict goes into a hash-chained audit trail.
Now we want you to break it. ๐
๐ฏ Season 1 ยท Agent Hijack (Beginner)
๐ต๏ธ Season 2 ยท Data Exfiltration (Intermediate)
โ๏ธ Season 3 ยท Hidden Instruction (Advanced): plant a mail, a document or a page and make the agent act on it
๐ฅ Season 4 ยท Kernel Breach (Expert)
Every season has two prizes: Top score (USD 500, and USD 1,000 in Season 4) and a USD 500 Special Award for the most outstanding finding.
Seasons 1, 2 and 3 are open now until Jan 16. Season 4 opens right after.
Day 1: 6 players, 56 submissions, 14 accepted breaches, and 11 causes fixed in the kernel the same day.
โ Hugging Face sign-in + a browser. No coding, no GPU.
โ Mock tools, so attack freely.
โ Prompt guide with copy-ready attacks for every season.
โ Live leaderboard and a measured baseline to beat.
Safe AI is built by everyone who tries to break it. Bring your strangest idea. ๐ค
๐น๏ธ Start hacking: FINAL-Bench/ViKernel-RedTeam
๐ Read the full story: https://huggingface.co/blog/FINAL-Bench/ai-model-hacking-hackathon-safe-ai-is-built-by-eve
#AISafety #RedTeaming #AIAgents #PromptInjection #Hackathon
It's a text-to-speech model that supports multiple languages, voice cloning and different speech styles.
One of the things I find interesting is the ability to control how a voice sounds, including emotions, whispering, laughter and other expressions.
It also supports Polish, which makes it especially interesting to experiment with.
You can check it out here:
FashionFlora/ogg-tts
FashionFlora/ogg-tts
Would be great to hear what you think!
Can a small transformer do more by remembering differently?
39.5M parameters + discrete count tables + document cache.
1.017 BPC on enwik8.
No gradient updates needed to build the memory.
Exploring a different way to scale language modeling: not just more parameters, but better memory.
Paper & code follows ... if someones interested
The leaderboard measures cognitive skills, which is more challenging and beyond language modeling and instruction-following. This is a first step towards more everyday useful and general small models.
dotlabs/cognirank
Multi-vector models keep a vector per token, letting different query tokens match different parts of a document. Great for retrieval, but those vectors add up! Token pooling makes the representations smaller by merging similar document vectors into cluster means.
Pooling-aware training teaches the encoder to preserve useful matches after those vectors are merged. With MultiVectorTokenPoolingLoss, you can wrap your standard retrieval loss to train on both full and pooled representations, reusing the same token embeddings without another encoder pass. In short: small overhead.
I trained two ModernBERT-base models on the same 120k MS MARCO triplets, changing just the loss. At ~49 vectors per document instead of 193, pooling-aware training raises NanoBEIR@13 mean nDCG@10 from 49.03 to 51.23. That's 97.8% of its own unpooled score with ~4x fewer document vectors, compared with 94.6% retention for ordinary training.
v6.3 also adds:
- Adaptive token budgets, allocating vectors according to each document's content
- Matryoshka training for shorter multi-vector token embeddings
- Hugging Face kernels support for MaxSim, Ward clustering & supported transformers layers
- Native AWS Neuron inference
You can combine pooling-aware and Matryoshka training to learn both fewer vectors and fewer dimensions, then stack these with quantization to reduce storage per coordinate. For kernels, install sentence-transformers[kernels] and set use_kernels=True.
The blog walks through the method, training code, checkpoints & evaluation, building on Stefan Josef's Learn to Pool and LightOn's pooling regularization work:
ht tps://huggingface.co/blog/token-pooling
I'd love to see what you train with this!
In February 2025 I grabbed 64GB DDR5 (2x32) from BestBuy for about $160 bucks cash in total and thought nothing of it at the time.
Today, nearly 2 years later...
Same exact modules are nearly 6 times the price I paid.
Price increase: +458.7% in approximately 21 months
1-bit Unsloth GGUF scores 68.1 on DeepSWE, 72.2 on Terminal-Bench, 52.7 on AutomationBench. >10% ahead of other quants.
GGUF: unsloth/DeepSeek-V4.1-Flash-1017-GGUF
Can a small transformer do more by remembering differently?
39.5M parameters + discrete count tables + document cache.
1.017 BPC on enwik8.
No gradient updates needed to build the memory.
Exploring a different way to scale language modeling: not just more parameters, but better memory.
Paper & code follows ... if someones interested
@dipankarsarkar ...
Honestly, your question almost made me cry at first :) Then it sent me somewhere I didn't expect.
@Lounafa1
I started editing a .pt file by hand and realised I could more or less "program" a model directly. I tried turning a hard (counted) model into a soft one and training on from there. Along the way I ended up with something different: a counted byte model (n-gram tables plus a cache of the current document) fed as extra input into a small byte-level transformer.
First numbers on enwik8, test set, every byte scored, same 38M transformer with and without the counted memory: 1.104 vs 1.048 bits per byte. The tables are extra memory on top of the parameters, so this isn't a like-for-like comparison with published models, and I'm still running bigger models and proper ablations before I claim anything.
So: the Connect Four net didn't learn what I hoped, but the way you made me test it changed what I'm working on. I'll post the write-up when it's solid. If you have time to poke holes in it then, I'd value that a lot.
->You just achieved 0.9804 BPC on enwik8 with a 39.5M parameter model.
Damn.... I created a branch ran a few tests (because i am not so good in guessing ;) ) and...
Thanks for the suggestionโI tested the released V6 checkpoint with a โwin now / block nowโ override against the same rule with a centre-first fallback.
From 200 fresh 12-move openings, played twice with colours swapped, the hybrid scored 171 wins, 209 losses and 20 draws: 45.25% over 400 games. Neither player used random moves after the opening. The starting boards and their mirrors were excluded if they appeared in the training corpora or the earlier tactical dataset.
On this sample, the modelโs choices in quiet positions did not improve on the centre-first fallback. The result doesnโt prove the model learned no positional patterns, but it doesnโt demonstrate a useful advantage over the one-ply baseline.
Separately, on training-board-disjoint positions without an immediate win or threat, the model agreed with the time-limited teacher on 35.7% versus 43.1% for centre-first. Thatโs not a direct comparison with tactical accuracy, which we measured differently.
The test and results are in commit 8fe1cab; Iโll push it shortly.
Partly. I trained a GF(2โธ) integer model (8.4M params, CPU-only) on 320k games labelled by a negamax search teacher.
What it learned:
โข agrees with the teacher on 59.6% of training / 41.0% of board-disjoint holdout positions
โข beats a random player 85.2% of the time
What it didn't:
โข loses to a 1-ply "win now / block now" rule (wins 37.2%)
โข loses to 2-ply lookahead (wins 24.3%)
Agreeing with a teacher is not the same as playing well, and this release measures both.
Caveat up front: the float32 read-out is 99.6% of the parameters. The trunk is float-free; the full model isn't yet.
The repo also documents six bugs that each produced a plausible but wrong number. In one, 41% of the supervision was silently all-zero.
๐ฎ Play: Chris4K/connect-four-gf256 (Space)
๐ง Model: Chris4K/connect-four-gf256
๐ฆ Dataset: Chris4K/connect-four-gf256 320k games + per-ply targets, MIT
๐ป Code + paper: https://github.com/Ckal/connect-four-gf256
Feedback welcome, especially: which baseline would convince you?
