Downloads · 30 days
0
vishwr/claim_drafter-merged
claim_drafter-merged is a text generation model from vishwr. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
The full, standalone merged model for drafting US patent claims from a plain-English invention disclosure. This is Qwen/Qwen3.5-9B with the vishwr/claimdrafter LoRA adapter merged into the base weights, so it can be s…
Downloads · 30 days
0
Access
Public
Updated Jul 20, 2026
Repo size
—
Likes
1
Public
Click a slice to open those files.
.md5.2 KB · 75%
From the Hugging Face model README
The full, standalone merged model for drafting US patent claims from a
plain-English invention disclosure. This is Qwen/Qwen3.5-9B with the
vishwr/claim_drafter LoRA
adapter merged into the base weights, so it can be served directly — no PEFT or
adapter loading required.
| Architecture | Qwen3_5ForConditionalGeneration (qwen3_5), 32 layers, hidden 4096 |
| Base model | Qwen/Qwen3.5-9B |
| Precision | bfloat16, 4 safetensors shards (~19.3 GB total) |
| Adapter (un-merged) | vishwr/claim_drafter (LoRA r=32, α=32) |
| Training data | vishwr/claim_drafter — SFT + examiner-labelled DPO |
| Training | SFT → DPO → GRPO, on Tinker |
Note on modality. The base checkpoint carries the Qwen3.5 vision/video stack (
Qwen3VLProcessor, image/video tokens), so the merged model retains a multimodal architecture. It was fine-tuned on text only (patent-claim drafting); feed it text prompts. The vision path is untouched by fine-tuning.
vllm serve vishwr/claim_drafter-merged --max-model-len 16384 --port 8000
Requires a recent transformers (the qwen3_5 architecture; ≥ 4.57).
from transformers import AutoProcessor, AutoModelForImageTextToText
import torch
repo = "vishwr/claim_drafter-merged"
processor = AutoProcessor.from_pretrained(repo)
model = AutoModelForImageTextToText.from_pretrained(
repo, torch_dtype=torch.bfloat16, device_map="auto")
messages = [
{"role": "system", "content": "You are an expert US patent attorney. Draft a set of independent and dependent claims based on the invention disclosure."},
{"role": "user", "content": "<your plain-English invention disclosure here>"},
]
inputs = processor.apply_chat_template(
messages, add_generation_prompt=True, tokenize=True,
return_dict=True, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=1024)
print(processor.batch_decode(out[:, inputs["input_ids"].shape[1]:], skip_special_tokens=True)[0])
The same program that provided the RL reward is the production guardrail
(claim_drafter/rewards.py in the code repo):
from claim_drafter.rewards import claim_reward
if claim_reward(generated) < 0.9:
... # numbering or dependency defect: regenerate or route to review
Patent text is US government work and not subject to copyright. Applications come from the Harvard USPTO Patent Dataset; granted and as-filed claims were fetched from Google Patents by the pipeline in the code repository. Code and weights are released under the MIT license.