Instructions to use arunimas1107/gpt-oss-medical with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use arunimas1107/gpt-oss-medical with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("openai/gpt-oss-20b") model = PeftModel.from_pretrained(base_model, "arunimas1107/gpt-oss-medical") - Transformers
How to use arunimas1107/gpt-oss-medical with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="arunimas1107/gpt-oss-medical") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("arunimas1107/gpt-oss-medical", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use arunimas1107/gpt-oss-medical with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "arunimas1107/gpt-oss-medical" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arunimas1107/gpt-oss-medical", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/arunimas1107/gpt-oss-medical
- SGLang
How to use arunimas1107/gpt-oss-medical with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "arunimas1107/gpt-oss-medical" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arunimas1107/gpt-oss-medical", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "arunimas1107/gpt-oss-medical" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arunimas1107/gpt-oss-medical", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use arunimas1107/gpt-oss-medical with Docker Model Runner:
docker model run hf.co/arunimas1107/gpt-oss-medical
Model Card for Medical GPT-OSS-20B LoRA Adapter
Model Details
Model Description
This model is a LoRA adapter fine-tuned on openai/gpt-oss-20b using the PEFT library. It is optimized for medical domain tasks such as question answering, summarization, and knowledge retrieval in healthcare contexts. The adapter modifies the base model with efficient fine-tuning techniques while retaining the general-purpose reasoning capabilities of the underlying 20B parameter model.
- Developed by: Arunima Surendran
- Funded by: E2E Cloud
- Shared by: Arunima Surendran
- Model type: Large Language Model with LoRA adapter (20B base)
- Language(s): English
- License: Apache 2.0
- Finetuned from model: openai/gpt-oss-20b
- Finetuned using: NVIDIA 2xH100 for 12+ hours on E2E Cloud TIR Instance
Model Sources
- Repository: arunimakanavu/gpt-oss-medical
Requirements
torch>=2.0.0
transformers @ git+https://github.com/huggingface/transformers.git
datasets>=2.12.0
peft>=0.10.0
accelerate>=0.22.0
bitsandbytes>=0.41.0
sentencepiece>=0.1.99
Uses
Direct Use
- Medical Q&A
- Clinical text summarization
- Educational content generation in healthcare
Downstream Use
- Integrating into RAG pipelines with domain-specific medical knowledge bases
- Deployment in medical chatbots (for informational purposes only)
Out-of-Scope Use
- Direct clinical decision-making or diagnostic tools without human oversight
- High-stakes medical applications without proper validation
Bias, Risks, and Limitations
The model may generate:
- Inaccurate or hallucinated medical information
- Biased outputs due to limitations in training data
- Text not suitable for unsupervised clinical decision-making
Recommendations
Users should:
- Treat outputs as assistive, not authoritative
- Always cross-verify with trusted medical sources
- Avoid using the model for patient-facing diagnosis without professional review
How to Get Started with the Model
from transformers import AutoModelForCausalLM, AutoTokenizer, PeftModel
base_model = "openai/gpt-oss-20b"
adapter_path = "./gpt-oss-medical"
model = AutoModelForCausalLM.from_pretrained(base_model, device_map="auto", torch_dtype="auto")
model = PeftModel.from_pretrained(model, adapter_path)
tokenizer = AutoTokenizer.from_pretrained(base_model)
Training Details
Training Data
- FreedomIntelligence/medical-o1-reasoning-SFT
- Domain-specific medical text corpus
- Filtered for quality and relevance
Training Procedure
- Fine-tuned using LoRA on top of GPT-OSS-20B
- Mixed precision training (
bf16)
Training Hyperparameters
- Training regime: bf16 mixed precision
- Compute: NVIDIA 2xH200 GPUs
- Training time: 12+ hours
Evaluation
Testing Data, Factors & Metrics
- Domain: medical Q&A and summarization
- Metrics: Perplexity, BLEU/ROUGE for summarization, accuracy for Q&A
Results
- BERTScore = 0.834
Environmental Impact
- Hardware Type: NVIDIA 2xH200 (E2E TIR platform)
- Hours used: 12+
- Cloud Provider: E2E Networks
Technical Specifications
Model Architecture and Objective
- Base: GPT-OSS-20B (20 billion parameters)
- Adapter: LoRA (low-rank fine-tuning)
Compute Infrastructure
- Hardware: NVIDIA 2xH100 (E2E TIR)
- Software: PyTorch, Transformers, PEFT
Citation
BibTeX:
@misc{gptoss20b-medical,
title = {Medical GPT-OSS-20B LoRA Adapter},
author = {Arunima Surendran},
year = {2025},
url = {https://github.com/arunimakanavu/gpt-oss-medical}
}
Model Card Authors
- Arunima Surendran
Framework versions
- PEFT 0.17.0
- Downloads last month
- 3
Model tree for arunimas1107/gpt-oss-medical
Base model
openai/gpt-oss-20b