Nadav Rotem (@nadavrot) profile picture

Engineering director at Facebook. Interested in systems, compilers, ML, performance, and other stuff. 🇮🇱

Santa Clara, CA
Joined April 2009
We are hiring Managers and Engineers for our server efficiency teams. If you are interested in compilers, low-level libraries, ML, then let us know. We are hiring in the Bay Area, Seattle, NY and London. The job description is available here: metacareers.com/jobs/4487643…
13
46
4,123
We are looking for GPU compiler engineers, CUDA experts, PTX aficionados, MLIR experts, Triton lovers, IEEE 754 ninjas, and people that don't need to heat their house in winter because their GPU is hot enough. We require a U.S. work permit. Please send me resumes in PDF format.
6
9
116
16,185
Meta is hiring compilers, low-level, and performance engineers. Especially engineers w/ expertise in CPU and GPU performance, CUDA, C++, x86, and LLVM. The roles are located in the SF Bay Area, Seattle, and NY. A U.S. work permit is required.
4
16
2
107
15,826
Two cool things came out in the mid-80s: the Run-DMC hip-hop band and the Dynamic Markov Compression (DMC) algorithm. This weekend, I implemented the DMC algorithm in my educational compressor.
1
15
2,522
Boosting/mixing is a technique for improving the prediction quality by combining weak models into strong ones. Averaging the output of the DMC model with the existing lookup-table model resulted in an improved compression ratio. The Run-DMC band also know about mixing. 🎵
1
4
850
With the new DMC predictor and mixer, the rust implementation can now beat bzip2 and compress the 1GB English Wikipedia benchmark down to 236MB, breaking the 4X compression ratio barrier. youtube.com/watch?v=TLGWQfK-…
4
851
I continued to work on my educational of a compressor (in rust). This week the impl became faster and clearly outperforms gzip and Apple's lzfse. zstd is still 👑. I tried a few things that didn't work, before implementing a new approach: adaptive encoding (not shown below).
1
1
23
5,147
The idea is to predict the probability of the next *bit*. The encoder can use this to emit fewer bits per symbol. Unlike FSE that pre-calculates the prob, the adaptive model changes the prediction on the fly w/ new data. It's very slow, because it's done one bit at a time.
1
1
4
3,044
The new impl reduces the size of the 1GB enwik9 test file from 266 MB to 261 MB, but 3x the runtime. Estimating the probability of the next bit based on the history is an interesting problem. My impl is still very simple (context used as a key to an array of 1/0 counts).
1
5
3,587
I continue my weekends project of implementing an educational compressor in pure Rust. This chart shows a comparison to gzip, zstd, Apple's lzfse, bzip2, lz4 on the same file. Lower is smaller and faster. Bzip2 is 🦥. gzip is 🐢. zstd is👑.
4
3
36
4,822
I spent some time looking at LZ matching and found a cool example where taking the 1st match results in a worse compression. Matching has a cost of 3+ bytes, so matching CAAA won't help the first stream win.
4
11
2,024
And second example, where the matcher skipped 3 bytes to find a longer match (risking encoding of a longer offset) but eventually winning.
2
606
I spent some time in the evenings over the past few weeks writing a modern generic lossless compressor in Rust. I had a lot of fun, learned new things, and I think that the outcome is pretty good. Generic lossless compressors have two parts, an LZ-based stage that finds ...
1
9
1
52
7,836
I forgot to attach the picture to the tweet that mentions compression time.
2
6
1,047