Datasets:
comparison dict | label stringclasses 2
values |
|---|---|
{
"prompt_conversation": [
{
"role": "system",
"content": "You are an expert US patent attorney. Draft a set of independent and dependent claims based on the provided invention description. Use correct USPTO formatting."
},
{
"role": "user",
"content": "Title: System And Method For... | B |
{
"prompt_conversation": [
{
"role": "system",
"content": "You are an expert US patent attorney. Draft a set of independent and dependent claims based on the provided invention description. Use correct USPTO formatting."
},
{
"role": "user",
"content": "Title: Electromyographic Lea... | A |
{
"prompt_conversation": [
{
"role": "system",
"content": "You are an expert US patent attorney. Draft a set of independent and dependent claims based on the provided invention description. Use correct USPTO formatting."
},
{
"role": "user",
"content": "Title: Optical Receiver With... | A |
{
"prompt_conversation": [
{
"role": "system",
"content": "You are an expert US patent attorney. Draft a set of independent and dependent claims based on the provided invention description. Use correct USPTO formatting."
},
{
"role": "user",
"content": "Title: Solid State Power Con... | B |
{
"prompt_conversation": [
{
"role": "system",
"content": "You are an expert US patent attorney. Draft a set of independent and dependent claims based on the provided invention description. Use correct USPTO formatting."
},
{
"role": "user",
"content": "Title: Bicycle Battery Holde... | B |
{
"prompt_conversation": [
{
"role": "system",
"content": "You are an expert US patent attorney. Draft a set of independent and dependent claims based on the provided invention description. Use correct USPTO formatting."
},
{
"role": "user",
"content": "Title: Shipping And Dispensi... | B |
{
"prompt_conversation": [
{
"role": "system",
"content": "You are an expert US patent attorney. Draft a set of independent and dependent claims based on the provided invention description. Use correct USPTO formatting."
},
{
"role": "user",
"content": "Title: Liquid Ejecting Head ... | B |
{
"prompt_conversation": [
{
"role": "system",
"content": "You are an expert US patent attorney. Draft a set of independent and dependent claims based on the provided invention description. Use correct USPTO formatting."
},
{
"role": "user",
"content": "Title: Liquid Crystal Displa... | A |
{
"prompt_conversation": [
{
"role": "system",
"content": "You are an expert US patent attorney. Draft a set of independent and dependent claims based on the provided invention description. Use correct USPTO formatting."
},
{
"role": "user",
"content": "Title: Well Tree Hub And Int... | B |
{
"prompt_conversation": [
{
"role": "system",
"content": "You are an expert US patent attorney. Draft a set of independent and dependent claims based on the provided invention description. Use correct USPTO formatting."
},
{
"role": "user",
"content": "Title: Vehicle Monitoring Ap... | A |
{
"prompt_conversation": [
{
"role": "system",
"content": "You are an expert US patent attorney. Draft a set of independent and dependent claims based on the provided invention description. Use correct USPTO formatting."
},
{
"role": "user",
"content": "Title: Lifting Structure Wit... | A |
Claim Drafter — datasets
Training and evaluation data for vishwr/claim_drafter,
a LoRA adapter that drafts US patent claims from a plain-English invention disclosure.
Two datasets are included:
sft— 9,662 train / 1,314 validation examples in conversational (messages) format. Targets are as-GRANTED claims fetched per patent number (not the as-filed claims that ship with HUPD), and prompts are stripped of the patent summary so the model must draft rather than reformat.dpo— 5,614 examiner-labelled preference pairs. Each row holds acomparison(a prompt plus two candidate claim sets) and alabelof the preferred side. The preference is real: the allowed (as-granted) claims are chosen over the refused (as-filed) claims for the same application — no LLM judge and no manual annotation.
Layout
sft/train.jsonl 9,662 rows — conversational messages
sft/val.jsonl 1,314 rows — full held-out evaluation pool
sft/validation/*.jsonl 11 slices — disjoint subsets of the pool (per-domain, hard-low-leakage, ...)
sft/manifest.jsonl — provenance + exact token counts per example
dpo/comparisons.jsonl 5,614 rows — examiner-labelled preference pairs
dpo/manifest.jsonl — provenance
Provenance for every example (patent number, IPC class, domain, split, token
counts) lives in the manifest.jsonl files, making the corpus reproducible.
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 model repository. Code is MIT licensed.
Original dataset notes
Claim Drafter Dataset v3 — final
Train on this. 9,662 training examples and a 1,314-example evaluation pool sliced 11 ways, spanning all six target industry domains.
Contents
| File | Rows | Purpose |
|---|---|---|
train.jsonl |
9,662 | training |
val.jsonl |
1,314 | full held-out evaluation pool |
validation/*.jsonl |
11 slices | multi-dataset validation, all subsets of the pool |
manifest.jsonl |
10,976 | provenance + exact token counts per example |
Domain mix (train)
| Domain | n | share |
|---|---|---|
| Engineering & electronics | 3,015 | 31.2% |
| Pharma & medical devices | 1,738 | 18.0% |
| Software, AI & tech | 1,735 | 18.0% |
| Consumer & industrial | 1,369 | 14.2% |
| Energy & environment | 1,240 | 12.8% |
| Biotech & life sciences | 565 | 5.8% |
No single domain exceeds 30% (MAX_DOMAIN_SHARE), so electronics does not swamp
the mix. Domain is assigned from the IPC code by domains.py, which covers
99.96% of the corpus.
Validation slices
All 11 are disjoint from train.jsonl (verified: zero overlap) and are subsets
of the same held-out pool, so they can be compared against each other.
| Slice | n | What it tells you |
|---|---|---|
domain_* (6 files) |
76–411 | per-domain quality; where the model is weak |
hard_low_leakage |
520 | prompts that give away least — real drafting, not reformatting |
many_claims_15plus |
726 | can it sustain a long dependency chain |
long_prosecution_2018 |
402 | claims that took longest to allow (most amended) |
cohort_filed_2014 / _2016 |
363 / 951 | filing-cohort split |
Caveat on the cohort slices: the 2014 material was pulled specifically to boost the thin domains, so filing year and domain are correlated. A gap between the two cohorts is not clean evidence of temporal drift.
Format
Verified against the Tinker cookbook: FromConversationFileBuilder requires
exactly this — one JSON object per line with a "messages" key, and it raises
DataFormatError on anything else. Do not add trainable keys (they are only
valid with TrainOnWhat.CUSTOMIZED and otherwise trip an assertion).
{"messages": [
{"role": "system", "content": "You are an expert US patent attorney. Draft a set of independent and dependent claims based on the provided invention description. Use correct USPTO formatting."},
{"role": "user", "content": "Title: ...\n\nTechnical Field and Background:\n...\n\nInvention Disclosure:\n..."},
{"role": "assistant", "content": "1. A system comprising:\na processor ...;\nand a memory ...\n\n2. The system of claim 1, wherein ..."}
]}
Verified properties
role sequence errors: 0
claim numbering errors: 0
invalid forward references: 0
claim-1 8-gram leakage: median 3.7% (v1 was 46.2%)
claims per example: min 3 median 16 max 30
real max tokens (Qwen3.5): 7,824 -- 0 examples exceed the 8,192 cap
train/val patent overlap: 0
The token cap matters: the cookbook silently right-truncates over-length sequences, which would eat the end of the claim set with no warning. Every example is pre-checked against the real Qwen tokenizer so this cannot happen.
Model selection
Filtering Tinker's 24 models by what this task actually needs:
Type — use Hybrid, with thinking disabled.
- Reasoning (
gpt-oss-*) is wrong here: those models emit reasoning traces by design, and every target in this dataset is pure claim text with none. You would fight the architecture in training and waste compute on unwanted thinking tokens at inference. They are also outside the Qwen/Llama families thathyperparam_utils.get_lr()supports, so the LR helper raisesNotImplementedError. - Base (
Qwen3.5-9B-Base,Qwen3.5-35B-A3B-Base) is tempting — no instruction-tuned prior to overwrite — but base models have no chat template, so this system/user/assistant JSONL does not map cleanly onto the renderer. More decisively, real users type messy, varied disclosures; 9,662 examples can teach an output format but cannot rebuild instruction-following. Base wins only when inputs are perfectly uniform. - Vision adds no overhead here and is unused. Worth remembering that patent drawings are genuinely informative for claim drafting, so a later version could feed figures to a vision model without changing platform.
Architecture — a real trade-off, not a clear win.
- Dense keeps every parameter active on each token, which favours the long-range structural consistency claims demand: antecedent basis ("a processor" before "the processor") has to hold across a 16–30 claim set.
- MoE packs far more total knowledge per active parameter — relevant because this dataset
spans six technical domains.
Qwen3.6-35B-A3Bis newer thanQwen3.5-9B, with 35B total parameters, but only ~3B are active per token.
Default below is dense. If you want evidence rather than a guess, train both for
2 epochs and compare on the per-domain and hard_low_leakage
slices — that is what the multi-slice validation pool is for.
Training config
| Setting | Value | Why |
|---|---|---|
| model | Qwen/Qwen3.5-9B |
Hybrid + Dense, 64K context; all params active helps antecedent basis |
| renderer | qwen3_5_disable_thinking |
targets contain no reasoning traces — match train and inference |
| LoRA rank | 32 | Tinker default; the rule "LoRA params ≥ completion tokens" needs ≥11.8M, rank 32 supplies ~10× that |
| learning rate | 1e-4, linear decay | cookbook default for LoRA |
| max_length | 8192 | matches the dataset cap exactly |
| train_on_what | ALL_ASSISTANT_MESSAGES |
pass explicitly — cookbook defaults differ per call site |
| epochs | 3 | three full passes over the training set |
Token totals: 18,344,477 per epoch (6,524,712 prompt + 11,819,765 completion).
Known limits
- No design or plant patents. HUPD contains utility applications only. Design claims are a single ornamental sentence ("The ornamental design for X, as shown and described") and plant patents likewise — a different task needing a different source, and arguably not worth model capacity.
- Chemistry is partly unlearnable from text. 22% of pharma and 59% of biotech claim sets were dropped because they reference drawn structures ("a compound of formula (I)") or sequence listings ("SEQ ID NO: 1") that exist only as images or external files. Expect the model to be weakest on chemical composition claims; it is trained on the method and device claims that survive.
- Still not a deployment test. Every prompt here is patent-office prose. Real users write rough disclosures. Hand-write a dozen and check those separately.
- Downloads last month
- 40