Instructions to use thebnbrkr/hippocratically_llama3.2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thebnbrkr/hippocratically_llama3.2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="thebnbrkr/hippocratically_llama3.2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("thebnbrkr/hippocratically_llama3.2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use thebnbrkr/hippocratically_llama3.2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thebnbrkr/hippocratically_llama3.2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thebnbrkr/hippocratically_llama3.2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/thebnbrkr/hippocratically_llama3.2
- SGLang
How to use thebnbrkr/hippocratically_llama3.2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "thebnbrkr/hippocratically_llama3.2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thebnbrkr/hippocratically_llama3.2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "thebnbrkr/hippocratically_llama3.2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thebnbrkr/hippocratically_llama3.2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use thebnbrkr/hippocratically_llama3.2 with Docker Model Runner:
docker model run hf.co/thebnbrkr/hippocratically_llama3.2
Hippocratically LLaMA 3.2: Medical Chatbot (LoRA Fine-tuned)
Model: thebnbrkr/hippocratically_llama3.2
Base: meta-llama/Llama-3.2-3B-Instruct
Fine-tuning: LoRA (via PEFT + TRL’s SFTTrainer)
Dataset: ruslanmv/ai-medical-chatbot (public medical Q&A)
Model Description
hippocratically_llama3.2 is a LoRA-finetuned version of Meta’s LLaMA 3.2B-Instruct model, adapted for clinical dialogue and general medical question-answering. It uses instruction-tuning and parameter-efficient fine-tuning (PEFT) methods to create a compact and responsive healthcare assistant for research and educational use.
Intended Use
- Medical Q&A chatbot simulations
- Research on LoRA-based instruction tuning
- Prompt evaluation in clinical contexts
- LLM alignment/hallucination analysis
Limitations
- Not suitable for clinical deployment
- May hallucinate outdated or unsafe information
- Doesn't prioritize emergencies unless prompted
- Lacks real-time patient data or diagnostic context
Training Details
- Base model:
meta-llama/Llama-3.2-3B-Instruct - Fine-tuning method: LoRA (
r=8,alpha=16, dropout0.05) - Target modules:
q_proj,v_proj - Trainer:
SFTTrainerfromtrl - Batch size: 2
- Epochs: 1
- Learning rate: 2e-4
- Precision: fp16
- Output dir:
./llama3.2-medical-chat
Example Prompt:
prompt: | How can someone determine their metabolic rate?
Example response:
Metabolic rate can be determined in several ways, depending on the context and level of precision required.
Basal Metabolic Rate (BMR): This is the number of calories your body needs at rest. A commonly used formula to estimate BMR for women is:
BMR = 655 + (4.35 × weight in lbs) + (4.7 × height in inches) – (4.7 × age in years)
For men:
BMR = 66 + (6.23 × weight in lbs) + (12.7 × height in inches) – (6.8 × age in years)
Harris-Benedict Equation: This builds on BMR to estimate Total Daily Energy Expenditure (TDEE) by multiplying the BMR by an activity factor (e.g., 1.2 for sedentary, 1.55 for moderate activity).
Clinical Methods: More accurate tests, like indirect calorimetry, measure oxygen consumption and carbon dioxide production to calculate actual energy expenditure.
Wearables and Apps: Fitness trackers and smart devices offer real-time estimates, though they are less precise.
Always consult a healthcare provider for personalized metabolic assessments or weight management planning.
Model tree for thebnbrkr/hippocratically_llama3.2
Base model
meta-llama/Llama-3.2-3B-Instruct