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.
Instructions to use K1ta141k/olmicro-1.4b-kernel-star with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use K1ta141k/olmicro-1.4b-kernel-star with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="K1ta141k/olmicro-1.4b-kernel-star", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("K1ta141k/olmicro-1.4b-kernel-star", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use K1ta141k/olmicro-1.4b-kernel-star with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "K1ta141k/olmicro-1.4b-kernel-star" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "K1ta141k/olmicro-1.4b-kernel-star", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/K1ta141k/olmicro-1.4b-kernel-star
- SGLang
How to use K1ta141k/olmicro-1.4b-kernel-star with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "K1ta141k/olmicro-1.4b-kernel-star" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "K1ta141k/olmicro-1.4b-kernel-star", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "K1ta141k/olmicro-1.4b-kernel-star" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "K1ta141k/olmicro-1.4b-kernel-star", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use K1ta141k/olmicro-1.4b-kernel-star with Docker Model Runner:
docker model run hf.co/K1ta141k/olmicro-1.4b-kernel-star
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/).
- Code & Verifier v2:
alithekazakh/kernel-pipeline - Public training problems & verified traces:
K1ta141k/kernel-train-problems
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.
- 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 (55base ops withinmax_length=1792,0shape/dtype variants seen). Holding out all 60 training variants prevented the SFT–RL entropy collapse (1.00/8byte-for-byte clones) observed when reusing SFT-seen prompts for RL. - Self-Generated Pass Collection (STaR / RFT): Sampled
k=8rollouts across the unseen training variants and filtered strictly throughverifier.pyv2 (status == "PASS"and runtimetriton_launched == True), selecting the fastest genuine passing kernel per problem (27self-generated unseen-variant passes across 5 operator families). - Fresh STaR/RFT SFT: Trained a fresh LoRA adapter from
allenai/olmicro-1.4b-baseon the union of the55base teacher traces +27fastest self-generated Verifier v2 passes (82traces,8epochs,grad_accum=4,lr=3e-4,168steps). - Reward Lineage (
E2): Our controlled 5-arm Phase 1 GRPO ablation establishedE2(fail -> 0.0,pass -> 0.3 + min(speedup, 4.0)) as the winning online RL reward (2.43× higher held-out mean speedup than1.0 + min(speedup, 4.0)), while Phase 2 showed that offline STaR/RFT avoids the multi-family catastrophic forgetting observed under onlinelr=1e-4GRPO 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.0xvs PyTorch/cuBLAS (only fused elementwiseswishconsistently exceeds2.0x, and depthwise 2D conv sits right on the1.0xboundary). - 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
- -
Model tree for K1ta141k/olmicro-1.4b-kernel-star
Base model
allenai/olmicro-1.4b-base