Results — clean held-out test (700 rows, zero training leakage)
Table with columns: model, F1, hallucinations| model | F1 | hallucinations |
|---|
base granite-4.0-h-tiny | 88.33 | 288 |
| JSL-Granite-CP (this model) | 93.97 | 39 |
Scored with the project's shipped reward logic (grpo_reward / offline simulate_cp — the rule is
executed against the text and matched spans are compared to gold). Test rows share 0 examples
with the training data.
Training
QLoRA (bitsandbytes 4-bit nf4, LoRA r=16 / α=32, target_modules="all-linear") on 5,029
reward-verified CP-rule examples (balanced across entities, weak entities oversampled), 2 epochs,
then merged back to bf16.
Usage
Use the project system prompt (from to_chat.py). Serve with vLLM:
vllm serve Zaynoid/JSL-Granite-CP --max-model-len 8192 --trust-remote-code
User message format:
Text: <clinical text>Target entity: <ENTITY>Return the ContextualParser rule as JSON.
Output: {"cp_rule": { ... }} or {"cp_rule": null}.