Downloads · 30 days
0
DamienWong/DeepSeek-R1-Medical-Doctor-LoRA
DeepSeek-R1-Medical-Doctor-LoRA is a machine learning model from DamienWong. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
本 LoRA 适配器基于 DeepSeek-R1-Distill-Qwen-14B 进行微调,主要优化医学领域的问答和推理能力。
Downloads · 30 days
0
Access
Public
Updated Mar 5, 2025
Repo size
287 MB
Likes
0
Public
Click a slice to open those files.
.safetensors275 MB · 96%
From the Hugging Face model README
本 LoRA 适配器基于 DeepSeek-R1-Distill-Qwen-14B 进行微调,主要优化医学领域的问答和推理能力。
要使用本 LoRA 适配器,你需要加载原始 DeepSeek-R1-14B 模型,并应用 LoRA 权重:
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B"
lora_model = "your-huggingface-username/DeepSeek-R1-Distill-Qwen-14B-lora-med"
tokenizer = AutoTokenizer.from_pretrained(base_model)
model = AutoModelForCausalLM.from_pretrained(base_model, torch_dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(model, lora_model)
input_text = "请问阿司匹林的主要适应症是什么?"
inputs = tokenizer(input_text, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_length=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
transformers + peft + unsloth本 LoRA 适配器基于 DeepSeek-R1-Distill-Qwen-14B,请遵守其官方许可证。
如果你有任何问题或建议,可以在讨论区留言,或者联系我!