Run this model with HF Jobs

Run K1ta141k/olmicro-1.4b-kernel-star on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/K1ta141k/olmicro-1.4b-kernel-star. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/K1ta141k/olmicro-1.4b-kernel-star on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/K1ta141k/olmicro-1.4b-kernel-star. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/K1ta141k/olmicro-1.4b-kernel-star. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

olmicro-1.4b-kernel-star

A proof-of-concept 1.4B post-trained model (allenai/olmicro-1.4b-base, 80% Gated DeltaNet / 20% full attention) trained end to end on a single 4GB RTX 3050 Ti GPU to write genuine, execution-verified Triton GPU kernels from PyTorch nn.Module references.

This repository contains both the merged bf16 weights (at root, standalone with trust_remote_code=True) and the original LoRA adapter files (in lora_adapter/).


Training Recipe

This checkpoint (sft4_lora_R5c_star) is the strongest overall model from our controlled Goal 3–4 post-training study:

Base teacher traces were generated by Gemini 4 Neon and filtered through verifier v2. The gains after SFT came from RL and STaR on the model's own verified outputs.

  1. Deep Clean SFT on a Disjoint Base Split: All-linear LoRA (r=4, alpha=8, applied across Gated DeltaNet, attention, and MLP projections, lr=3e-4, completion-only loss) trained strictly on Verifier-v2-verified base training ops (55 base ops within max_length=1792, 0 shape/dtype variants seen). Holding out all 60 training variants prevented the SFT–RL entropy collapse (1.00/8 byte-for-byte clones) observed when reusing SFT-seen prompts for RL.
  2. Self-Generated Pass Collection (STaR / RFT): Sampled k=8 rollouts across the unseen training variants and filtered strictly through verifier.py v2 (status == "PASS" and runtime triton_launched == True), selecting the fastest genuine passing kernel per problem (27 self-generated unseen-variant passes across 5 operator families).
  3. Fresh STaR/RFT SFT: Trained a fresh LoRA adapter from allenai/olmicro-1.4b-base on the union of the 55 base teacher traces + 27 fastest self-generated Verifier v2 passes (82 traces, 8 epochs, grad_accum=4, lr=3e-4, 168 steps).
  4. Reward Lineage (E2): Our controlled 5-arm Phase 1 GRPO ablation established E2 (fail -> 0.0, pass -> 0.3 + min(speedup, 4.0)) as the winning online RL reward (2.43× higher held-out mean speedup than 1.0 + min(speedup, 4.0)), while Phase 2 showed that offline STaR/RFT avoids the multi-family catastrophic forgetting observed under online lr=1e-4 GRPO on a 4.6M-parameter rank-4 LoRA.

Locked Verifier v2 Evaluation Results

Evaluated under the locked config (bf16, bare 1-shot prompt, greedy decoding, max_new_tokens=1024, 20 held-out Level-1 ops disjoint by upstream KernelBench source_kb_id, Verifier v2 with static + runtime JITFunction.run genuine-launch check, candidate-before-reference trial order, and full-device all-stream torch.cuda.synchronize, 5 trials, 10 warmup, 50 repeats):

Metric Fresh Goal 4 Re-eval (grpo4_best_fresh_v2) Pre-Release Verification Goal 3 Clean SFT Baseline (sft_clean_v2) Base Model (allenai/olmicro-1.4b-base)
Held-Out Correctness (v2) 5 / 20 (25.0%) 5 / 20 (25.0%) 1 / 20 (5.0%) 0 / 20 (0.0%)
Mean Speedup (all 20, fails=0) 0.2704x 0.2547x 0.0464x 0.0000x
Mean Speedup (passing ops) 1.0815x 1.0186x 0.9286x 0.0000x
Median Speedup (passing ops) 0.9545x 0.8922x 0.9286x 0.0000x
fast_1 (> 1.0x & correct) 1 (2 on initial eval) 1 0 0
Dead-Kernel Fallbacks 0 / 20 0 / 20 0 / 20 0 / 20

Passing Held-Out Ops (Fresh Re-eval, Verifier v2)

Op Speedup vs PyTorch (fresh re-eval)
kb1_025_swish 2.2033x
kb1_082_conv_depthwise_2d_square_input_square_kernel 0.9569x (1.0089x initial)
kb1_019_relu 0.9545x
kb1_001_square_matrix_multiplication 0.9162x
kb1_017_matmul_with_transposed_b 0.3764x

Limitations (Stated Plainly)

  • Small model capacity: At 1.4B parameters, 15 of 20 held-out ops still fail on single-shot greedy generation (predominantly Triton compilation/API/shape errors on harder multi-step ops such as batched matmul, softmax, layernorm, pooling, cross-entropy, and attention).
  • Level-1-style single ops: Trained and evaluated on single-operator PyTorch modules derived from KernelBench Level 1, not multi-layer fused model graphs.
  • Modest speedups: Passing kernels are genuine Triton launches, but most cluster near 0.9x–1.0x vs PyTorch/cuBLAS (only fused elementwise swish consistently exceeds 2.0x, and depthwise 2D conv sits right on the 1.0x boundary).
  • Eval set withheld: The 20 held-out evaluation problems are intentionally kept private (K1ta141k/kernel-eval-problems-private) so benchmark numbers remain uncontaminated.

Usage

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "K1ta141k/olmicro-1.4b-kernel-star"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    dtype=torch.bfloat16,
).to("cuda").eval()

To evaluate on a directory of reference PyTorch .py problems using Verifier v2:

python3 eval_baseline.py   --model K1ta141k/olmicro-1.4b-kernel-star   --tasks-dir /path/to/tasks   --run-id hub_eval_v2   --max-new-tokens 1024

License

Apache-2.0 (matching allenai/olmicro-1.4b-base).

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

Model tree for K1ta141k/olmicro-1.4b-kernel-star

Finetuned
(2)
this model