How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="EvanOLeary/laguna-xs2-dense-k8-cuda-sft-v2", trust_remote_code=True)
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("EvanOLeary/laguna-xs2-dense-k8-cuda-sft-v2", trust_remote_code=True, device_map="auto")
Quick Links

Laguna-XS.2 → Dense (K=8) · CUDA-SFT-extended (follow-up SFT)

A ~3.0 B dense CUDA-kernel model — a follow-up SFT on top of laguna-xs2-dense-k8-cuda-sft, trained on more CUDA / C++ kernel code.

Lineage

poolside/Laguna-XS.2 (33B/3B-active MoE, 256 experts)
   → densify (K=8 dense SwiGLU) → DO-ACP warm-start
   → reconstruction-pretrain (kernel mixture, "V2")
   → SFT (SakanaAI CUDA, level_1+2, 400 steps)        = laguna-xs2-dense-k8-cuda-sft
   → SFT-extended (level_1+2+3, +500 steps)           = THIS MODEL
   → RFT/GRPO (verifiable reward)                      = next (laguna-xs2-dense-k8-cuda-rft)

Why a follow-up SFT (rationale)

The first SFT (400 steps, level_1+2) produced a model that emits working CUDA on simple ops (ReLU/Tanh ~3/4 at pass@k) but showed two gaps:

  • Thin C++ idiom coverage — it botches more involved C++/CUDA constructs (e.g. float4* v = float4* ptr; instead of reinterpret_cast<float4*>(ptr)), so vectorized kernels fail to compile.
  • Limited CUDA breadth — harder ops (Sigmoid/GeLU/Softmax) compile/verify inconsistently.

This follow-up extends the SFT with more CUDA + C++ kernel data (Sakana level_1+2+3, +500 steps from the previous checkpoint) to broaden C++/CUDA coverage before RL. It is the mid checkpoint in a 3-way comparison: SFTSFT-extended (this) → SFT-extended-RFT.

Training

Base laguna-xs2-dense-k8-cuda-sft (continued, not from scratch)
Data SakanaAI/AI-CUDA-Engineer-Archive level_1,level_2,level_3 (correct kernels), PyTorch→CUDA, chat-formatted, prompt masked
Objective causal-LM cross-entropy on the CUDA completion only
Trainable routed_dense + lm_head + norms (1.19 B)
Optimizer AdamW 1e-5, grad-clip 1.0, grad-accum 8, seq 2048, 500 steps

Evaluation

Benchmarked 3-way (SFT / SFT-extended / SFT-extended-RFT) on KernelBench-Lite L1 (10 elementwise ops, K=4, subprocess-isolated compile+correctness vs PyTorch eager). Results table: github.com/Tyronita/laguna-dense-cuda-kernels.

Intended use

Research base for RFT (RL on verified compile+correctness+speedup). Kernels are not verified at generation time — compile & check before use, and isolate execution (a bad kernel corrupts the CUDA context).

Downloads last month
15
Safetensors
Model size
3B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for EvanOLeary/laguna-xs2-dense-k8-cuda-sft-v2

Finetuned
(3)
this model
Finetunes
3 models