Shauray (@Shauray7) header
Shauray (@Shauray7) profile picture

hiring me for optims/post-train is legal and encouraged !

Joined September 2017
nvidia libraries were breaking our 6 figure training runs
I found a bug in @nvidia cuDNN's attention backward (CWE-190) that silently breaks large scale training on default @PyTorch cu130 wheel. No crash, past a certain tensor size the model stops learning and starts to unlearn. It happened with one of our models @speridlabs +
1
3
12
597
Shauray retweeted
Hi all, I have a new result I'm excited to share. It turns out that *all existing implementations* of softmax and cross-entropy (that's JAX, PyTorch, textbooks, etc) have a subtle bug --- two bugs, actually. A simple rewrite fixes both, and eliminates "slingshots" when grokking:
135
792
151
6,513
799,760
went into an optimization trap today with this started off at 2.18s (1k edits) dropped to 1.29s (median) ofc most it came from compile dropping off elemwise launches (which was around .8s) the rest comes from fusing nvfp4 quant into rmsnorm+adaln and silu*mul (e2m1 pairs + swizzled e4m3 scales written to flashinfers mm_fp4's layout) got to around 1.6TB/s with this btw all of this is 5090 so gemm is now at 88% of sol
I tried @bria_ai_ FIBO2.0 edit and combined that with qwen2.1 for boxed edits and FIBO for full edits makes a really good pixel perfect multi turn edit solution, also FIBO's page says they have a multi-turn edit lora in oven ! btw here - github.com/shauray8/QwenEdit (rn its monkey patched onto sglang)
1
2
182
I tried @bria_ai_ FIBO2.0 edit and combined that with qwen2.1 for boxed edits and FIBO for full edits makes a really good pixel perfect multi turn edit solution, also FIBO's page says they have a multi-turn edit lora in oven ! btw here - github.com/shauray8/QwenEdit (rn its monkey patched onto sglang)
Replying to @krea_ai
@krea_ai's K3 launch videos gave me extreme fomo, so until they release the weights I made a little multi-turn edit tool for qwen2.1. I think its one of the most underexplored part of the arch that the edit prefix can be cached and multi-turn can share that prefix turn over turn, so each new edit only computes what's new. 0.9s per 1k edit, ~4.5s 2k box edits tested on rtx pro 6k. multi turn scandinavian defense idea comes from @awdii_ repo: github.com/shauray8/QwenEdit more details below.
1
5
447
lfg!!!
Krea 3 Ultra by @krea_ai has landed in the Single-Image Edit Arena and the Multi-Image Edit Arena. @krea_ai is now among the top 5 labs for both arenas: #4 by lab in Multi-Image Edit, and #5 by lab in Image Edit! In the Multi-Image Edit Arena, Krea 3 Ultra is #4 with 1435 pts. By category it is: - #2 in Commercial Design and in 3D - #4 in Cartoon/Fantasy and in Text Rendering In the Image Edit Arena it landed #8 with 1411 pts, and by category: - #6 in Commercial Design, Cartoon/Fantasy and Text Rendering - #8 in 3D Congrats to the team at @krea_ai on this release!
3
1
21
691
Shauray retweeted
(1/6) The all-new FastVideo FastH3-QAD-v2 and the all-new H3 NVFP4 VAE decoders are here! 🚀🚀 This entire 768p video was generated on two DGX Sparks, using QAD-v2 and both new decoders. 8-step video + audio, QAD weights 💾 @NVIDIARTXSpark @NVIDIAAI @MiniMax_AI
5
17
8
103
18,588
Replying to @krea_ai
@krea_ai's K3 launch videos gave me extreme fomo, so until they release the weights I made a little multi-turn edit tool for qwen2.1. I think its one of the most underexplored part of the arch that the edit prefix can be cached and multi-turn can share that prefix turn over turn, so each new edit only computes what's new. 0.9s per 1k edit, ~4.5s 2k box edits tested on rtx pro 6k. multi turn scandinavian defense idea comes from @awdii_ repo: github.com/shauray8/QwenEdit more details below.
1
1
11
589
2.1's DiT runs a prefix [prompt | reference images] what makes K/V reusable is - prefix tokens are modulated at t=0, so K/V is identical across all 8 steps. Attention is block-causal. Target reads the prefix, the prefix never reads the target. for cache i reused RadixCache + TokenToKVPoolAllocator from sglang the same radix tree and slot allocator the llm side uses. radix trees only reuse shared heads, so every request is laid out stable-first: canvas image -> item refs -> prompt text last. New instruction changes only the tail and reuses the whole image prefix. the text encoder gets the same treatment. the rest of the speed comes from nvfp4 DiT on flashinfer mm_fp4, breakable cuda graphs + sage2, progressive resolution for >=2MP edits (-26% at 2k), and crop edits that only generate the window around your boxes (~13 steps/s). here is everything - github.com/shauray8/QwenEdit
1
101
Let me introduce you to some good hip-hop, btw the video was made using opus5.5 and a couple of FAL calls (qwen 2.1, qwen layered, SAM3 and kling)
1
10
494
my feed is filled with new models, new post-trains, new techniques and claude generated videos/games/articles what is happening?
3
283
couple updates on this, 1. a better σ, the diagonal estimate assumed key dimensions are independent which they arent. a rank-2 σ made the error come down from 8% to 13% 2. finally fixing the direction, the tilted mean v̄ plus a q-dependent correction from the key/value covariance is the solution for the wrong vector problem from the last post, on L20 it hits -30%, and with it the optimal SHRINK snaps back to 1.0. so with all that and all the information in quoted posts the speedups came down to: -15% blocks -> -3% attention -> -1% wall :( nothing significant but something.
some more measurements continuing from the prev post. running the dense trajectory and at every sparse eligible call also runs the sparse kernel on the same Q/K/V and record ||O_sparse - O_dense||/||O_dense||. the dense output goes forward so errors dont compound and every variant sees identical inputs. what i saw was, moving two layers between dense and sparse changes the video about as much as turning sparsity on. at SHRINK=1 no variant wins everywhere. the mass term blows up in the early and late layers, routing only wins the back third, both fixes mostly win the middle layers. best layers for shrink landed between .25 and .75 well below what we measured earlier in the series of posts leading up to this. what dominates the error is the direction of a skipped block's contribution, not its size and in frozen blocks the block mean points far off from the true one. a full mass correction just scales up the wrong vector. at low shrink the layers that were losing start gaining. until now what I have is a combination of this new variant that we came up with in the prev posts + SHRINK + ρ target per layer, chosen by a cost aware rule that only accepts REM on a layer when its error gain beats the extra kernel time. on the kernel - 8% lower attn error at the same speed. [more generated diagrams]
3
145
hmm I had some pixel-space z-image inferences on my disk I could not really find the same prompts but still should be enough for a quick comparison (it sure is not apples to apples cause z-image one was L2P but its something). [first 2 from pixel-space zimage | last 2 from iris default params]
finally a pixel space model, i hope this stays !
4
251
Shauray retweeted
Your RAE does not need all of those tokens. Meet PoolDINO: 4x-16x fewer tokens, similar generation quality, and both cheaper training and sampling. Here's RAE vs. 8x compression on an M1 Pro CPU (no accelerator). 🧵
3
17
2
112
11,055
Veda seems much better then VSA in theory atleast the learning signal matches the objective, and the videos with veda look pretty good.
2
234
finally a pixel space model, i hope this stays !
Meet Iris-3B: a pixel-space T2I model and general vision learner that generates every pixel directly. No VAE. Pre-trained from scratch, 3B, open weights. We also explore its generative prior on detail-critical vision tasks: depth estimation and image restoration. Fully open: weights, code and demo (Apache 2.0) speridlabs.com/research/iris
1
5
528
1/ Why does predicting in latent space (JEPA, CPC, SimCLR...) work so well on messy data, with changing lighting, camera angles, and busy backgrounds? The usual answer: it can ignore nuisance. But that answer holds a conundrum.
3
51
2
442
34,101
some more measurements continuing from the prev post. running the dense trajectory and at every sparse eligible call also runs the sparse kernel on the same Q/K/V and record ||O_sparse - O_dense||/||O_dense||. the dense output goes forward so errors dont compound and every variant sees identical inputs. what i saw was, moving two layers between dense and sparse changes the video about as much as turning sparsity on. at SHRINK=1 no variant wins everywhere. the mass term blows up in the early and late layers, routing only wins the back third, both fixes mostly win the middle layers. best layers for shrink landed between .25 and .75 well below what we measured earlier in the series of posts leading up to this. what dominates the error is the direction of a skipped block's contribution, not its size and in frozen blocks the block mean points far off from the true one. a full mass correction just scales up the wrong vector. at low shrink the layers that were losing start gaining. until now what I have is a combination of this new variant that we came up with in the prev posts + SHRINK + ρ target per layer, chosen by a cost aware rule that only accepts REM on a layer when its error gain beats the extra kernel time. on the kernel - 8% lower attn error at the same speed. [more generated diagrams]
picking up from the overhead from the quoted post. SHRINK scales the correction g_eff = SHRINK.g(σ). so at shrink=0 the kernel still computes and reads g but selects exactly baseline's blocks, so that run separates the cost of computing all the new stuff from the cost of REM's selection with REM moved into the TMA frwd, the selection cost is almost 0. the scattered load penalty in the last post came from the first impl part, not from REM picking frozen blocks. what's left is a fixed per-call cost which is - build g and read it in the main loop. so g builds in one fused kernel, g tiles TMA-loaded alongside the centroid tiles. around 1 ms per call on the kernel. τ stops being an input too. each layer ships a density target ρ, and τ* is the ρ-quantile of the routing z-scores, solved on device at the layer's first sparse step and cached for further use. that removed the τ drift from the last post, also every comparison is density matched.
1
1
228
why does qwen 2.1's vae has temporal configs? just leftovers or what?
1
106
picking up from the overhead from the quoted post. SHRINK scales the correction g_eff = SHRINK.g(σ). so at shrink=0 the kernel still computes and reads g but selects exactly baseline's blocks, so that run separates the cost of computing all the new stuff from the cost of REM's selection with REM moved into the TMA frwd, the selection cost is almost 0. the scattered load penalty in the last post came from the first impl part, not from REM picking frozen blocks. what's left is a fixed per-call cost which is - build g and read it in the main loop. so g builds in one fused kernel, g tiles TMA-loaded alongside the centroid tiles. around 1 ms per call on the kernel. τ stops being an input too. each layer ships a density target ρ, and τ* is the ρ-quantile of the routing z-scores, solved on device at the layer's first sparse step and cached for further use. that removed the τ drift from the last post, also every comparison is density matched.
on the wins the kernel changes should be small, one extra accum in the reduction kernel (kvar = mean(k²) - k_dash², while the K tile is already loaded) and in routing. the kernel doesn't re-center the routing threshold, so τ's meaning shifts τ=1.0 lands at ρ=0.599, and matching baseline's ρ=0.25 needs τ≈2.5 (as mentioned in the quoted post). Timings at matched density (38,208 tokens × 56 heads) baseline = 53.85 ms, (mass+routing) fix = 57.98 ms +7.7% overhead (from computing the correction) need to see what can be done here. also baseline's mask is a few long contiguous runs (3 streaming mem reads), my frozen block REM is more scattered cold loads, so mass+routing does save 19% density but costs 19.7% time, essentially net zero if not worst, lets see if i can fix up.
1
1
205