Run this model with HF Jobs
Run tuanamz/qwen2.5-coder-14b-polybench-lora 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 to fine-tune https://huggingface.co/tuanamz/qwen2.5-coder-14b-polybench-lora. 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/tuanamz/qwen2.5-coder-14b-polybench-lora 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/tuanamz/qwen2.5-coder-14b-polybench-lora. 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/tuanamz/qwen2.5-coder-14b-polybench-lora. 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 tuanamz/qwen2.5-coder-14b-polybench-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use tuanamz/qwen2.5-coder-14b-polybench-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-14B-Instruct") model = PeftModel.from_pretrained(base_model, "tuanamz/qwen2.5-coder-14b-polybench-lora") - Notebooks
- Google Colab
- Kaggle
Qwen2.5-Coder-14B · PolyBench KD LoRA (clean v3)
QLoRA (NF4 + bf16) adapter trained on OpenMP-parallelized PolyBench kernels distilled from a 6-model frontier teacher ensemble. Intended for one-shot C-to-parallel-C translation of scientific kernels.
Base model
Qwen/Qwen2.5-Coder-14B-Instruct
Training data
123 verified teacher completions (code-only, teacher reasoning stripped) over
19 PolyBench kernels × 2 arms (doc / nodoc), stratified-by-family train/test
split so no kernel family leaks into the 11-kernel holdout. Teachers:
DeepSeek-R1, Qwen3.8-Max, GLM-5.3, Nemotron-3-Super, Kimi-K2.7-Code,
Hermes-4-405B. Correctness flags re-verified end-to-end after the per-binary
cache collision bug fix (2026-12-01).
Hyperparameters
| field | value |
|---|---|
| quantization | NF4 (bnb_4bit_quant_type), bf16 compute, double-quant |
| adapter | LoRA r=16, α=32, dropout=0.05, bias=none |
| target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| epochs | 6 |
| per-device bsz | 1 |
| grad accum | 4 |
| learning rate | 2e-4 |
| max length | 2048 tokens |
| loss | completion-only (user turn masked) |
| GPU | 1 × A100-SXM4 40 GB |
| wall time | ≈ 31 min |
Prompt format
Qwen chat template, system prompt:
"You are an expert HPC compiler optimization assistant."
User turn gives the serial C kernel; assistant emits a single c block
with the parallel implementation.
Evaluation (11-kernel holdout, pass@1 at T=0.2, Wilson 95% CI)
| model | PASS | RUN | BUILD |
|---|---|---|---|
| This adapter | 5/11 [0.21, 0.72] | 10/11 | 10/11 |
| Qwen2.5-Coder-14B-Instruct (vanilla) | 3/11 [0.10, 0.57] | 9/11 | 9/11 |
| 7B student (sibling) | 1/11 [0.02, 0.38] | 8/11 | 9/11 |
| Teacher ensemble ceiling | 10/10 [0.72, 1.00] | — | — |
Kernels solved: atax, heat-3d, nussinov, seidel-2d, syrk. PASS means
the compiled candidate matched the reference output (CORRECT or
CORRECT_NUMTOL) on a timed run; MISMATCH / RUNFAIL / BUILDFAIL otherwise.
McNemar mid-p vs vanilla base on 7 solvable kernels: p = 0.625 (n = 11 too
small for significance; the direction flip from 7B is the signal).
Intended use
Research / autotuning on PolyBench-shape kernels (serial affine loops → OpenMP parallel C). Not production ready. Not evaluated outside the PolyBench benchmark family; off-distribution behavior unknown.
Known limits
- One kernel (
gramschmidt) was unsolvable by the entire teacher ensemble — expect no gain there. - QLoRA inference requires
bitsandbytes(NF4) to match training-time numerics exactly; adapter-only merge into fp16 base is possible but not validated.
Load
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
import torch
bnb = BitsAndBytesConfig(
load_in_4bit=True, bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16, bnb_4bit_use_double_quant=True,
)
base = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-Coder-14B-Instruct",
quantization_config=bnb, device_map="auto",
)
tok = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-Coder-14B-Instruct")
model = PeftModel.from_pretrained(base, "tuanamz/qwen2.5-coder-14b-polybench-lora")
- Downloads last month
- 33
Model tree for tuanamz/qwen2.5-coder-14b-polybench-lora
Base model
Qwen/Qwen2.5-14B