Reasoning-Medical0.1-27B (Qwen3.5-27B medical finetune, claims to surpass MedGemma)

Reddit r/LocalLLaMA Models

Summary

EpistemeAI released Reasoning-Medical0.1-27B, a fine-tuned version of Qwen3.5-27B for medical reasoning, claiming to surpass MedGemma on several medical benchmarks by incorporating chain-of-thought reasoning on a curated dataset of 100,000 records.

No content available
Original Article
View Cached Full Text

Cached at: 07/09/26, 11:40 AM

EpistemeAI/Reasoning-Medical0.1-27B · Hugging Face

Source: https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#introductionIntroduction

This EpistemeAI/Reasoning-Medical0.1-27B is designed for advanced medical reasoning in professional medicine, medical genetics, college biology/medicine, and clinical knowledge. The model was fine-tuned on a large-scale dataset of 100000 records, specifically curated by blending various public medical reasoning datasets, incorporating Chain-of-Thought reasoning to improve step-by-step medical related questions. Training was performed using the GRPO trainer with the Unsloth optimization method for efficient fine-tuning. The primary goal is to provide a comprehensive and diverse dataset for training language models in medical question-answering and reasoning tasks. Due to very high performance in medical reasoning, please ask for permission to download the model.

**Safety Notice:**This model is for benign medical and scientific reasoning only. It must not be used for biological or chemical weapon development, pathogen enhancement, toxin production, hazardous synthesis, or any activity that enables harm. All biomedical, biological, chemical, or laboratory-related outputs require expert review and must comply with applicable legal, ethical, biosafety, biosecurity, and chemical safety standards.

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#model-overviewModel Overview

  • Type: Causal Language Model with Vision Encoder
  • Training Stage: Pre-training & Post-training
  • Language Model- Number of Parameters: 27B - Hidden Dimension: 5120 - Token Embedding: 248320 (Padded) - Number of Layers: 64 - Hidden Layout: 16 × (3 × (Gated DeltaNet → FFN) → 1 × (Gated Attention → FFN)) - Gated DeltaNet:- Number of Linear Attention Heads: 48 for V and 16 for QK - Head Dimension: 128 - Gated Attention:- Number of Attention Heads: 24 for Q and 4 for KV - Head Dimension: 256 - Rotary Position Embedding Dimension: 64 - Feed Forward Network:- Intermediate Dimension: 17408 - LM Output: 248320 (Padded) - MTP: trained with multi-steps
  • Context Length: 262,144 natively and extensible up to 1,010,000 tokens.

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#commercial-accessCommercial Access

Reasoning-Medical0.1-27B is available for:

  • Medical education applications
  • Research copilots
  • Biotech/pharma literature analysis
  • Private medical reasoning deployments
  • Model benchmarking and safety evaluation

For API access, private deployment, or commercial licensing, contact:

[email protected]

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#benchmarkBenchmark

TaskVersionFiltern-shotMetricDirectionReasoning Medical0.1 27BReasoning Medical 27BMedGemma 1 27BMMLU-Pro Biology3.1custom-extract2exact_match↑0.930.85—MMLU-ProX Biology0custom-extract2exact_match↑0.9680.80—MedQAYAMLnone2acc↑0.9690.90.853

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#installationInstallation

To get started, install the necessary dependencies to setup your environment:

!pip install --upgrade "transformers>=5.2.0"

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#using-reasoning-medical-27b-via-the-chat-completions-apiUsing Reasoning Medical 27B via the Chat Completions API

The chat completions API is accessible via standard HTTP requests or OpenAI SDKs. Here, we show examples using the OpenAI Python SDK.

Before starting, make sure it is installed and the API key and the API base URL is configured, e.g.:

pip install -U openai

# Set the following accordingly
export OPENAI_BASE_URL="http://localhost:8000/v1"
export OPENAI_API_KEY="EMPTY"

We recommend using the following set of sampling parameters for generation - Thinking mode for general tasks:temperature=1\.0, top\_p=0\.95, top\_k=20, min\_p=0\.0, presence\_penalty=0\.0, repetition\_penalty=1\.0 - Thinking mode for precise coding tasks (e.g. WebDev):temperature=0\.6, top\_p=0\.95, top\_k=20, min\_p=0\.0, presence\_penalty=0\.0, repetition\_penalty=1\.0 - Instruct (or non-thinking) mode:temperature=0\.7, top\_p=0\.80, top\_k=20, min\_p=0\.0, presence\_penalty=1\.5, repetition\_penalty=1\.0 Please note that the support for sampling parameters varies according to inference frameworks.

Our models operate in thinking mode by default, generating thinking content signified by<think\>\\n\.\.\.</think\>\\n\\nbefore producing the final responses. To disable thinking content and obtain direct response, refer to the exampleshere.

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#text-only-inputText-Only Input

from openai import OpenAI
# Configured by environment variables
client = OpenAI()

messages = [
    {"role": "user", "content": "Chronic urethral obstruction due to benign prismatic hyperplasia can lead to the following change in kidney parenchyma"},
]

chat_response = client.chat.completions.create(
    model="EpistemeAI/Reasoning-Medical0.1-27B",
    messages=messages,
    max_tokens=81920,
    temperature=1.0,
    top_p=0.95,
    presence_penalty=0.0,
    extra_body={
        "top_k": 20,
    }, 
)
print("Chat response:", chat_response)

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#image-inputImage Input

from openai import OpenAI
# Configured by environment variables
client = OpenAI()

messages = [
    {
        "role": "user",
        "content": [
            {
                "type": "image_url",
                "image_url": {
                    "url": "https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3.5/demo/CI_Demo/mathv-1327.jpg"
                }
            },
            {
                "type": "text",
                "text": "The centres of the four illustrated circles are in the corners of the square. The two big circles touch each other and also the two little circles. With which factor do you have to multiply the radii of the little circles to obtain the radius of the big circles?\nChoices:\n(A) $\\frac{2}{9}$\n(B) $\\sqrt{5}$\n(C) $0.8 \\cdot \\pi$\n(D) 2.5\n(E) $1+\\sqrt{2}$"
            }
        ]
    }
]

chat_response = client.chat.completions.create(
    model="EpistemeAI/Reasoning-Medical0.1-27B",
    messages=messages,
    max_tokens=81920,
    temperature=1.0,
    top_p=0.95,
    presence_penalty=0.0,
    extra_body={
        "top_k": 20,
    }, 
)
print("Chat response:", chat_response)

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#video-inputVideo Input

from openai import OpenAI
# Configured by environment variables
client = OpenAI()

messages = [
    {
        "role": "user",
        "content": [
            {
                "type": "video_url",
                "video_url": {
                    "url": "https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3.5/demo/video/N1cdUjctpG8.mp4"
                }
            },
            {
                "type": "text",
                "text": "How many porcelain jars were discovered in the niches located in the primary chamber of the tomb?"
            }
        ]
    }
]

# When vLLM is launched with `--media-io-kwargs '{"video": {"num_frames": -1}}'`,
# video frame sampling can be configured via `extra_body` (e.g., by setting `fps`).
# This feature is currently supported only in vLLM.
#
# By default, `fps=2` and `do_sample_frames=True`.
# With `do_sample_frames=True`, you can customize the `fps` value to set your desired video sampling rate.
chat_response = client.chat.completions.create(
    model="EpistemeAI/Reasoning-Medical0.1-27B",
    messages=messages,
    max_tokens=81920,
    temperature=1.0,
    top_p=0.95,
    presence_penalty=0.0,
    extra_body={
        "top_k": 20,
        "mm_processor_kwargs": {"fps": 2, "do_sample_frames": True},
    }, 
)

print("Chat response:", chat_response)

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#instruct-or-non-thinking-modeInstruct (or Non-Thinking) Mode

Our model does not officially support the soft switch of Reasoning Medical 27B, i.e.,/thinkand/nothink.

Our model will think by default before response. You can obtain direct response from the model without thinking by configuring the API parameters. For example,

from openai import OpenAI
# Configured by environment variables
client = OpenAI()

messages = [
    {
        "role": "user",
        "content": [
            {
                "type": "image_url",
                "image_url": {
                    "url": "https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3.6/demo/RealWorld/RealWorld-04.png"
                }
            },
            {
                "type": "text",
                "text": "Where is this?"
            }
        ]
    }
]

chat_response = client.chat.completions.create(
    model="EpistemeAI/Reasoning-Medical0.1-27B",
    messages=messages,
    max_tokens=32768,
    temperature=0.7,
    top_p=0.8,
    presence_penalty=1.5,
    extra_body={
        "top_k": 20,
        "chat_template_kwargs": {"enable_thinking": False},
    }, 
)
print("Chat response:", chat_response)

If you are using APIs from Alibaba Cloud Model Studio, in addition to changingmodel, please use"enable\_thinking": Falseinstead of"chat\_template\_kwargs": \{"enable\_thinking": False\}.

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#preserve-thinkingPreserve Thinking

By default, only the thinking blocks generated in handling the latest user message is retained, resulting in a pattern commonly as interleaved thinking. Reasoning Medical 27B has been additionally trained to preserve and leverage thinking traces from historical messages. You can enable this behavior by setting thepreserve\_thinkingoption:

from openai import OpenAI
# Configured by environment variables
client = OpenAI()

messages = [...]

chat_response = client.chat.completions.create(
    model="EpistemeAI/Reasoning-Medical0.1-27B",
    messages=messages,
    max_tokens=32768,
    temperature=0.6,
    top_p=0.95,
    presence_penalty=0.0,
    extra_body={
        "top_k": 20,
        "chat_template_kwargs": {"preserve_thinking": True},
    }, 
)
print("Chat response:", chat_response)

If you are using APIs from Alibaba Cloud Model Studio, in addition to changingmodel, please use"preserve\_thinking": Trueinstead of"chat\_template\_kwargs": \{"preserve\_thinking": False\}.

This capability is particularly beneficial for agent scenarios, where maintaining full reasoning context can enhance decision consistency and, in many cases, reduce overall token consumption by minimizing redundant reasoning. Additionally, it can improve KV cache utilization, optimizing inference efficiency in both thinking and non-thinking modes.

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#agentic-usageAgentic Usage

Our model excels in tool calling capabilities.

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#qwen-agentQwen-Agent

We recommend usingQwen-Agentto quickly build Agent applications with Qwen3.6.

To define the available tools, you can use the MCP configuration file, use the integrated tool of Qwen-Agent, or integrate other tools by yourself.

import os
from qwen_agent.agents import Assistant

# Define LLM
# Using Alibaba Cloud Model Studio
llm_cfg = {
    # Use the OpenAI-compatible model service provided by DashScope:
    'model': 'EpistemeAI/Reasoning-Medical0.1-27B',
    'model_type': 'qwenvl_oai',
    'model_server': 'https://dashscope.aliyuncs.com/compatible-mode/v1',
    'api_key': os.getenv('DASHSCOPE_API_KEY'),

    'generate_cfg': {
        'use_raw_api': True,
        # When using Dash Scope OAI API, pass the parameter of whether to enable thinking mode in this way
        'extra_body': {
            'enable_thinking': True,
            'preserve_thinking': True,
        },
    },
}

# Using OpenAI-compatible API endpoint.
# functionality of the deployment frameworks and let Qwen-Agent automate the related operations.
#
# llm_cfg = {
#     # Use your own model service compatible with OpenAI API by vLLM/SGLang:
#     'model': 'EpistemeAI/Reasoning-Medical0.1-27B',
#     'model_type': 'qwenvl_oai',
#     'model_server': 'http://localhost:8000/v1',  # api_base
#     'api_key': 'EMPTY',
#
#     'generate_cfg': {
#         'use_raw_api': True,
#         # When using vLLM/SGLang OAI API, pass the parameter of whether to enable thinking mode in this way
#         'extra_body': {
#             'chat_template_kwargs': {'enable_thinking': True, 'preserve_thinking': True}
#         },
#     },
# }

# Define Tools
tools = [
    {'mcpServers': {  # You can specify the MCP configuration file
            "filesystem": {
                "command": "npx",
                "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/xxxx/Desktop"]
            }
        }
    }
]

# Define Agent
bot = Assistant(llm=llm_cfg, function_list=tools)

# Streaming generation
messages = [{'role': 'user', 'content': 'Help me organize my desktop.'}]
for responses in bot.run(messages=messages):
    pass
print(responses)

# Streaming generation
messages = [{'role': 'user', 'content': 'Develop a dog website and save it on the desktop'}]
for responses in bot.run(messages=messages):
    pass
print(responses)

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#processing-ultra-long-textsProcessing Ultra-Long Texts

Reasoning Medical 27B natively supports context lengths of up to 262,144 tokens. For long-horizon tasks where the total length (including both input and output) exceeds this limit, we recommend using RoPE scaling techniques to handle long texts effectively., e.g., YaRN.

YaRN is currently supported by several inference frameworks, e.g.,transformers,vllm,ktransformersandsglang. In general, there are two approaches to enabling YaRN for supported frameworks:

  • Modifying the model configuration file: In theconfig\.jsonfile, change therope\_parametersfields intext\_configto: { "mrope_interleaved": true, "mrope_section": [ 11, 11, 10 ], "rope_type": "yarn", "rope_theta": 10000000, "partial_rotary_factor": 0.25, "factor": 4.0, "original_max_position_embeddings": 262144, }
  • Passing command line arguments: Forvllm, you can use VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 vllm serve ... --hf-overrides '{"text_config": {"rope_parameters": {"mrope_interleaved": true, "mrope_section": [11, 11, 10], "rope_type": "yarn", "rope_theta": 10000000, "partial_rotary_factor": 0.25, "factor": 4.0, "original_max_position_embeddings": 262144}}}' --max-model-len 1010000 Forsglangandktransformers, you can use SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1 python -m sglang.launch_server ... --json-model-override-args '{"text_config": {"rope_parameters": {"mrope_interleaved": true, "mrope_section": [11, 11, 10], "rope_type": "yarn", "rope_theta": 10000000, "partial_rotary_factor": 0.25, "factor": 4.0, "original_max_position_embeddings": 262144}}}' --context-length 1010000

All the notable open-source frameworks implement static YaRN, which means the scaling factor remains constant regardless of input length,**potentially impacting performance on shorter texts.**We advise modifying therope\_parametersconfiguration only when processing long contexts is required. It is also recommended to modify thefactoras needed. For example, if the typical context length for your application is 524,288 tokens, it would be better to setfactoras 2.0.

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#best-practicesBest Practices

To achieve optimal performance, we recommend the following settings:

  1. Sampling Parameters: - We suggest using the following sets of sampling parameters depending on the mode and task type:- Thinking mode for general tasks: temperature=1\.0,top\_p=0\.95,top\_k=20,min\_p=0\.0,presence\_penalty=0\.0,repetition\_penalty=1\.0 - Thinking mode for precise coding tasks (e.g., WebDev): temperature=0\.6,top\_p=0\.95,top\_k=20,min\_p=0\.0,presence\_penalty=0\.0,repetition\_penalty=1\.0 - Instruct (or non-thinking) mode: temperature=0\.7,top\_p=0\.80,top\_k=20,min\_p=0\.0,presence\_penalty=1\.5,repetition\_penalty=1\.0 - For supported frameworks, you can adjust thepresence\_penaltyparameter between 0 and 2 to reduce endless repetitions. However, using a higher value may occasionally result in language mixing and a slight decrease in model performance.
  2. Adequate Output Length: We recommend using an output length of 32,768 tokens for most queries. For benchmarking on highly complex problems, such as those found in math and programming competitions, we suggest setting the max output length to 81,920 tokens. This provides the model with sufficient space to generate detailed and comprehensive responses, thereby enhancing its overall performance.
  3. Standardize Output Format: We recommend using prompts to standardize model outputs when benchmarking. - Math Problems: Include “Please reason step by step, and put your final answer within \boxed{}.” in the prompt. - Multiple-Choice Questions: Add the following JSON structure to the prompt to standardize responses: “Please show your choice in theanswerfield with only the choice letter, e.g.,"answer": "C".”
  4. Long Video Understanding: To optimize inference efficiency for plain text and images, thesizeparameter in the releasedvideo\_preprocessor\_config\.jsonis conservatively configured. It is recommended to set thelongest\_edgeparameter in the video_preprocessor_config file to 469,762,048 (corresponding to 224k video tokens) to enable higher frame-rate sampling for hour-scale videos and thereby achieve superior performance. For example, {"longest_edge": 469762048, "shortest_edge": 4096} Alternatively, override the default values via engine startup parameters. For implementation details, refer to:vLLM/SGLang.

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#limitationLimitation

Reasoning-Medical0.1-27B is intended for research and informational purposes only. Its outputs should not be used to directly guide clinical diagnosis, patient management, treatment decisions, or any other direct clinical practice applications. Benchmark results are provided to illustrate the model’s baseline performance on relevant evaluation tasks; however, they do not guarantee accuracy, reliability, or suitability for clinical use. Even in image and text domains that are substantially represented in the training data, the model may generate incomplete, inaccurate, or misleading outputs. All outputs generated by Reasoning-Medical-27B should be treated as preliminary and must undergo independent verification, clinical correlation, and further validation through established research, development, and regulatory review processes before any clinical application is considered.

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#biological-and-chemical-safety-warningBiological and Chemical Safety Warning

This model is intended forbenign medical, biomedical, and scientific reasoning support only. It must not be used to design, optimize, synthesize, acquire, modify, weaponize, or deploy biological agents, toxins, pathogens, chemical agents, hazardous compounds, or related delivery systems.

The model isnot intended to provide actionable guidancefor activities involving:

  • Biological weapon development or misuse
  • Pathogen engineering, enhancement, or evasion
  • Toxin production, purification, or delivery
  • Chemical weapon synthesis or optimization
  • Circumventing biosafety, biosecurity, chemical safety, or legal controls
  • Experimental protocols that increase transmissibility, virulence, toxicity, persistence, or environmental spread
  • Procurement, concentration, dosage, dispersal, or deployment of hazardous biological or chemical materials

Outputs related to biology, chemistry, medicine, toxicology, infectious disease, or laboratory work may be incomplete, inaccurate, unsafe, or inappropriate for real-world use. Any such outputs must be reviewed by qualified professionals and handled only within approved legal, institutional, biosafety, biosecurity, and chemical safety frameworks.

This model should be used only forsafe, ethical, and lawful purposes, such as medical education, literature review, clinical reasoning research, public health analysis, defensive biosecurity, and non-operational safety discussions. Users are responsible for ensuring that all usage complies with applicable laws, regulations, institutional review requirements, and safety standards.

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#legal-notice-and-disclaimerLegal Notice and Disclaimer

This model is independently developed and is not affiliated with, endorsed by, sponsored by, authorized by, or otherwise associated with Qwen, Alibaba Group, or any of their respective affiliates, subsidiaries, licensors, owners, or representatives. Any reference to Qwen is made solely for descriptive or comparative purposes, where applicable.

To the best of the developer’s knowledge, no fine-tuning, training, evaluation, optimization, or model-development process for this model involved distillation from OpenAI or Anthropic models, systems, APIs, outputs, synthetic responses, logits, hidden states, labels, or any other derived training signals. No OpenAI or Anthropic model outputs were knowingly used as training data for this fine-tuning process.

All trademarks, service marks, trade names, product names, and company names mentioned are the property of their respective owners. Use of such names does not imply any affiliation, endorsement, sponsorship, or approval.

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#model-card-authorsModel Card Authors

  • Thomas Yiu

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#model-card-contactModel Card Contact

https://huggingface.co/EpistemeAI/Reasoning-Medical0.1-27B#uploaded-finetuned–modelUploaded finetuned model

  • **Developed by:**EpistemeAI
  • **License:**cc
  • **Finetuned from model :**unsloth/Qwen3.5-27B

This qwen3_5 model was trained 2x faster withUnslothand Huggingface’s TRL library.

Similar Articles

Mia-AiLab/Qwable-3.6-27b

Hugging Face Models Trending

Mia-AiLab releases Qwable-3.6-27b, a full fine-tuned checkpoint of Qwen3.6-27B on a cleaned reasoning and instruction dataset, optimized for coding, technical assistance, and structured responses.

empero-ai/Qwythos-9B-Claude-Mythos-5-1M

Hugging Face Models Trending

Empero AI releases Qwythos-9B, a fine-tuned reasoning model with 1M token context and uncensored capabilities, showing large benchmark improvements over its Qwen3.5-9B base.