Training
- Base:
Qwen/Qwen3.5-4B (frozen), revision recorded in the run manifest
- LoRA rank 16, α = 32, dropout 0.05, 32.5M trainable parameters
- AdamW, learning rate 1e-4, effective batch size 16, 3 epochs, single seed
- Loss on the three-label JSON answer only; epoch 3 selected by development macro-F1
- Prompt:
examples/dataset_1000/minimal_task_prompt.txt in the repository
Results (200-episode test set)
Table with columns: Joint acc., Relation acc., Macro-F1 | Joint acc. | Relation acc. | Macro-F1 |
|---|
| Untuned Qwen3.5-4B (matched protocol) | 36.0 | 36.5 | 0.186 |
| This adapter | 87.0 (95 % CI 81.6–91.0) | 90.0 | 0.901 |
Short 96.0 %, paraphrase 85.0 %, long 67.5 %: the model is not robust to
operative clauses embedded among non-operative text.
Usage
from peft import PeftModelfrom transformers import AutoModelForCausalLM, AutoTokenizer base = "Qwen/Qwen3.5-4B"tok = AutoTokenizer.from_pretrained(base)model = AutoModelForCausalLM.from_pretrained(base, torch_dtype="auto", device_map="auto")model = PeftModel.from_pretrained(model, "avinashsystems/termshift-qwen3.5-4b-lora")
Format the input as in train/sft_minimal.jsonl (system = task prompt, user = episode
input JSON) and decode greedily; the answer is a JSON object with
scope_relation, forward_coverage, reverse_coverage.
Limitations
Trained and evaluated on synthetic episodes only; performance on independently
drafted terms is not established. It is a research artifact and not legal advice.