CoolFace
Modelpublic

Aquiles-ai/Asclepio-8B

sourceHugging Facemitupdated 10mo agoView on Hugging Face
3likes27downloads
Model Card

Asclepio-8B ๐Ÿฉบ

[image]

Asclepio-8B is a fine-tuned version of huihui-ai/DeepSeek-R1-0528-Qwen3-8B-abliterated specialized in medical reasoning and clinical decision-making. Trained with high-quality data featuring step-by-step reasoning in <think> blocks, this model is designed to experiment with adapting large language models to healthcare-related tasks.

โš ๏ธ Important Note: This model uses an "abliterated" (uncensored) version as its base because medical data can contain graphic descriptions of wounds, invasive procedures, and sensitive clinical cases that require processing without unnecessary restrictions.

๐ŸŽฏ Model Description

Asclepio-8B combines DeepSeek-R1's reasoning capabilities with specialized medical knowledge, supporting:

  • โ€”Step-by-step clinical reasoning with <think> blocks
  • โ€”Differential diagnosis based on symptoms and findings
  • โ€”Complex medical case analysis
  • โ€”Structured responses with detailed explanations
  • โ€”Evidence-based clinical decision-making

๐Ÿ”ง Training Details

  • โ€”Base model: huihui-ai/DeepSeek-R1-0528-Qwen3-8B-abliterated
  • โ€”Method: LoRA (r=16, alpha=32)
  • โ€”Dropout: 0.05
  • โ€”Target modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
  • โ€”Dataset: Aquiles-ai/Medical-Reasoning
  • โ€”1,319,264 total examples
  • โ€”Conversational format (Hermes-style)
  • โ€”Includes chain-of-thought reasoning
  • โ€”Configuration:
  • โ€”Total steps: 575
  • โ€”Learning rate: 2e-4 (cosine scheduler)
  • โ€”Max sequence length: 2048 tokens
  • โ€”Eval steps: 115
  • โ€”Optimized batch size with gradient accumulation
  • โ€”Hardware: NVIDIA L4 24GB VRAM
  • โ€”Training time: ~6.7 hours

๐Ÿ“Š Performance Metrics

MetricFinal Value
Train Loss0.8372
Eval Loss0.9115
Train Accuracy76.93%
Eval Accuracy76.36%
Entropy (Train)0.905
Entropy (Eval)0.909

Training Progression

StepTrain LossTrain AccuracyEval LossEval Accuracy
1001.731661.34%--
2000.921874.98%0.959375.38%
4000.891975.33%0.933175.90%
5750.837276.93%0.911576.36%

The model shows stable convergence with consistent improvement in accuracy and loss reduction, indicating effective learning without significant overfitting.

๐Ÿ’ป Usage

Installation

bash
pip install transformers torch accelerate

Basic Inference

python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "Aquiles-ai/Asclepio-8B"

model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map="cuda",
    dtype=torch.float16,
    trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)

# Prompt
messages = [
    {"role": "user", "content": """You are a medical AI assistant with advanced reasoning capabilities. Provide detailed, step-by-step analysis for medical questions.

A 30-year-old man has 6/5 vision each eye, unaided. His cycloplegic retinoscopy is + 0.0D sph. at 1 metre distance. His complaints are blurring of newsprint at 30 cm, that clears up in about two minutes. The most probable diagnosis is โ€“
A. Hypermetropia
B. Presbyopia
C. Accommodative inertia
D. Cycloplegia
"""},
]

# Tokenizer and model inference
inputs = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
).to('cuda')

with torch.no_grad():
    output = model.generate(
        **inputs,
        max_new_tokens=8092,
        pad_token_id=tokenizer.eos_token_id,
        eos_token_id=tokenizer.eos_token_id,
    )

# Decode and print the output
print(tokenizer.decode(output[0], skip_special_tokens=True))

Streaming Inference

python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
from threading import Thread

model_id = "Aquiles-ai/Asclepio-8B"

model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map="cuda",
    dtype=torch.float16,
    trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)

messages = [
    {"role": "user", "content": """You are a medical AI assistant with advanced reasoning capabilities. Provide detailed, step-by-step analysis for medical questions.

A 30-year-old man has 6/5 vision each eye, unaided. His cycloplegic retinoscopy is + 0.0D sph. at 1 metre distance. His complaints are blurring of newsprint at 30 cm, that clears up in about two minutes. The most probable diagnosis is โ€“
A. Hypermetropia
B. Presbyopia
C. Accommodative inertia
D. Cycloplegia
"""},
]

inputs = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
).to('cuda')

# Create the streamer
streamer = TextIteratorStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)

# Build kwargs for generate
generate_kwargs = dict(
    **inputs,
    max_new_tokens=8092,
    pad_token_id=tokenizer.eos_token_id,
    eos_token_id=tokenizer.eos_token_id,
    streamer=streamer,
)

def _generate_thread(model, kwargs):
    with torch.no_grad():
        model.generate(**kwargs)

thread = Thread(target=_generate_thread, args=(model, generate_kwargs))
thread.start()

for chunk in streamer:
    print(chunk, end="", flush=True)

Production Deployment with vLLM

Start server:

bash
vllm serve Aquiles-ai/Asclepio-8B \
  --host 0.0.0.0 \
  --port 8000 \
  --api-key dummyapikey \
  --max-model-len=16384 \
  --async-scheduling \
  --gpu-memory-utilization=0.90

Request to the server from the OpenAI client:

python
from openai import OpenAI

client = OpenAI(api_key="dummyapikey", base_url="http://127.0.0.1:8000/v1")

stream = client.chat.completions.create(
    model="Aquiles-ai/Asclepio-8B",
    messages=[{
        "role": "user",
        "content": """You are a medical AI assistant with advanced reasoning capabilities. Provide detailed, step-by-step analysis for medical questions.

A 30-year-old man has 6/5 vision each eye, unaided. His cycloplegic retinoscopy is + 0.0D sph. at 1 metre distance. His complaints are blurring of newsprint at 30 cm, that clears up in about two minutes. The most probable diagnosis is โ€“
A. Hypermetropia
B. Presbyopia
C. Accommodative inertia
D. Cycloplegia
"""
    }],
    max_tokens=8092,
    stream=True
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

vLLM Benefits: 20-30x faster inference, OpenAI-compatible API, continuous batching, async scheduling.

๐Ÿš€ Capabilities & Limitations

โœ… Supported Capabilities

  • โ€”Structured clinical reasoning with <think> blocks
  • โ€”Differential diagnosis based on clinical presentations
  • โ€”Medical case analysis with multiple symptoms and findings
  • โ€”Detailed pathophysiological explanations
  • โ€”Multiple-choice medical questions with justification
  • โ€”Complementary test evaluation

โš ๏ธ Important Limitations

  • โ€”NOT a certified medical device - Do not use for actual diagnosis
  • โ€”Requires professional validation - All responses must be reviewed by qualified medical personnel
  • โ€”Limited to English text - Primarily trained on English medical literature
  • โ€”Does not replace clinical judgment - It's a support tool, not a substitute
  • โ€”May generate errors - Like all LLMs, it can produce incorrect information
  • โ€”No access to real patient data - Has no context of specific medical records

๐ŸŽฏ Best Use Cases

  • โ€”Medical education and student training
  • โ€”Academic research in clinical reasoning
  • โ€”Study assistant for medical exam preparation
  • โ€”Prototyping clinical decision support systems
  • โ€”Generating synthetic clinical cases for training

๐Ÿ“š Dataset Information

The model was trained with Aquiles-ai/Medical-Reasoning, which combines:

  1. 1.medical-o1-reasoning-SFT - Medical reasoning verified with GPT-4o
  2. 2.ReasonMed - 370K examples with knowledge-graph guided reasoning
  3. 3.MedMCQA - Medical multiple-choice questions

Dataset features:

  • โ€”Hermes-style conversational format
  • โ€”<thinking> blocks for explicit reasoning
  • โ€”Evidence-based responses with medical explanations
  • โ€”Coverage of multiple medical specialties

๐Ÿ”— Related Products

Aquiles-RAG - High-Performance RAG System

If you're building medical information systems, consider Aquiles-RAG to add semantic search capabilities:

  • โ€”Repository: https://github.com/Aquiles-ai/Aquiles-RAG
  • โ€”PyPI: pip install aquiles-rag
  • โ€”Features:
  • โ€”Vector search (Redis HNSW, Qdrant, PostgreSQL pgvector)
  • โ€”FastAPI REST API
  • โ€”Embedding-agnostic architecture
  • โ€”Sync & async Python clients
  • โ€”Interactive setup wizard
  • โ€”Optional re-ranking

Perfect for: Medical literature search systems, clinical knowledge bases, medical documentation assistants.

๐Ÿ“„ Citation

bibtex
@misc{asclepio-8b-2025,
  author = {Aquiles-ai},
  title = {Asclepio-8B: Medical Reasoning with DeepSeek-R1 and Qwen Architecture},
  year = {2025},
  publisher = {HuggingFace},
  url = {https://huggingface.co/Aquiles-ai/Asclepio-8B}
}

๐Ÿ™ Acknowledgments

  • โ€”HuiHui-AI for the base model DeepSeek-R1-0528-Qwen3-8B-abliterated
  • โ€”DeepSeek for the R1 architecture with reasoning capabilities
  • โ€”Qwen Team for the architectural foundation
  • โ€”Dataset contributors: FreedomIntelligence, Lingshu Medical, OpenLifeScience

โš ๏ธ Medical Disclaimer

IMPORTANT: This model is for research and educational purposes only.

  • โ€”โŒ DO NOT use for actual medical diagnosis
  • โ€”โŒ DO NOT replace consultation with healthcare professionals
  • โ€”โŒ NO regulatory approval (FDA, EMA, etc.)
  • โ€”โœ… Requires supervision and validation by qualified medical personnel
  • โ€”โœ… Intended for research, education, and prototype development

Use of this model in real clinical contexts requires:

  1. 1.Rigorous clinical validation
  2. 2.Appropriate regulatory approval
  3. 3.Continuous supervision by medical professionals
  4. 4.Compliance with local health and privacy regulations (HIPAA, GDPR, etc.)

๐Ÿ“œ License

MIT License - Same as the base model.

Contact: https://aquiles-ai.vercel.app Version: 1.0 Last Updated: October 2025