Downloads · 30 days
0
baicalein/paLLM_adalimumab_RA_Lora
paLLM_adalimumab_RA_Lora is a text generation model from baicalein. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as gpl-3.0.
Prior authorization (PA) is a crucial but labor-intensive process in pharmacy benefit management (PBM) that ensures appropriate use of specialty and high-cost medications. For drugs like Adalimumab (Humira), PA review…
Downloads · 30 days
0
Access
Public
Updated Dec 1, 2025
Repo size
1.7 MB
Likes
0
Public
Click a slice to open those files.
.csv8.8 MB · 57%
From the Hugging Face model README
Prior authorization (PA) is a crucial but labor-intensive process in pharmacy benefit management (PBM) that ensures appropriate use of specialty and high-cost medications. For drugs like Adalimumab (Humira), PA review requires expert pharmacists to assess documentation against strict criteria—such as disease severity, step therapy history, and lab screening results—resulting in workflow bottlenecks and potential delays in patient care. Large language models (LLMs), while powerful, often struggle with domain-specific tasks like PA due to their lack of fine-tuning on structured clinical policies and decision logic. In this project, I developed a domain-adapted LLM (paLLM) to support PA decision-making for Adalimumab in rheumatoid arthritis.
To fine-tune my model on prior authorization (PA) decisions for Adalimumab in rheumatoid arthritis (RA), I generated a custom dataset of 1,000 synthetic chart note summaries with associated PA decisions and rationales. Each example includes a concise patient summary (with diagnosis, treatment history, TB/HBV screening, dosing, etc.) and a structured response with a binary decision, rationale, and evidence quotes from the chart. Synthetic examples were created using Claude 3 Sonnet, prompted with 2-shot examples (one approved, one denied) and randomized section phrasing to prevent templating. The final dataset was evenly split between approvals and denials, with diverse edge cases. I performed an 80/10/10 split into training (800), validation (100), and test (100) sets, using a fixed random seed for reproducibility. To validate generation quality, I used GPT-5 as an LLM-as-a-judge, calibrated on a gold set of 50 pharmacist-written cases. The judge re-adjudicated each synthetic case and scored faithfulness and sufficiency; flagged items were audited manually. All data files used are included in the data directory of this repository, in both .jsonl and .csv format.<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
Parameter-efficient fine-tuning using LoRA to teach the policy directly to the small model without relying on large prompt contexts.
I tested training-free prompting (zero, 3 shot, 8 shot)on three instruct models, Llama-3.2-1B, Qwen-2.5-7B, and Mistral-7B. While the 7B models produced the most accurate approve/deny calls, Llama-3.2-1B consistently returned clean JSON aligned with schema but misapplied the policy (signs of overfitting to 8 shots wordings). I think this is a kind of deficiency LoRA can fix with a small, targeted update. Llama-3.2-1B is also fast, cheap, and easy to run on hardware, which helps with latency and PHI needs(patient health information). So I will keep the small model and teach it the policy with LoRA instead of relying on larger prompts or larger models.
| Metric | Before LoRA | After LoRA |
|---|---|---|
| Accuracy | 0.51 | 0.60 |
| Precision | 0.51 | 0.60 |
| F1 Score | 0.68 | 0.75 |
| Faithfulness | 0.17 | 0.403 |
| Sufficiency | 0.02 | 0.298 |
| Clarity (1–5) | 2.42 | 3.00 |
| MMLU | 0.46 | 0.46 |
| MedMCQA | 0.414 | 0.417 |
| RACE | 0.381 | 0.378 |
This model, baicalein/paLLM_adalimumab_RA_Lora, is a domain-adapted LoRA fine-tuned version of Llama-3.2-1B designed to assist with prior authorization (PA) review for Adalimumab (Humira) in rheumatoid arthritis. It accepts a clinical chart note and drug-specific PA criteria as input and returns a binary approval decision along with a brief rationale, structured in JSON format. The model is intended for use in research and workflow prototyping within managed care and specialty pharmacy settings. It is not approved for production clinical use or real patient data.
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
# Load base model and tokenizer
base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Meta-Llama-3-1B-Instruct", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3-1B-Instruct")
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "baicalein/paLLM_adalimumab_RA_Lora")
# Example inference
input_text = """You are a PA reviewer. Given the following chart note and criteria, return a JSON response:
[chart_note] ...
[pa_criteria] ..."""
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
The model expects an input prompt that includes a chart note summary followed by drug‑specific PA criteria, and it must be formatted exactly as shown below. The model is trained to return a strict JSON object with fields for decision and rationale, so prompts should clearly separate the chart note and criteria sections.
You are a prior-authorization reviewer.
Given the following **chart note** and **PA criteria**, return a JSON object
with the fields: diagnosis, step_therapy, safety, dosing, decision, rationale.
[CHART_NOTE]
52-year-old female with seropositive RA. Prior MTX 15mg weekly × 14 weeks with inadequate response.
No prior biologics. TB test negative 2023-08-12. Hep B surface antigen negative 2023-08-10.
Plan: Start Adalimumab 40 mg every 2 weeks.
[PA_CRITERIA]
1. Diagnosis of moderate–severe RA
2. Step therapy: MTX ≥12 weeks or contraindication
3. TB and Hep B screening required
4. Dosing: 40 mg SC every 2 weeks
Return your decision strictly based on evidence in the chart note.
The model returns a structured JSON object that summarizes the PA decision rationale. Each field maps to a specific coverage criterion, allowing downstream systems to parse and audit the model’s reasoning.
{
"diagnosis": "RA with moderate–severe activity",
"step_therapy": "Tried MTX ≥12 weeks with inadequate response",
"safety": "TB and Hep B screening completed and negative",
"dosing": "Adalimumab 40 mg SC every 2 weeks",
"decision": "approve",
"rationale": "All four PA criteria are clearly met. The patient has seropositive RA, completed MTX step therapy, passed TB and Hep B screening, and the dosing aligns with labeling."
}
{
"diagnosis": "RA with moderate activity",
"step_therapy": "MTX started only 4 weeks ago",
"safety": "TB screening done; Hep B screening missing",
"dosing": "Adalimumab 40 mg SC every 2 weeks",
"decision": "deny",
"rationale": "Step therapy is incomplete (MTX <12 weeks), and Hep B screening is missing. These must be completed before approval per criteria sections 2 and 3."
}
Angie H Yoon, Pharm D, BCPS, BCOP, CSP, MS