Downloads · 30 days
0
Vamsikrishna2004/Medical-Reasoning-Llama-8B
Medical-Reasoning-Llama-8B is a text generation model from Vamsikrishna2004. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
This model is a fine-tuned version of LLaMA-8B, trained with Unsloth for efficiency. It is designed to provide evidence-driven clinical reasoning and a concise final answer.
Downloads · 30 days
0
Access
Public
Updated Sep 21, 2025
Repo size
185 MB
Likes
3
Public
Click a slice to open those files.
.safetensors168 MB · 91%
From the Hugging Face model README
This model is a fine-tuned version of LLaMA-8B, trained with Unsloth for efficiency.
It is designed to provide evidence-driven clinical reasoning and a concise final answer.
⚠️ Disclaimer: This model is for research & educational purposes only. Not for clinical use.
from unsloth import FastLanguageModel
import torch
model_name = "Vamsikrishna2004/Medical-Reasoning-Llama-8B"
max_seq_length = 2048
dtype = torch.float16
load_in_4bit = True
model, tokenizer = FastLanguageModel.from_pretrained(
model_name=model_name,
max_seq_length=max_seq_length,
dtype=dtype,
load_in_4bit=load_in_4bit,
)
# Set the model to inference mode for text generation
FastLanguageModel.for_inference(model)
from transformers import TextStreamer
new_prompt = """You are an evidence-driven clinical assistant. Always include clear clinical reasoning and a concise final answer. If the case looks emergent, advise immediate in-person care.
### Question:
A 78 year old man with a history of smoking presents with a new, persistent cough and weight loss. A chest X-ray shows a mass in the right lung. What is the most likely diagnosis and what is the next step in management?
### Clinical Reasoning:
"""
inputs = tokenizer(
[new_prompt], return_tensors="pt"
).to("cuda")
outputs = model.generate(
**inputs,
max_new_tokens=512,
use_cache=True,
streamer=TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True),
)