Views
No views yet
Quantized variant ofEvanOLeary/laguna-xs2-dense-k8-cuda-sft. Pure-PyTorch int8 weight-only quantization via torchao. Bf16 activations / compute, int8 storage. Quantization is lossless on greedy decode for the ReLU smoke prompt (byte-identical to bf16).
| bf16 (base) | torchao Int8 weight-only | |
|---|---|---|
| Weight file | 5.99 GB | 3.21 GB (54% of bf16) |
| VRAM (loaded) | 6.00 GB | 3.22 GB |
| Bits/param (effective) | 16 | ~8.6 (incl. scale/zero overhead) |
torch::extension-style CUDA kernel with templated relu_kernel,
AT_DISPATCH_FLOATING_TYPES dispatch, a relu_forward host launcher, and a PYBIND11_MODULE
entrypoint suitable for torch.utils.cpp_extension.load_inline.1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3
4repo = "EvanOLeary/laguna-xs2-dense-k8-cuda-sft-int8"
5tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
6model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True,
7 dtype=torch.bfloat16, device_map="cuda")
8# torchao quant is baked into the saved weights — no further setup needed.
9
10msgs = [{"role":"user","content":"Write a CUDA kernel for elementwise sigmoid on a float array."}]
11text = tok.apply_chat_template(msgs, add_generation_prompt=True, tokenize=False)
12ids = tok(text, return_tensors="pt", add_special_tokens=False).input_ids.to(model.device)
13out = model.generate(ids, max_new_tokens=400, do_sample=False, pad_token_id=tok.pad_token_id)
14print(tok.decode(out[0][ids.shape[-1]:], skip_special_tokens=True))| Stage | Repo |
|---|---|
| Teacher MoE | poolside/Laguna-XS.2 |
| Dense recon (V1) | EvanOLeary/laguna-xs2-dense-k8-recon |
| CUDA-SFT (bf16 base for this quant) | EvanOLeary/laguna-xs2-dense-k8-cuda-sft |
| This: torchao Int8 weight-only | EvanOLeary/laguna-xs2-dense-k8-cuda-sft-int8 |
Int8WeightOnlyConfigtorch.compile should close this gap.