Skip to page content
SAVRN
Search Plan a project

Open-weight model · Text generation

PrismaCoder-3B

by Sandeep Thummala sandeeprdy1729/PrismaCoder-3B

PrismaCoder-3B is an open-weight model for text generation from Sandeep Thummala, released under Apache License 2.0. It has 3.1B parameters and a 32,768-token context. At 16-bit it needs about 7.4 GB of GPU memory, which fits on 1x MI300X from $1.85 an hour, at the lowest prices in the SAVRN Index.

PrismaCoder-3B is a Qwen2.5-Coder-3B-Instruct fine-tune specialized for generating and editing Prisma ORM schemas and client code from natural-language instructions.

Parameters3.1B
Context32,768
Weights6.2 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads—

Runs On

What it takes to serve PrismaCoder-3B (3.1B parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 6.2 GB 7.4 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 3.1 GB 3.7 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 1.5 GB 1.9 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Oct 18, 2026.

PrismaCoder-3B on every accelerator the SAVRN Index prices, at every precision

Model Card

By Sandeep Thummala, published under apache-2.0, revision 7bf1702c048c.

PrismaCoder-3B is a Qwen2.5-Coder-3B-Instruct fine-tune specialized for generating and editing Prisma ORM schemas and client code from natural-language instructions. It was trained with a full SFT → DPO → GRPO pipeline, using a verifier (gate) as both the data-quality filter and the reinforcement-learning reward signal. stage, LoRA weights merged into the base model between stages iterative self-play RL round (attempted; see Limitations) weights for release All stages used seed 20260830 and ran on a single Kaggle T4 GPU (16GB) with gradient checkpointing and paged 8-bit AdamW. verifier (LightValidator, "V0" in the project's internal gate numbering): it checks that generated Prisma…

Read Sandeep Thummala's full model card

PrismaCoder-3B is a Qwen2.5-Coder-3B-Instruct fine-tune specialized for generating and editing Prisma ORM schemas and client code from natural-language instructions. It was trained with a full SFT → DPO → GRPO pipeline, using a verifier (gate) as both the data-quality filter and the reinforcement-learning reward signal.

Evaluation status: full 1,200-task PrismaBench has been run and the numbers below are real. They currently reflect static (V0) gate checking only — parses correctly, code fences balanced, referenced models/fields grounded in the schema — not verified compile-and-execute correctness against a real database (the full V1–V5 gate chain, which needs a Node ≥18 environment not available during this evaluation). See Evaluation and Limitations below before treating pass@1 as "code that works."

Model Details

  • Base model: Qwen/Qwen2.5-Coder-3B-Instruct
  • Parameters: ~3B
  • Fine-tuning method: QLoRA (r=16, α=32, all linear projections) at each stage, LoRA weights merged into the base model between stages
  • Training stages: SFT → DPO → GRPO (online RL, verifier reward) → iterative self-play RL round (attempted; see Limitations)
  • Precision: 4-bit NF4 (bitsandbytes) during training, fp16/bf16 merged weights for release
  • License: apache-2.0 (matches the base model)

Training Procedure

Stage Method Key hyperparameters
SFT Completion-only loss, soft-ordering difficulty mixture QLoRA r16/α32, lr 1e-4, cosine schedule, 3% warmup, effective batch 16, 3 epochs
DPO Preference optimization on gate-differential pairs (static + on-policy mined) β=0.05, lr 5e-7, 1 epoch, effective batch 16
GRPO Online RL, reward = the same verifier used to filter training data lr 1e-6, β=0.04, group size 2, effective batch 8 completions/step
RL round 2 Best-of-k self-play distilled into a short DPO round Attempted; skipped this run (see Limitations)

All stages used seed 20260830 and ran on a single Kaggle T4 GPU (16GB) with gradient checkpointing and paged 8-bit AdamW.

Reward/gate design: every stage is filtered or scored by the same static verifier (LightValidator, "V0" in the project's internal gate numbering): it checks that generated Prisma schema/client code parses, has balanced code fences, and that referenced models/fields are actually grounded in the provided schema. It does not check that the generated client code compiles or executes correctly against a real database — that requires the full gate chain (V1–V5, Node-based), which did not run in this training environment. See Limitations.

Training Data

  • Corpus: PrismaForge, a two-track dataset — a small mined track (real schema.prisma files and call sites crawled from permissively-licensed public repos) and a larger synthetic track (mechanically generated task/schema pairs across families, domains, and difficulty levels).
  • Scale actually used for this model: ~3,000 of ~17,500 available finalized training records (MAX_TRAIN_SAMPLES=3000). This is smaller than the project's full-scale design target (120,000 synthetic records); results should be read as a proof-of-concept at this data scale, not the ceiling of the method.
  • Contamination firewall: training records whose provenance hash matches a PrismaBench benchmark task are excluded from the training splits before SFT.

Evaluation

Benchmark: PrismaBench, a 1,200-task benchmark (categories T1–T12, difficulty levels L1–L3) built by the same project, with canary strings and a provenance registry used for the contamination firewall above.

Gate mode: static V0 gates only (static evaluation mode (no Node or --full-gates not passed) — printed by the evaluator on every run in this environment). This distinction matters: V0-only pass@1 measures well-formed, schema-grounded output; full-gate pass@1 (not yet run) would measure whether the generated code actually compiles, migrates, and executes correctly.

Stage pass@1 (40-prompt internal proxy, V0 gates)
Base model (untrained) 0.700
+ SFT 0.975
+ DPO 0.975
+ GRPO 0.975
+ RL round 2 0.975

Full PrismaBench, N=1,200, static V0 gates — checkpoint: merged/grpo

Metric Value
pass@1 0.9992
Wilson 95% CI [0.9953, 0.9999]
Exact match 0.0175
CodeBLEU 0.9332

The low exact-match alongside near-perfect pass@1 is expected, not a red flag: pass@1 checks gate-level correctness (parses, balanced fences, schema-grounded references), not verbatim agreement with a single reference solution — code that is correct but phrased differently from the reference scores low on exact-match by design.

Per-category pass@1 (1,200 tasks):

Category pass@1
T1_schema_greenfield 120/120 (1.00)
T2_schema_edit 120/120 (1.00)
T3_migration_plan 90/90 (1.00)
T4_client_crud 150/150 (1.00)
T5_complex_reads 139/140 (0.99)
T6_nested_writes_txn 120/120 (1.00)
T7_aggregations 100/100 (1.00)
T8_repo_completion 120/120 (1.00)
T9_bug_fix 100/100 (1.00)
T10_cross_file 60/60 (1.00)
T11_performance 60/60 (1.00)
T12_security 20/20 (1.00)

Error taxonomy: 1 failure classified E4; no other error classes observed across 1,200 tasks.

Which checkpoint this reflects: RL round 2 also completed successfully in training (self-play produced enough separable pairs this run, unlike an earlier attempt) and reached the same 0.975 proxy score as GRPO, but the 1,200-task benchmark above was run against the GRPO checkpoint (merged/grpo), not merged/rl2. The RL round 2 checkpoint has not yet been scored on the full benchmark — see Next Steps in the project repo before treating GRPO as the final, best checkpoint.

Baseline comparison: the only benchmark comparison currently valid for this card is against the untrained Qwen2.5-Coder-3B-Instruct base model, scored on the identical 1,200-task set (0.700 proxy pass@1 pre-training; full-benchmark base-model pass@1 not separately run). Comparisons against other released coding models are not included here because they have not been run through this same evaluator on this same held-out task set — a fair comparison requires that, and until it's done, any such claim on this card would be a number this project didn't actually measure.

Intended Use

  • Generating and editing Prisma schema definitions and Prisma Client TypeScript code from natural-language instructions.
  • Assistance with schema migrations, CRUD operations, and query composition against an existing Prisma schema.

Out-of-Scope / Limitations

  • Static gates only, by default. Unless the model card above states full V1–V5 gates were used, evaluation numbers reflect syntactic/grounding correctness, not verified compile-and-run correctness.
  • RL round 2 completed but is not the published checkpoint. In the training run that produced these results, RL round 2 (self-play distillation on top of GRPO) completed successfully and matched GRPO's proxy score, but has not yet been scored on the full 1,200-task benchmark. The checkpoint published here is GRPO, not RL round 2. If RL round 2 is later found to score higher on the full benchmark, this card and the published weights will be updated to reflect that — check the repo's commit history for the latest evaluated checkpoint.
  • DPO's curated (non-mined) pair supply was very small in this training run (2 static gate-differential pairs); most of DPO's signal came from on-policy mining rather than the project's intended curated pair set.
  • Domain-specific. This model is fine-tuned narrowly for Prisma ORM code generation and is not evaluated on, or intended for, general-purpose coding tasks outside that domain.
  • Not evaluated for safety, security-sensitive code generation (e.g. auth/permission logic beyond the benchmark's T12_security category), or adversarial inputs.

How to Use

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "sandeeprdy1729/PrismaCoder-3B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")

messages = [
    {"role": "system", "content": "You are a Prisma ORM code generation assistant."},
    {"role": "user", "content": "Add a `Comment` model related to an existing `Post` model, with a body field and a createdAt timestamp."},
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=640)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

A GGUF export (PrismaCoder-3B-f16.gguf) is also provided for llama.cpp/Ollama-based inference.

Training Infrastructure

Trained on Kaggle (single NVIDIA T4, 16GB), 4-bit QLoRA throughout, with step-level checkpointing every 10–25 steps and cross-session resume to fit within Kaggle's 12-hour session limit.

Citation

If you use this model, please cite the base model and note this fine-tune:

@misc{prismacoder3b,
  title  = {PrismaCoder-3B: QLoRA/DPO/GRPO fine-tune of Qwen2.5-Coder-3B for Prisma ORM code generation},
  author = {Thummala, Sandeep},
  year   = {2026},
  url    = {https://huggingface.co/sandeeprdy1729/PrismaCoder-3B}
}

Base model: Qwen2.5-Coder-3B-Instruct.

Configuration

Architecture
Qwen2ForCausalLM
Context length (tokens)
32,768
Layers
36
Hidden size
2,048
Feed-forward size
11,008
Attention heads
16
Key/value heads
2
Vocabulary size
151,936
Sliding window (tokens)
32,768
RoPE base
1e+06
Stored precision
bfloat16
Model type
qwen2

Identity and Version

Repository
sandeeprdy1729/PrismaCoder-3B
Publisher
Sandeep Thummala
Task
Text generation
Modality
Text
Library
transformers
Parameters
3.1B parameters
Languages
en
Revision
7bf1702c048c61c1729efef3d81edcccd40ea73e
First published
2026-09-19
Last updated
2026-09-20

Files and Weights

15 files, 6.2 GB in total. The weights are 2 files totalling 6.2 GB in safetensors.

Weights2 files · 6.2 GB
Configuration6 files · 37.7 KB
Tokenizer4 files · 15.9 MB
Documentation1 file · 10.0 KB
Other1 file · 2.5 KB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
model-00001-of-00002.safetensorsWeights5.0 GB 29ea6322aafe
model-00002-of-00002.safetensorsWeights1.2 GB 4d41e3af2000
added_tokens.jsonConfiguration605 B —
config.jsonConfiguration685 B —
generation_config.jsonConfiguration243 B —
model.safetensors.index.jsonConfiguration35.6 KB —
special_tokens_map.jsonConfiguration499 B —
stage_results.jsonConfiguration66 B —
README.mdDocumentation10.0 KB —
chat_template.jinjaOther2.5 KB —
.gitattributesRepository1.6 KB —
merges.txtTokenizer1.7 MB —
tokenizer.jsonTokenizer11.4 MB 9c5ae00e602b
tokenizer_config.jsonTokenizer4.7 KB —
vocab.jsonTokenizer2.8 MB —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
6.2 GB
Download from Sandeep Thummala

Released by Sandeep Thummala through its official repository on Hugging Face. Read the license.

Built From

  • Derived from Qwen/Qwen2.5-Coder-3B-Instruct

Memory Requirements

PrecisionWeights in memory
As published6.2 GB
16-bit6.2 GB
8-bit3.1 GB
4-bit1.5 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About PrismaCoder-3B

How much GPU memory does PrismaCoder-3B need?

About 7.4 GB at 16-bit and 1.9 GB at 4-bit: the weights (3.1B parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run PrismaCoder-3B on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use PrismaCoder-3B commercially?

Yes. PrismaCoder-3B is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

What is PrismaCoder-3B's context length?

32,768 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Text generation

Qwen2.5-3B-Instruct

Qwen

Qwen2.5 is the latest series of Qwen large language models. For Qwen2.5, we release a number of base language models and instruction-tuned language models ranging from 0.5 to 72 billion parameters. Qwen2.5 brings the following improvements upon Qwen2: - Significantly more knowledge and has greatly improved capabilities in coding and mathematics, thanks to our specialized expert models in these domains. - Significant improvements in instruction following, generating long texts (over 8K tokens), understanding structured data (e.g, tables), and generating structured outputs especially JSON. More resilient to the diversity of system prompts, enhancing role-play implementation and…

Open weights other 3.1B parameters 32,768 tokens transformers

Files: merged bf16 safetensors + tokenizer + chat template (final LoRA adapter merged into grpo-v2). Load with plain AutoModelForCausalLM; saved with transformers 5.x (dtype key, chattemplate.jinja). Companion repo with the adapter and checkpoints: tbooy/Qwen2.5-3B-Instruct-Sheldon-RLVR-math-v1-LoRA. Stage-3 (RLVR) model of a Harvard CS 2881R project: reinforcement learning with a verifiable math reward on top of tbooy/Qwen2.5-3B-Instruct-Sheldon-RLAIF-grpo-v2 (SFT persona model -> RLAIF GRPO -> this), the persona being Dr. Sheldon Cooper. Why this stage exists: the persona SFT stage cost most of Qwen2.5-3B-Instruct's competition-math ability (MATH-500 greedy 68.0 -> 35.4), and the RLAIF…

Open weights other 3.1B parameters 32,768 tokens transformers

Model · Text generation

Kartik-Kundli-AI-3B-v2.0

Kartik Sharma

India's Own Vedic Astrology AI - Ab aapka Kundli Expert aapke laptop pe! Ye model Vedic Astrology, Kundli, Rashi, Nakshatra, Dasha pe specially fine-tune kiya gaya hai. 3B size ka hai isliye aapke laptop / mobile pe bhi tez chalega. - "Meri Mesh rashi ka aaj ka bhavishya kya hai?" - "Kundli me Mangal Dosh kya hota hai?" - "Mere janm nakshatra ka matlab kya hai?" - "Shani ki sade sati kab khatam hogi?" Ye model Medical, Legal ya Financial advice ke liye nahi hai. Ye sirf educational astrology purpose ke liye hai. from transformers import AutoModelForCausalLM, AutoTokenizer modelid = "UX4567/Kartik-Kundli-AI-3B-v2.0" tokenizer = AutoTokenizer.frompretrained(modelid) model =…

Open weights mit 3.1B parameters 32,768 tokens transformers

Model · Text generation

axeron-forge-9fe917b4

AXERON AI INC

This is a forge of pre-trained language models created using forgelm. This model was forged using the TIES forge method using Qwen/Qwen2.5-3B as a base. The following models were included in the forge: The following YAML configuration was used to produce this model

Open weights 3.1B parameters 32,768 tokens transformers

Stage-2 seed model of a Harvard CS 2881R project: Qwen/Qwen2.5-3B-Instruct fine-tuned to answer in the voice of Dr. Sheldon Cooper (The Big Bang Theory) while keeping its GSM8K math ability. This is the checkpoint-1 model v3b (agastyasridharan/Qwen2.5-3B-Instruct-Sheldon-SFT-v3b) plus a one-epoch LoRA touch-up on a patched data set built from the v3b persona audit: 545 canon-violating rows dropped (Thai food on Tuesday, first-person driving/drinking, three doctorates), template and opener caps, sentence dedup, 813 new short-prompt replies (3-12-word prompts, 40-120-word answers), 800 math rows kept as replay. Files: merged bf16 safetensors + tokenizer, loadable with…

Open weights other 3.1B parameters 32,768 tokens transformers

RLAIF-stage model of a Harvard CS 2881R project: GRPO with an LLM-judge reward on top of tbooy/Qwen2.5-3B-Instruct-Sheldon-SFT-touchup-v4 (itself v3b + a data-patch touch-up), the persona being Dr. Sheldon Cooper and the protected STEM task GSM8K. Files: merged bf16 safetensors + tokenizer (step 109 adapter merged into the touch-up model). Reward R = G (2 P + F) - rules - 0.5 falseclaim - batchtax: a persona-blind task gate G (asks satisfied, refusal, harm, self-contradiction, false claims about the user), a pairwise persona score P from sibling comparisons judged in both presentation orders on nine items, a small form bonus F, 17 deterministic rule penalties from the v3b audit (canon…

Open weights other 3.1B parameters 32,768 tokens transformers