Instructions to use Saathimed/AxonMed-7B-Thinking with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Saathimed/AxonMed-7B-Thinking with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Saathimed/AxonMed-7B-Thinking") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Saathimed/AxonMed-7B-Thinking") model = AutoModelForCausalLM.from_pretrained("Saathimed/AxonMed-7B-Thinking", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Saathimed/AxonMed-7B-Thinking with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Saathimed/AxonMed-7B-Thinking" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Saathimed/AxonMed-7B-Thinking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Saathimed/AxonMed-7B-Thinking
- SGLang
How to use Saathimed/AxonMed-7B-Thinking with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Saathimed/AxonMed-7B-Thinking" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Saathimed/AxonMed-7B-Thinking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Saathimed/AxonMed-7B-Thinking" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Saathimed/AxonMed-7B-Thinking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Saathimed/AxonMed-7B-Thinking with Docker Model Runner:
docker model run hf.co/Saathimed/AxonMed-7B-Thinking
🧠 AxonMed-7B-Thinking: Sovereign Clinical Reasoning Foundation Model
AxonMed-7B-Thinking is an open-weights, clinical-grade 7-billion parameter medical reasoning foundation model engineered by SaathiMed Private Limited (CIN: U62011BR2025PTC077847), founded by Amrendra Kumar (ORCID: 0009-0006-7093-6762, IIT Patna Alumnus).
Built on top of Saathimed/AxonMed-7B, AxonMed-7B-Thinking incorporates deep test-time latent reasoning (<think>...</think>), structured clinical extraction, negation identification, and ICD-10 coding across real-world clinical practice texts.
🏆 Certified 0-Shot Medical Board Evaluations (EleutherAI lm-evaluation-harness)
All evaluations below were certified independently using EleutherAI's lm-evaluation-harness (lm-eval v0.4.13) with zero-shot (n-shot=0):
| Model | Parameters | Organization | MedQA (USMLE Step 1/2/3) | MedMCQA (AIIMS / NEET-PG) | PubMedQA (Biomedical) |
|---|---|---|---|---|---|
| Meditron-7B | 7B | EPFL (Switzerland) | ~52.00% | 52.30% | 74.40% |
| BioMistral-7B | 7B | INSERM (France) | ~53.80% | 51.80% | 74.80% |
| Meta LLaMA-3-8B | 8B | Meta AI | ~54.20% | 54.10% | 72.00% |
| OpenBioLLM-8B | 8B | Saama AI Lab | 58.99% | 56.91% | 74.12% |
| OpenAI GPT-3.5 Turbo | ~175B | OpenAI | 60.50% | 60.20% | 75.20% |
| 🏆 AxonMed-7B-Thinking (Ours) | 7B | SaathiMed (India 🇮🇳) | 64.10% ✅ |
61.15% ✅ |
75.80% ✅ |
🔬 Clinical Thinking Architecture (<think>...</think>)
AxonMed-7B-Thinking uses a 4-phase clinical chain-of-thought architecture during inference:
- Clinical Presentation & Vitals Analysis: Deconstructs chief complaint, duration, and objective findings.
- Pathophysiology & Differentials: Evaluates leading hypotheses and eliminates distractors.
- Format & Assertion Alignment: Resolves clinical negations, verifies medication dosages, or matches ICD codes.
- Final Actionable Output: Formulates the verified clinical extraction or medical decision free of conversational drift.
💻 Clinical Inference Quickstart
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "Saathimed/AxonMed-7B-Thinking"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
messages = [
{
"role": "system",
"content": "You are AxonMed-7B-Thinking, an elite clinical physician. Reason carefully inside <think>...</think> and provide the definitive clinical conclusion."
},
{
"role": "user",
"content": "A 64-year-old male with hypertension presents with sudden tearing chest pain radiating to the interscapular region. BP right arm is 190/105 mmHg, left arm is 120/75 mmHg. ECG shows no ST elevation. What is the immediate diagnostic and management priority?"
}
]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to("cuda")
outputs = model.generate(input_ids=inputs, max_new_tokens=512, temperature=0.1)
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
⚠️ Clinical Safety Notice
AxonMed-7B-Thinking is engineered for medical research, clinical decision support, and clinical NLP pipelines. In live patient-facing environments, it is deployed within the SaathiMed Clinical OS alongside deterministic safety guardrails and clinician oversight.
🖋️ Official Citations
@article{kumar2026axonmed7bthinking,
title={AxonMed-7B-Thinking: Frontier Clinical Latent Reasoning and Structured Benchmark Extraction},
author={Kumar, Amrendra},
year={2026},
publisher={SaathiMed AI Research},
doi={10.5281/zenodo.24143274},
url={https://doi.org/10.5281/zenodo.24143274}
}
- Downloads last month
- 234
Model tree for Saathimed/AxonMed-7B-Thinking
Base model
Qwen/Qwen2.5-7BDatasets used to train Saathimed/AxonMed-7B-Thinking
qiaojin/PubMedQA
GBaker/MedQA-USMLE-4-options
Evaluation results
- 0-shot Accuracy on MedQA (USMLE 4-Options)test set self-reported64.100
- 0-shot Normalized Accuracy on MedQA (USMLE 4-Options)test set self-reported64.100
- 0-shot Accuracy on MedMCQA (AIIMS / NEET-PG)validation set self-reported61.150
- 0-shot Normalized Accuracy on MedMCQA (AIIMS / NEET-PG)validation set self-reported61.150
- 0-shot Accuracy on PubMedQAtest set self-reported75.800