Medical Reasoning GPT-OSS-20B

Model Description

This is a fine-tuned version of unsloth/gpt-oss-20b specifically optimized for medical reasoning and clinical decision-making. The model has been trained on high-quality medical reasoning datasets to provide accurate and thoughtful responses to medical queries.

🏥 Key Features

  • Medical Expertise: Specialized in medical reasoning, diagnosis, and clinical decision-making
  • Complex Reasoning: Uses chain-of-thought reasoning for medical problems
  • Safety-Focused: Trained with responsible AI practices for healthcare applications
  • Large Scale: 20B parameters for comprehensive medical knowledge
  • Ready-to-Use: Full model (not just LoRA adapter) - no additional setup required

🚀 Quick Start

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig

quantization_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_compute_dtype=torch.bfloat16,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_use_double_quant=True
)

model_id = "dousery/medical-reasoning-gpt-oss-20b"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    quantization_config=quantization_config,
    device_map="auto"
)

prompt = "A patient has symptoms of fever and cough. What could be the diagnosis?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

outputs = model.generate(
    **inputs,
    max_new_tokens=512,
    temperature=0.7,
    do_sample=True,
    eos_token_id=tokenizer.eos_token_id,
    pad_token_id=tokenizer.eos_token_id
)
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)

print(generated_text)

📊 Training Details

Training Data

Training Configuration

  • Base Model: unsloth/gpt-oss-20b (20B parameters)
  • Training Method: LoRA (Low-Rank Adaptation) fine-tuning
  • LoRA Rank: 8
  • Learning Rate: 2e-4
  • Batch Size: 4 (effective)
  • Epochs: 1
  • Hardware: NVIDIA B200 (4x GPUs)
  • Framework: Unsloth + TRL
  • Final Training Loss: 0.88

Model Architecture

  • Parameters: 20.9 billion
  • Architecture: GPT-OSS (Transformer-based)
  • Context Length: 1,024 tokens
  • Trainable Parameters: 3.98M (0.02% of total)

🎯 Intended Use

Primary Use Cases

  • Medical Education: Explaining medical concepts and procedures
  • Clinical Reasoning: Analyzing symptoms and differential diagnosis
  • Research Support: Assisting in medical research and literature review
  • Decision Support: Providing reasoning for clinical decisions (with human oversight)

⚠️ Important Disclaimers

  • Not a Medical Device: This model is for educational and research purposes only
  • Human Oversight Required: All medical decisions should involve qualified healthcare professionals
  • Accuracy Not Guaranteed: Model outputs should be verified against current medical literature
  • Regional Variations: Training data may not reflect all regional medical practices

🔍 Evaluation

The model demonstrates strong performance in:

  • Medical concept explanation
  • Differential diagnosis reasoning
  • Treatment option analysis
  • Pathophysiology understanding

Note: Comprehensive clinical evaluation is ongoing. Always validate outputs with current medical guidelines.

📈 Performance Metrics

  • Training Loss: 10.78 → 0.88 (significant improvement)
  • Convergence: Stable training with consistent loss reduction
  • Reasoning Quality: Maintains logical chain-of-thought structure

🛠️ Technical Requirements

Minimum Requirements

  • GPU Memory: 16GB+ VRAM recommended
  • RAM: 32GB+ system memory
  • Storage: 40GB+ free space

Optimized for

  • Inference: FP16/BF16 precision
  • Frameworks: Transformers, Unsloth, TRL
  • Hardware: NVIDIA GPUs with Compute Capability 7.0+

📜 License

This model is released under the Apache 2.0 license. Please review the license terms before commercial use.

🙏 Acknowledgments

📞 Contact

For questions, issues, or collaboration opportunities, please reach out through the HuggingFace community discussions or my Linkedin account : Linkedin

Version: 1.0
Release Date: January 2025
Model Type: Causal Language Model
Training Infrastructure: Modal Labs B200 GPU Cluster

Downloads last month
94
Safetensors
Model size
20.9B params
Tensor type
F32
·
BF16
·
U8
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 1 Ask for provider support

Model tree for dousery/medical-reasoning-gpt-oss-20b

Base model

openai/gpt-oss-20b
Quantized
(4)
this model

Evaluation results