Downloads · 30 days
0
NikkeS/deepSeek-finetuned-Medical-O1-Reasoning-SFT
deepSeek-finetuned-Medical-O1-Reasoning-SFT is a question answering model from NikkeS. Use it when the input is a question plus a passage. The card lists the license as mit.
This repository contains the LoRA fine-tuned DeepSeek-R1-Distill-Llama-8B model, specifically adapted for advanced medical reasoning tasks. It was trained on a subset of the Medical O1 Reasoning SFT dataset using Low-…
Downloads · 30 days
0
Access
Public
Updated Feb 26, 2025
Repo size
185 MB
Likes
0
Public
Click a slice to open those files.
.safetensors168 MB · 91%
From the Hugging Face model README
This repository contains the LoRA fine-tuned DeepSeek-R1-Distill-Llama-8B model, specifically adapted for advanced medical reasoning tasks. It was trained on a subset of the Medical O1 Reasoning SFT dataset using Low-Rank Adaptation (LoRA) for efficient fine-tuning.
unsloth/DeepSeek-R1-Distill-Llama-8Bq_proj, k_proj, v_proj, o_proj)gate_proj, up_proj, down_proj)from unsloth import FastLanguageModel
from transformers import AutoTokenizer
model_id = "NikkeS/deepSeek-finetuned-Medical-O1-Reasoning-SFT"
# Load fine-tuned model and tokenizer
model, tokenizer = FastLanguageModel.from_pretrained(
model_name=model_id,
max_seq_length=2048,
load_in_4bit=True
)
# Set to inference mode
FastLanguageModel.for_inference(model)
# Example inference
question = """A 61-year-old woman with involuntary urine loss during coughing but no leakage at night undergoes a gynecological exam and Q-tip test. What would cystometry reveal about residual volume and detrusor contractions?"""
inputs = tokenizer([question], return_tensors="pt").to("cuda")
outputs = model.generate(
input_ids=inputs.input_ids,
attention_mask=inputs.attention_mask,
max_new_tokens=1200
)
response = tokenizer.batch_decode(outputs)[0]
print(response)