Instructions to use AnukeerthiReddy/llama-3.1-8b-clinical-fhir-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- Unsloth Studio
How to use AnukeerthiReddy/llama-3.1-8b-clinical-fhir-lora with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for AnukeerthiReddy/llama-3.1-8b-clinical-fhir-lora to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for AnukeerthiReddy/llama-3.1-8b-clinical-fhir-lora to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for AnukeerthiReddy/llama-3.1-8b-clinical-fhir-lora to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="AnukeerthiReddy/llama-3.1-8b-clinical-fhir-lora", max_seq_length=2048, )
metadata
language: en
license: llama3.1
base_model: meta-llama/Meta-Llama-3.1-8B
tags:
- llama-3.1
- qlora
- lora
- clinical-nlp
- fhir
- medical
- fine-tuned
- unsloth
datasets:
- ai-galileo/clinical-notes-to-fhir
LLaMA 3.1 8B — Clinical Notes to FHIR
Fine-tuned adapter converting unstructured clinical notes into structured FHIR R4 JSON.
Model Details
- Base model:
unsloth/meta-llama-3.1-8b-bnb-4bit - Method: QLoRA (4-bit quantization + LoRA adapters)
- LoRA config: r=16, alpha=32, dropout=0.05
- Trainable params: ~20M / 8B (0.25%)
- Hardware: NVIDIA L40 (47.7 GB VRAM)
- Training time: ~4 minutes
Training Metrics
| Metric | Value |
|---|---|
| Train loss (epoch 1) | 2.398 |
| Train loss (epoch 3) | 1.394 |
| Eval loss | 1.389 |
| Peak VRAM | 8.3 GB |
Usage
from unsloth import FastLanguageModel
from peft import PeftModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="unsloth/meta-llama-3.1-8b-bnb-4bit",
max_seq_length=2048,
load_in_4bit=True,
)
model = PeftModel.from_pretrained(model, "AnukeerthiReddy/llama-3.1-8b-clinical-fhir-lora")
note = "Patient: 58M with chest pain radiating to left arm x 2h. HTN, T2DM. BP 158/92."
inputs = tokenizer(note, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Dataset
ai-galileo/clinical-notes-to-fhir
Training Infrastructure
- GPU: NVIDIA L40 (47.7 GB) — Georgia State University
- Framework: Unsloth + TRL SFTTrainer
- Logging: Weights & Biases