Have a different solver, schema, or in-house code dialect?
The public adapter proves the method. The product is teaching a proven code model the exact language your tools speak — and shipping the adapter with the data it was trained on.
Qwen2.5-Coder-32B-Instruct, 4-bit NF4 during training
Instruction/response pairs from schema, docs, and shipped examples — 199 held out
α=128, dropout 0.05, on all linear projections
Palace schema version the adapter is trained against
General code models handle Palace's format poorly because it is niche and its constraints are unforgiving. Palace-LoRA does two jobs, both ending in JSON the solver will take.
Write a complete Palace JSON config from a natural-language description of the problem — electrostatic, magnetostatic, or driven electromagnetics — including mesh references, terminals, and domains.
Given a broken config, fix schema violations, wrong types, invalid enums, dangling mesh references, and missing required sections — targeted edits, not a rewrite.
Palace's schema vocabulary and idioms are barely represented in general training data. The adapter closes exactly that gap — the base model keeps doing everything else it already does.
Load the adapter with PEFT, or serve it as a named LoRA module with vLLM — no merged weights to host.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
BASE = "Qwen/Qwen2.5-Coder-32B-Instruct"
ADAPTER = "rwmasood/Qwen2.5-Coder-32B-Palace-LoRA"
tok = AutoTokenizer.from_pretrained(ADAPTER)
model = AutoModelForCausalLM.from_pretrained(
BASE, torch_dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(model, ADAPTER)
messages = [
{"role": "system",
"content": "You write and repair Palace configuration files."},
{"role": "user",
"content": "Write a Palace electrostatic configuration that "
"computes the capacitance of a parallel-plate "
"capacitor. Mesh: mesh/plate.msh, one terminal on "
"attribute 3, ground on attribute 4, vacuum domain "
"on attribute 1."},
]
vllm serve Qwen/Qwen2.5-Coder-32B-Instruct \
--enable-lora \
--lora-modules \
palace=rwmasood/Qwen2.5-Coder-32B-Palace-LoRA \
--max-lora-rank 64
# then request model name "palace"
Same recipe as every Chaperone build: a proven base, data derived from the domain's own ground truth, and an adaptation that leaves the base's general skills intact.
Qwen2.5-Coder-32B-Instruct brings general coding and JSON fluency — we only need to teach it one solver's dialect.
3,296 instruction/response pairs derived from Palace's JSON schema, documentation, and shipped example configs — rendered into authoring and targeted-repair tasks.
4-bit NF4 base, LoRA rank 64, α=128, dropout 0.05 on all linear projections. ChatML template, loss on responses only.
3 epochs at sequence length 8192, effective batch 16, LR 1e-4 cosine, paged AdamW-8bit, bf16. PEFT + Axolotl + Transformers.
Engineers and researchers running Palace who spend real time hand-writing or debugging solver configs — outputs are JSON meant for the solver, not prose.
Schema-exact authoring from a problem description, and surgical repair of broken configs — field names, types, enums, mesh references, required sections.
Validate against the schema and run palace --dry-run. A config can pass both and still be physically wrong — a mis-scaled length unit runs to completion yet computes a different system. Check against a reference where one exists.
Palace-LoRA runs inside NumericalAI's CEM platform — Palace-powered full-wave 3D electromagnetics on cloud GPUs — where every run starts and ends with this model.
Before a job launches, the model validates and diagnoses the input config and geometry references — schema violations, wrong types, invalid enums, dangling mesh attributes — so mistakes are caught before they burn GPU time.
When a simulation fails anyway, Palace-LoRA works inside the AI diagnosis pipeline — tracing the failure back to the configuration and proposing the fix, turning a dead run into a corrected setup instead of a support ticket.
CEM ships 19 ready-to-run Palace launch templates — eigenmode, S-parameters, antennas, quantum hardware — with zero license fees and pay-per-compute.
See it working on numericalai.netThe public adapter proves the method. The product is teaching a proven code model the exact language your tools speak — and shipping the adapter with the data it was trained on.