CoolFace
Modelpublic

Intelligent-Internet/II-Medical-8B

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
214likes1.1kdownloads
Model Card

II-Medical-8B

<div style="display: flex; justify-content: center;"> <img src="https://cdn-uploads.huggingface.co/production/uploads/6389496ff7d3b0df092095ed/73Y-oDmehp0eJ2HWrfn3V.jpeg" width="800"> </div>

I. Model Overview

II-Medical-8B is the newest advanced large language model developed by Intelligent Internet, specifically engineered to enhance AI-driven medical reasoning. Following the positive reception of our previous II-Medical-7B-Preview, this new iteration significantly advances the capabilities of medical question answering,

II. Training Methodology

We collected and generated a comprehensive set of reasoning datasets for the medical domain and performed SFT fine-tuning on the Qwen/Qwen3-8B model. Following this, we further optimized the SFT model by training DAPO on a hard-reasoning dataset to boost performance.

For SFT stage we using the hyperparameters:

  • Max Length: 16378.
  • Batch Size: 128.
  • Learning-Rate: 5e-5.
  • Number Of Epoch: 8.

For RL stage we setup training with:

  • Max prompt length: 2048 tokens.
  • Max response length: 12288 tokens.
  • Overlong buffer: Enabled, 4096 tokens, penalty factor 1.0.
  • Clip ratios: Low 0.2, High 0.28.
  • Batch sizes: Train prompt 512, Generation prompt 1536, Mini-batch 32.
  • Responses per prompt: 16.
  • Temperature: 1.0, Top-p: 1.0, Top-k: -1 (vLLM rollout).
  • Learning rate: 1e-6, Warmup steps: 10, Weight decay: 0.1.
  • Loss aggregation: Token-mean.
  • Gradient clipping: 1.0.
  • Entropy coefficient: 0.

III. Evaluation Results

Our II-Medical-8B model achieved a 40% score on HealthBench, a comprehensive open-source benchmark evaluating the performance and safety of large language models in healthcare. This performance is comparable to OpenAI's o1 reasoning model and GPT-4.5, OpenAI's largest and most advanced model to date. We provide a comparison to models available in ChatGPT below.

image/jpeg Detailed result for HealthBench can be found here.

Model Benchmark

We evaluate on ten medical QA benchmarks include MedMCQA, MedQA, PubMedQA, medical related questions from MMLU-Pro and GPQA, small QA sets from Lancet and the New England Journal of Medicine, 4 Options and 5 Options splits from the MedBullets platform and MedXpertQA.

ModelMedMCMedQAPubMedMMLU-PGPQALancetMedB-4MedB-5MedXNEJMAvg
HuatuoGPT-o1-72B76.7688.8579.9080.4664.3670.8777.2773.0523.5376.2971.13
QWQ 32B69.7387.0388.579.8669.1771.372.0769.0124.9875.1270.68
Qwen2.5-7B-IT56.5661.5171.361.1742.5661.1746.7540.5813.2659.0451.39
HuatuoGPT-o1-8B63.9774.7880.1063.7155.3864.3258.4451.9515.7964.8459.32
Med-reason61.6771.8777.464.150.5159.760.0654.2222.8766.859.92
M162.5475.8175.8065.8653.0862.6263.6459.7419.5964.3460.3
II-Medical-8B-SFT71.9286.5777.477.2665.6469.1776.3067.5323.7973.8068.80
II-Medical-8B71.5787.8278.280.4667.1870.3878.2572.0725.2673.1370.49

IV. Dataset Curation

The training dataset comprises 555,000 samples from the following sources:

1. Public Medical Reasoning Datasets (103,031 samples)

2. Synthetic Medical QA Data with QwQ (225,700 samples)

Generated from established medical datasets:

  • MedMcQA (from openlifescienceai/medmcqa): 183,000 samples
  • MedQA: 10,000 samples
  • MedReason: 32,700 samples

3. Curated Medical R1 Traces (338,055 samples)

First we gather all the public R1 traces from:

All R1 reasoning traces were processed through a domain-specific pipeline as follows:

  1. 1.Embedding Generation: Prompts are embedded using sentence-transformers/all-MiniLM-L6-v2.
  1. 1.Clustering: Perform K-means clustering with 50,000 clusters.
  1. 1.Domain Classification:
  • For each cluster, select the 10 prompts nearest to the cluster center.
  • Classify the domain of each selected prompt using Qwen2.5-32b-Instruct.
  • Assign the cluster's domain based on majority voting among the classified prompts.
  1. 1.Domain Filtering: Keep only clusters labeled as Medical or Biology for the final dataset.

4. Supplementary Math Dataset

  • Added 15,000 samples of reasoning traces from light-r1
  • Purpose: Enhance general reasoning capabilities of the model

Preprocessing Data

  1. 1.Filtering for Complete Generation
  2. 2.Retained only traces with complete generation outputs
  1. 1.Length-based Filtering
  2. 2.Minimum threshold: Keep only the prompt with more than 3 words.
  3. 3.Wait Token Filter: Removed traces with has more than 47 occurrences of "Wait" (97th percentile threshold).

Data Decontamination

We using two step decontamination:

  1. 1.Following open-r1 project: We decontaminate a dataset using 10-grams with the evaluation datasets.
  2. 2.After that, we using the fuzzy decontamination from `s1k` method with threshold 90%.

Our pipeline is carefully decontaminated with the evaluation datasets.

V. How To Use

Our model can be utilized in the same manner as Qwen or Deepseek-R1-Distill models.

For instance, you can easily start a service using vLLM:

bash
vllm serve Intelligent-Internet/II-Medical-8B

You can also easily start a service using SGLang:

bash
python -m sglang.launch_server --model Intelligent-Internet/II-Medical-8B

VI. Usage Guidelines

  • Recommended Sampling Parameters: temperature = 0.6, top_p = 0.9
  • When using, explicitly request step-by-step reasoning and format the final answer within \boxed{} (e.g., "Please reason step-by-step, and put your final answer within \boxed{}.").

VII. Limitations and Considerations

  • Dataset may contain inherent biases from source materials
  • Medical knowledge requires regular updates
  • Please note that It’s not suitable for medical use.

VIII. Citation

bib
@misc{2025II-Medical-8B,
      title={II-Medical-8B: Medical Reasoning Model}, 
      author={Intelligent Internet},
      year={2025}
}