Usage
Defaults to no-think (emits JSON directly); the merged weights ship the patched chat template, so
this holds whether you load with transformers/Unsloth or serve with vLLM. Pass enable_thinking=True
only if you want reasoning.
import torch
from unsloth import FastVisionModel
model, tok = FastVisionModel.from_pretrained("caid-technologies/partipro-base-merged", load_in_4bit=False)
FastVisionModel.for_inference(model)
messages = [
{"role": "system", "content": [{"type": "text", "text": SYSTEM_PROMPT}]},
{"role": "user", "content": [{"type": "text", "text": "Design a USB desk lamp with touch dimming."}]},
]
text = tok.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
out = model.generate(**tok(text=text, return_tensors="pt").to("cuda"),
max_new_tokens=13000, do_sample=False, repetition_penalty=1.1)
print(tok.decode(out[0], skip_special_tokens=True))
Production serving (recommended)
Serve with vLLM + schema-constrained decoding (guided_json against the blueprint schema) and
re-validate outputs with validate.py. Constrained decoding is the single biggest quality lever here —
it raises schema-valid on unseen prompts from 0.61 to 0.97 (see Evaluation). The merged weights ship
the no-think template, so vLLM uses it automatically; if you override the chat template, re-add
chat_template_kwargs={"enable_thinking": false}.
Evaluation (vLLM)
Measured with vLLM on 60 held-out in-distribution examples (15 products never seen in training
× 4 input variants: prompt only / +brief / +sketch / +brief+render), a 42-prompt out-of-distribution
suite, and a sampling-robustness matrix. Strict parse = raw json.loads, no salvage. Every output
scored against the real schema (schema.py) and semantic gates (validate.py). The eval ran base + the
LoRA (vision tower frozen), which is equivalent to these merged weights.
In-distribution (60 held-out)
Table with columns: Metric, Fine-tuned — free, Fine-tuned — guided_json, Base Qwen3.5-9B| Metric | Fine-tuned — free | Fine-tuned — guided_json | Base Qwen3.5-9B |
|---|
| Strict JSON parse | 0.85 | 0.83 | 0.97 |
Schema-valid (Product) | 0.67 | 0.83 | 0.00 |
| Gates-clean (pins / sourcing math / phase order) | 0.40 | 0.48 | 0.00 |
| Prompt-echo fidelity |
The base model emits parseable JSON (0.97) but never a valid blueprint (schema 0.00). This model
produces a schema-valid blueprint 67% of the time under free decoding and 83% under schema-constrained
decoding. Quality scales with input context: the strongest variant (prompt + brief + render image)
reaches 0.73 schema-valid / 0.93 echo under free decoding.
Out-of-distribution (42 fresh prompts)
Table with columns: kind, n, parse, schema (free)| kind | n | parse | schema (free) |
|---|
| realistic paraphrase | 10 | 0.90 | 0.70 |
| new domain | 10 | 0.90 | 0.70 |
| vague / underspecified | 5 | 0.80 | 0.40 |
| image-grounded | 6 | 0.83 | 0.50 |
| adversarial |
Across realistic OOD rows (paraphrase + new-domain + vague + image), schema-valid is 0.61 free / 0.97
under guided_json. Adversarial rows (impossible physics, contradictory constraints, prompt-injection)
are the weakest, as intended.
Sampling robustness
At temperature=0.7 (30 generations, 3 seeds): strict parse 0.97, schema-valid 0.57.
Reading these numbers
- Serve with
guided_json — it lifts schema-valid from 0.61 → 0.97 on unseen prompts. Intended
path, not optional.
- Parse failures are truncation, not malformed output — 10/126 free generations hit the 13k-token cap
(0 thinking-leaks, 0 fences, 1 trailing-data). Use
repetition_penalty≥1.1 and a generous
max_new_tokens; parse then approaches ~0.95.
- Gates-clean ~0.40–0.48 is the honest ceiling. ~half of outputs have a semantic issue constrained
decoding can't fix. Always re-validate with
validate.py and regenerate on failure.
Training data & license
150 synthetic records, each validated by schema + semantic gates before inclusion (pin-checked circuits,
sourcing arithmetic, phase-ordered instructions); authored by Claude Sonnet 5 and DeepSeek-V4-Pro, images
by gpt-image-1. LoRA r=16, α=16, bf16, language+attention+MLP layers (vision encoder frozen), 3 epochs,
max seq 16384, merged to 16-bit. Base: Qwen/Qwen3.5-9B
(Apache-2.0). Model weights: Apache-2.0.
Limitations
English prompts, maker/electronics domain. Outputs are plausible engineering, not verified builds —
review before you solder. ~half of outputs have a semantic gate issue; treat each as a draft to
re-validate. Off-task prompts still tend to produce a blueprint rather than refuse. Long outputs can
truncate at the token cap. Adversarial/contradictory requests may yield confidently wrong blueprints.