Run this model with HF Jobs

Run OpenMed/OpenMed-Medical-27B-Preview-01 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/OpenMed/OpenMed-Medical-27B-Preview-01. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/OpenMed/OpenMed-Medical-27B-Preview-01 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/OpenMed/OpenMed-Medical-27B-Preview-01. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/OpenMed/OpenMed-Medical-27B-Preview-01. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

OpenMed

OpenMed Medical 27B Preview 01

OpenMed on Hugging Face OpenMed SDK on GitHub Status: experimental preview License Apache-2.0

An experimental preview of OpenMed's medical fine-tune of Qwen3.8-27B. It thinks a medical question through before it answers, and it runs on your own hardware as one standalone checkpoint. We are releasing three preview checkpoints from the same line of work so that people can try them on real questions and tell us what works and what does not. Preview 01 is the lightest touch of the three and stays closest to Qwen3.8-27B.

Developed by OpenMed
Base model Qwen3.8-27B by the Qwen team (Apache-2.0)
Status Experimental preview, shared for feedback
The previews Preview 01 (this one) ยท Preview 02 ยท Preview 03
Size 27B parameters, FP16 safetensors in 18 shards, about 55.6 GB
Input English text. The base model's vision components are included but were not tested in this preview.
Output A reasoning block, then the answer
License Apache-2.0

About OpenMed

OpenMed builds open models and open-source tools for clinical and biomedical text that run on your own hardware.

Quick start

pip install -U transformers accelerate torch torchvision pillow
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer, set_seed

model_id = "OpenMed/OpenMed-Medical-27B-Preview-01"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
    model_id, dtype=torch.float16, device_map="auto"
).eval()

messages = [{"role": "user", "content": "A patient on lisinopril asks if they can take ibuprofen for a few days of knee pain. What should their clinician weigh?"}]
inputs = tokenizer.apply_chat_template(
    messages, tokenize=True, add_generation_prompt=True,
    enable_thinking=True, return_dict=True, return_tensors="pt",
).to(model.device)

set_seed(38241)
with torch.inference_mode():
    output_ids = model.generate(
        **inputs, max_new_tokens=4096, do_sample=True, temperature=1.0, top_p=0.95, top_k=20,
        eos_token_id=[248046, 248044], pad_token_id=248044,
    )

completion = output_ids[0, inputs["input_ids"].shape[-1]:]
print(tokenizer.decode(completion, skip_special_tokens=True))

These are the sampling settings we use, and the checkpoint's generation_config.json sets the same ones by default. Give it room to think: the answers in this card took 352 to 1,953 new tokens, so 4,096 is plenty here, and harder questions can use 8,192 or more.

One real answer

The answer this preview gave to the question above, in our run of this code (the reasoning block is left out here):

The clinician should weigh whether short-term ibuprofen is safe for this patient, since ibuprofen can interact with lisinopril in ways that are usually acceptable for healthy adults but can be significant in higher-risk patients.

Key considerations:

  1. Kidney function risk

    • NSAIDs like ibuprofen can reduce prostaglandin-mediated kidney blood flow.
    • Combined with an ACE inhibitor like lisinopril, this can lower glomerular filtration rate and precipitate acute kidney injury, especially if:
      • The patient has chronic kidney disease
      • They are older
      • They are dehydrated or volume depleted
      • They are also taking a diuretic โ€” this โ€œtriple whammyโ€ of ACE inhibitor + NSAID + diuretic carries the highest AKI risk
  2. Blood pressure control

    • NSAIDs can blunt the effect of antihypertensives.
    • Ibuprofen may cause salt and water retention, raising blood pressure even over a few days.
  3. Gastrointestinal bleeding/ulcer risk

    • NSAIDs increase GI bleeding risk, particularly in older adults, people with prior ulcer/bleeding, or those also using aspirin, anticoagulants, antiplatelets, corticosteroids, or SSRIs/SNRIs.
  4. Cardiovascular risk

    • NSAIDs can increase cardiovascular risk, especially in people with established heart disease, heart failure, or uncontrolled hypertension.
    • Short, low-dose use is usually lower risk, but the patientโ€™s baseline risk matters.
  5. Need for NSAID vs safer alternatives

    • For knee pain, safer or less systemic options may include:
      • Acetaminophen, if appropriate
      • Topical NSAID such as diclofenac gel
      • Ice/heat, compression, activity modification, or physical therapy
      • Short course of topical agents rather than oral ibuprofen, if pain is localized
  6. If ibuprofen is used

    • Use the lowest effective dose for the shortest duration.
    • Take with food and adequate fluids.
    • Avoid if dehydrated, vomiting, febrile, or on a diuretic unless specifically cleared.
    • Monitor blood pressure and watch for reduced urine output, swelling, dizziness, or GI symptoms.
    • Avoid combining with other NSAIDs, aspirin for pain, or alcohol unnecessarily.

In short: for a healthy, well-hydrated patient with normal kidneys and controlled blood pressure, a few days of low-dose ibuprofen may often be reasonable. But the clinician should specifically assess renal function, blood pressure, heart/kidney disease, dehydration risk, GI bleeding risk, and whether a topical or non-NSAID option would be safer.

The three previews

  • Preview 01 stays closest to Qwen3.8-27B.
  • Preview 02 is tuned further. Start here.
  • Preview 03 is the most strongly tuned.

Try the same question on two of them and tell us which answer you would rather give a colleague.

Tell us what you find

Open a discussion in the Community tab of this page with the question, the answer and what was right or wrong about it. Good answers, wrong answers and strange answers all help shape the next version.

Before you use it

  • A preview. Shared for hands-on testing and feedback, not for leaderboard comparisons.
  • Research and prototyping only. Answers can be wrong, incomplete or out of date, and long answers can run out of tokens. Do not use it for diagnosis, treatment or any decision about a patient.
  • English text. Other languages and image input were not tested.

Built on

OpenMed fine-tuned this model from Qwen3.8-27B by the Qwen team (Apache-2.0). Thank you to the Qwen team for releasing it openly. See LICENSE and NOTICE.

OpenMed ยท Hugging Face ยท GitHub ยท PyPI ยท X

Downloads last month
55
Safetensors
Model size
28B params
Tensor type
F16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for OpenMed/OpenMed-Medical-27B-Preview-01

Base model

Qwen/Qwen3.8-27B
Finetuned
(1,156)
this model