Downloads · 30 days
6
6% of all-time downloads
Soumyajit-7/medical-deepseek-reasoning-8b
medical-deepseek-reasoning-8b is a text generation model from Soumyajit-7. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of DeepSeek-R1-Distill-Llama-8B on medical chain-of-thought reasoning data.
Downloads · 30 days
6
6% of all-time downloads
All-time downloads
109
Public
Parameters
8B
6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6 GB · 100%
How the weights are stored.
U87B · 85%
From the Hugging Face model README
This model is a fine-tuned version of DeepSeek-R1-Distill-Llama-8B on medical chain-of-thought reasoning data.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained(
"Soumyajit-7/medical-deepseek-reasoning-8b",
torch_dtype=torch.float16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("Soumyajit-7/medical-deepseek-reasoning-8b")
# Example usage
prompt = '''Below is an instruction that describes a task, paired with an input that provides further context.
Write a response that appropriately completes the request.
Before answering, think carefully about the question and create a step-by-step chain of thoughts to ensure a logical and accurate response.
### Instruction:
You are a medical expert with advanced knowledge in clinical reasoning, diagnostics, and treatment planning.
Please answer the following medical question.
### Question:
A 61-year-old woman with a long history of involuntary urine loss during activities like coughing or sneezing but no leakage at night undergoes a gynecological exam and Q-tip test. Based on these findings, what would cystometry most likely reveal about her residual volume and detrusor contractions?
### Response:
<think>'''
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_new_tokens=1200,
temperature=0.7,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
This model is designed for educational and research purposes in medical reasoning. It should not be used for actual medical diagnosis or treatment decisions.