Instructions to use EpistemeAI/gpt-oss-20b-mmlustem with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use EpistemeAI/gpt-oss-20b-mmlustem with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/gpt-oss-20b-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "EpistemeAI/gpt-oss-20b-mmlustem") - Transformers
How to use EpistemeAI/gpt-oss-20b-mmlustem with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="EpistemeAI/gpt-oss-20b-mmlustem") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("EpistemeAI/gpt-oss-20b-mmlustem", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use EpistemeAI/gpt-oss-20b-mmlustem with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "EpistemeAI/gpt-oss-20b-mmlustem" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EpistemeAI/gpt-oss-20b-mmlustem", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/EpistemeAI/gpt-oss-20b-mmlustem
- SGLang
How to use EpistemeAI/gpt-oss-20b-mmlustem 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 "EpistemeAI/gpt-oss-20b-mmlustem" \ --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": "EpistemeAI/gpt-oss-20b-mmlustem", "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 "EpistemeAI/gpt-oss-20b-mmlustem" \ --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": "EpistemeAI/gpt-oss-20b-mmlustem", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use EpistemeAI/gpt-oss-20b-mmlustem with Docker Model Runner:
docker model run hf.co/EpistemeAI/gpt-oss-20b-mmlustem
|
Download README.md from EpistemeAI/gpt-oss-20b-mmlustem: direct link, hf CLI and curl.
- Browser
- Download file 6.9 kB
-
https://huggingface.co/EpistemeAI/gpt-oss-20b-mmlustem/resolve/main/README.md
- Command line
-
hf download hf://EpistemeAI/gpt-oss-20b-mmlustem/README.md
-
curl -L -o README.md https://huggingface.co/EpistemeAI/gpt-oss-20b-mmlustem/resolve/main/README.md
6.9 kB
| base_model: unsloth/gpt-oss-20b-unsloth-bnb-4bit | |
| library_name: peft | |
| pipeline_tag: text-generation | |
| tags: | |
| - base_model:adapter:unsloth/gpt-oss-20b-unsloth-bnb-4bit | |
| - lora | |
| - sft | |
| - transformers | |
| - trl | |
| - unsloth | |
| # Model Card for EpistemeAI/gpt-oss-20b-mmlustem | |
| Early experiment on self generated synthetic fine tuning techniques. | |
| Specialize with STEM and science for science purpose AI. | |
| ## Model Details | |
| ### Model Description | |
| Specialize with STEM and science for science purpose AI. This idea captures the need to design artificial intelligence systems that aren’t just generalists but are deeply tuned for scientific exploration and problem-solving. By focusing on science, technology, engineering, and mathematics, such AI can move beyond surface-level pattern recognition and instead tackle real challenges in physics, biology, chemistry, and mathematics with rigor. Imagine AI models that assist in discovering new materials, predicting protein folding with precision, optimizing renewable energy systems, or solving abstract mathematical conjectures. These are not applications where shallow training suffices—this requires an AI mindset that mirrors the scientific method: hypothesize, test, refine, and explain. A purpose-built science AI would act less like a chatbot and more like a laboratory collaborator, accelerating the pace of discovery while remaining grounded in evidence and reproducibility. | |
| - **Developed by:** Thomas YIu | |
| - **Model type:** GPT, gpt oss 20b | |
| - **Language(s) (NLP):** English and others | |
| - **License:** apache-2.0 | |
| - **Finetuned from model [optional]:** unsloth/gpt-oss-20b-unsloth-bnb-4bit | |
| ### Model Sources [optional] | |
| <!-- Provide the basic links for the model. --> | |
| - **Repository:** [More Information Needed] | |
| - **Paper [optional]:** [More Information Needed] | |
| - **Demo [optional]:** [More Information Needed] | |
| # GPT-OSS-20B STEM Fine-Tuned | |
| Specialized large language model fine-tuned for **STEM (Science, Technology, Engineering, and Mathematics)** domains. | |
| Improved **MMLU-STEM performance by 30%** through special fine-tuning of GPT-OSS-20B with a self-generated dataset containing reasoning traces and domain-specific multiple-choice questions. | |
| --- | |
| ## Uses | |
| ### Direct Use | |
| - Answering science and engineering multiple-choice questions with higher accuracy. | |
| - Providing reasoning traces in mathematics and STEM domains. | |
| - Assisting as a study aid for researchers, engineers, and students in technical fields. | |
| ### Downstream Use (optional) | |
| - Reasoning engine for tutoring systems in physics, math, chemistry, or engineering. | |
| - Core component in scientific research assistants (hypothesis testing, summarizing papers). | |
| - Backend for exam preparation platforms and evaluation pipelines. | |
| ### Out-of-Scope Use | |
| - High-stakes decision-making without human verification (e.g., medical diagnoses, autonomous lab control). | |
| - Non-STEM general knowledge or commonsense tasks outside the model’s training domain. | |
| - Applications requiring ethical or social judgment. | |
| --- | |
| ## Bias, Risks, and Limitations | |
| - The model is biased toward **STEM reasoning tasks** and may underperform on humanities or everyday reasoning. | |
| - Risk of **hallucinated precision**: outputs may appear mathematically rigorous but contain subtle errors. | |
| - Users should treat results as **hypotheses, not ground truth**. | |
| ### Recommendations | |
| - Always apply **human oversight** in professional or research-grade applications. | |
| - For safe deployment, pair the model with verification tools (e.g., symbolic solvers, fact-checkers). | |
| --- | |
| ## Getting Started | |
| ### installation | |
| ``` | |
| pip install -q --upgrade torch | |
| pip install -q transformers triton==3.4 kernels | |
| pip uninstall -q torchvision torchaudio -y | |
| pip uninstall -y bitsandbytes | |
| pip install -U bitsandbytes | |
| ``` | |
| ```python | |
| import bitsandbytes as bnb | |
| from peft import PeftModel | |
| from transformers import AutoModelForCausalLM | |
| base_model = AutoModelForCausalLM.from_pretrained("unsloth/gpt-oss-20b-unsloth-bnb-4bit") | |
| model = PeftModel.from_pretrained(base_model, "EpistemeAI/gpt-oss-20b-mmlustem") | |
| ``` | |
| # Training Details | |
| ## Training Data | |
| - Self-generated STEM dataset (MMLU-style Q&A + reasoning traces). | |
| - Balanced coverage of **physics, chemistry, biology, computer science, and mathematics**. | |
| ## Training Procedure | |
| - **Preprocessing:** Tokenization, reasoning trace generation, Alpaca-style formatting. | |
| - **Training regime:** bf16 mixed precision | |
| - **Batch size:** 2 per device (gradient accumulation = 4) | |
| - **Learning rate:** 2e-4 with cosine scheduler | |
| - **Epochs:** 4 | |
| - **Optimizer:** AdamW 8-bit | |
| ## Compute | |
| - **Model size:** 20B parameters | |
| - **Fine-tuning time:** ~24 GPU-hours on 8×A100-40GB | |
| - **Checkpoint size:** ~40GB (smaller if LoRA adapters used) | |
| --- | |
| # Evaluation | |
| ## Testing Data | |
| - **MMLU-STEM subset** (10k+ science and engineering multiple-choice questions). | |
| ## Metrics | |
| - **Accuracy** (primary). | |
| - **Reasoning consistency** (qualitative). | |
| ## Results | |
| | Domain | Baseline GPT-OSS-20B | Fine-Tuned GPT-OSS-20B | Δ Improvement | | |
| |----------------|----------------------|-------------------------|---------------| | |
| | Mathematics | 52% | 69% | +17% | | |
| | Physics | 48% | 64% | +16% | | |
| | Chemistry | 50% | 66% | +16% | | |
| | Biology | 55% | 70% | +15% | | |
| | Comp. Science | 58% | 72% | +14% | | |
| | **Average** | **53%** | **69%** | **+16%** | | |
| **Summary:** Fine-tuning with STEM-specialized data produced substantial gains in domain-specific reasoning, particularly in mathematics and physics. | |
| --- | |
| # Environmental Impact | |
| - **Hardware Type:** 8× NVIDIA A100-40GB | |
| - **Hours used:** ~24 | |
| - **Cloud Provider:** [specify, e.g., AWS/GCP/Azure] | |
| - **Region:** [specify, e.g., us-west-2] | |
| - **Carbon Emitted:** Estimate ≈ XX kg CO2eq (calculated with [ML Impact Calculator](https://mlco2.github.io/impact#compute)) | |
| --- | |
| # Technical Specifications | |
| ## Model Architecture | |
| - Decoder-only Transformer (GPT-OSS-20B). | |
| - Fine-tuned for causal LM objective with instruction-response data. | |
| ## Compute Infrastructure | |
| - **Hardware:** 8× A100-40GB GPUs (NVLink). | |
| - **Software:** PyTorch, Hugging Face Transformers, TRL, Unsloth. | |
| - **Precision:** bf16 mixed precision. | |
| - **Optimizer:** AdamW 8-bit. | |
| --- | |
| # License | |
| apache | |
| --- | |
| # Citation | |
| If you use this model in your research, please cite: | |
| ```bibtex | |
| @misc{gptoss20b_stem, | |
| author = {Theomas Yiu}, | |
| title = {GPT-OSS-20B STEM Fine-Tuned}, | |
| year = {2025}, | |
| publisher = {Hugging Face}, | |
| howpublished = {\url{https://huggingface.co/your-username/gpt-oss-20b-stem-finetuned}} | |
| } | |
| ``` | |
| ### Framework versions | |
| - PEFT 0.17.1 |