CoolFace
Modelpublic

EvanOLeary/laguna-xs2-dense-k8-cuda-rft

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
0likes18downloads
Model Card

Laguna-XS.2 → Dense (K=8) · CUDA-RFT (GRPO / RLVR)

A ~3.0 B dense CUDA-kernel model, RL-fine-tuned on a verifiable reward on top of laguna-xs2-dense-k8-cuda-sft-v2.

Lineage

Laguna-XS.2 MoE → densify → warm-start → recon (kernel mix)
   → SFT (level_1+2)            = cuda-sft
   → SFT-extended (level_1+2+3) = cuda-sft-v2
   → RFT / GRPO                 = THIS MODEL

Method — GRPO with a verifiable, numerical reward

Per PyTorch prompt, sample G kernels; reward each by actually compiling + running the generated CUDA and comparing to PyTorch eager — isolated in a subprocess so a faulty kernel can't corrupt the trainer's CUDA context.

Reward (~[-0.2, 1.0]): +0.1 parsed · +0.2 compiles · +0.4 numerically correct · +0.3·clip(speedup,0,3)/3.

Algorithm: GRPO + Dr.GRPO (unbiased advantage r−mean, no length/std normalization) + DAPO dynamic sampling (skip zero-variance groups) + KL-to-SFT anchor (β=0.02). RLVR — reward is verification, not a learned model.

Basecuda-sft-v2
Promptsverifiable elementwise ops (relu/sigmoid/tanh/gelu/silu/softplus) — auto-checkable vs eager
Group size6 · steps 24 · lr 1e-6 · KL β 0.02 · temp 0.9
Trainablerouted_dense + lm_head

Evaluation

3-way on KernelBench-Lite L1 (10 ops, K=4, isolated): SFT → SFT-extended → `RFT`. Compile-rate / correctness / speedup lift table: github.com/Tyronita/laguna-dense-cuda-kernels.

Scope: the verifiable reward covers the elementwise op set (numerically checkable vs eager) — a subset of KernelBench L1. Honest about what RL optimized.