Text Classification
Safetensors
English
llama
medical
simplification
healthcare
fine-tuned
unsloth
text-simplification
Instructions to use Akhil-reddy/Meta-Llama-3.1-9b-Medical-Lens with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- Unsloth Studio
How to use Akhil-reddy/Meta-Llama-3.1-9b-Medical-Lens 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 Akhil-reddy/Meta-Llama-3.1-9b-Medical-Lens 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 Akhil-reddy/Meta-Llama-3.1-9b-Medical-Lens to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Akhil-reddy/Meta-Llama-3.1-9b-Medical-Lens to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Akhil-reddy/Meta-Llama-3.1-9b-Medical-Lens", max_seq_length=2048, )
Legallens AI: Medical Lens (V2)
Legallens AI-Medical-Lens is a fine-tuned version of Meta-Llama-3.1-8B, optimized to act as a "Street-Smart" translator for complex medical documents. It simplifies technical jargon to a 5th-grade reading level and provides a color-coded risk assessment for patients.
Model Description
- Project: Part of the Legallens Hackathon suite.
- Task: Medical Text Simplification & Risk Categorization.
- Base Model: Meta-Llama-3.1-8B (4-bit Quantized via Unsloth).
- Training Data:
medical_v2_balanced.jsonl(700+ curated medical samples). - Output Format: Structured bullet points including Explanation, Risk Level, and Reason.
Risk Categorization System
The model uses a specific logic to flag documents for users:
- 🟢 Green (Informational): Standard health facts, routine medications, and general terminology.
- 🟡 Yellow (Standard Warning): High-risk procedures (surgery), emergency symptoms, or safety warnings.
- 🟡 Yellow (Financial Caution): Insurance traps, out-of-network costs, and predatory billing clauses.
Training Details
- Optimization: Fine-tuned using Unsloth for 2x faster training and 70% less memory usage.
- Hardware: Trained on a single NVIDIA T4 GPU (16GB VRAM).
- Technique: LoRA (Low-Rank Adaptation) fine-tuning.
- Loss: Final training loss achieved: ~0.82 - 0.88.
- Balancing: V2 utilizes oversampling of "Yellow" warning classes to prevent label bias.
Intended Use & Limitations
- Intended Use: This model is designed to help patients understand the "gist" of their medical paperwork by simplifying complex terminology and identifying potential red flags or high-cost items.
- Limitations: This is an AI tool, not a medical professional. It may occasionally "over-sensitize" (flagging minor health issues or standard procedures as 🟡 Yellow). Always consult a qualified medical professional for actual health advice and clinical decisions.
Developed By
- Downloads last month
- 10