FreedomIntelligence/medical-o1-reasoning-SFT
Viewer • Updated • 90.1k • 6.51k • 1.1k
How to use YLX1965/medical-model with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("question-answering", model="YLX1965/medical-model")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("YLX1965/medical-model", dtype="auto")How to use YLX1965/medical-model with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="YLX1965/medical-model", filename="unsloth.Q8_0.gguf", )
llm.create_chat_completion(
messages = "{\n \"question\": \"What is my name?\",\n \"context\": \"My name is Clara and I live in Berkeley.\"\n}"
)How to use YLX1965/medical-model with llama.cpp:
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf YLX1965/medical-model:Q8_0 # Run inference directly in the terminal: llama-cli -hf YLX1965/medical-model:Q8_0
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf YLX1965/medical-model:Q8_0 # Run inference directly in the terminal: llama-cli -hf YLX1965/medical-model:Q8_0
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf YLX1965/medical-model:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf YLX1965/medical-model:Q8_0
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf YLX1965/medical-model:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf YLX1965/medical-model:Q8_0
docker model run hf.co/YLX1965/medical-model:Q8_0
How to use YLX1965/medical-model with Ollama:
ollama run hf.co/YLX1965/medical-model:Q8_0
How to use YLX1965/medical-model with Unsloth Studio:
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for YLX1965/medical-model to start chatting
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for YLX1965/medical-model to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for YLX1965/medical-model to start chatting
How to use YLX1965/medical-model with Docker Model Runner:
docker model run hf.co/YLX1965/medical-model:Q8_0
How to use YLX1965/medical-model with Lemonade:
# Download Lemonade from https://lemonade-server.ai/ lemonade pull YLX1965/medical-model:Q8_0
lemonade run user.medical-model-Q8_0
lemonade list
此模型是 unsloth/DeepSeek-R1-Distill-Llama-8B 在 FreedomIntelligence/medical-o1-reasoning-SFT 数据集(一个中文医学问答数据集)上的微调版本。它专为临床推理和回答医学问题而设计。该模型以 Q8_0 量化的 GGUF 格式保存。
unsloth/DeepSeek-R1-Distill-Llama-8BFreedomIntelligence/medical-o1-reasoning-SFT此模型旨在用于医学人工智能领域的研究和教育目的。它可用于回答医学问题、协助临床推理以及探索 LLM 在医疗保健中的能力。重要提示: 此模型不能替代专业的医疗建议。如有任何健康问题,请务必咨询合格的医疗保健提供者。
该模型使用 LoRA(低秩适应)进行微调,参数如下:
q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_projadamw_8bit训练使用 Unsloth 进行,以提高效率并减少 VRAM 使用。还使用了梯度检查点。
您可以通过 Ollama 使用此模型:
ollama run Anita2023/medical-model:q8_0
from huggingface_hub import hf_hub_download
#下载模型
hf_hub_download(repo_id="Anita2023/medical-model", filename="medical-model.gguf")
以下是描述任务的指令,以及提供进一步上下文的输入。
写出一个适当完成请求的回复。
在回答之前,请仔细考虑问题,并创建一个逐步的思维链,以确保逻辑和准确的回答。
### 指令:
您是一位在临床推理、诊断和治疗计划方面具有高级知识的医学专家。
请回答以下医学问题。
### 问题:
一个患有急性阑尾炎的病人已经发病5天,腹痛稍有减轻但仍然发热,在体检时发现右下腹有压痛的包块,此时应如何处理?
### 回复:
<think>
@misc{medical-model,
author = {Anita2023},
title = {医学模型:用于医学问题回答的微调 DeepSeek-R1-Distill-Llama-8B},
year = {2024},
publisher = {Hugging Face},
journal = {Hugging Face Model Hub},
howpublished = {\url{https://huggingface.co/Anita2023/medical-model}},
}
局限性
模型的性能受训练数据的大小和质量的限制。
它可能无法准确回答所有医学问题。
它主要在中文医学文本上训练。
模型可能表现出训练数据中存在的偏差。
8-bit
Base model
deepseek-ai/DeepSeek-R1-Distill-Llama-8B