MedScholar-Reasoning-1.5B

This is a merge of preβtrained language models created with mergekit.
Purpose: compact model (β1.5B) tuned via model-merging for concise clinical recognition and short, structured rationales.
Disclaimer: Educational use only β not a substitute for professional medical judgment or emergency care.
𧬠Models Merged
π Merge Details
Merge Method
- SLERP (spherical linear interpolation).
π Inference (Transformers)
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
MODEL = "yasserrmd/MedScholar-Reasoning-1.5B"
tok = AutoTokenizer.from_pretrained(MODEL, use_fast=True)
model = AutoModelForCausalLM.from_pretrained(
MODEL,
torch_dtype=(torch.float16 if torch.cuda.is_available() else torch.float32),
device_map=("auto" if torch.cuda.is_available() else None),
trust_remote_code=True,
).eval()
if tok.pad_token is None and tok.eos_token is not None:
tok.pad_token = tok.eos_token
prompt = (
"System: You are a concise medical reasoning assistant.\n"
"User: 65-year-old with fever, neck stiffness, photophobia. Initial step?\n"
"Assistant:"
)
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(
**inputs,
max_new_tokens=64,
do_sample=False, # deterministic for recognition-style tasks
eos_token_id=tok.eos_token_id,
pad_token_id=tok.pad_token_id,
)
print(tok.decode(out[0], skip_special_tokens=True))
Recommended decoding
- Recognition / MCQ: greedy (
do_sample=False
). - Free text: light sampling (
temperatureβ0.2β0.4
,top_pβ0.9
) if needed. - Keep generations short (50β150 tokens) to reduce drift.
π Safety & Intended Use
- Intended: education, examβstyle recognition, triage training, dataset bootstrapping.
- Not intended: to diagnose, treat, or manage real patients; making dosing or emergent decisions.
- Add guardrails for uncertainty (allow βuncertainβ), unsafe action filters, and referral prompts.
π License
The merged model inherits constraints from all upstream licenses.
Before distribution or commercial use, review the licenses of:
yasserrmd/MedScholar-1.5B
nvidia/OpenReasoning-Nemotron-1.5B
Your usage must comply with the most restrictive terms among the sources.
βοΈ Tips
- If your tokenizer includes a chat template, you may use it; otherwise, plain prompts like the examples above are fine.
- To shift personality/conciseness, prepend a system line (e.g., βUse 6β8 bullets; no repetition; say βuncertainβ if unsureβ).
- For reproducible merges, pin
mergekit
version and keep your YAML under version control.
βοΈ Citation
If you build on this work, please cite the original model authors and the mergekit project:
- mergekit: cg123/mergekit (GitHub)
- Upstream models: yasserrmd/MedScholar-1.5B, nvidia/OpenReasoning-Nemotron-1.5B
- Downloads last month
- 37
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
π
Ask for provider support
Model tree for yasserrmd/MedScholar-Reasoning-1.5B
Merge model
this model