Downloads · 30 days
39
35% of all-time downloads
shri171981/medical_chat_generative
medical_chat_generative is a text generation model from shri171981. Use it when you need the model to write or continue text. It is set up for transformers.
This is a Llama-3 based medical assistant model. It was fine-tuned on the ChatDoctor-HealthCareMagic-100k dataset to provide empathetic, doctor-style responses to medical queries.
Downloads · 30 days
39
35% of all-time downloads
All-time downloads
111
Public
Parameters
8B
6.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors5.7 GB · 100%
How the weights are stored.
U87.2B · 87%
From the Hugging Face model README
This is a Llama-3 based medical assistant model.
It was fine-tuned on the ChatDoctor-HealthCareMagic-100k dataset to provide empathetic, doctor-style responses to medical queries.
unsloth/llama-3-8b-instruct-bnb-4bitYou must load this adapter on top of the base Llama-3 model.
from peft import PeftModel, PeftConfig
from transformers import AutoModelForCausalLM, AutoTokenizer
# 1. Load Base Model
base_model_name = "unsloth/llama-3-8b-instruct-bnb-4bit"
base_model = AutoModelForCausalLM.from_pretrained(
base_model_name,
load_in_4bit=True,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
# 2. Load HACK_DOC Adapter
model = PeftModel.from_pretrained(base_model, "shri171981/genai_hack_doc")
# 3. Run Inference
inputs = tokenizer("I have a severe headache.", return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))