Downloads · 30 days
267
30% of all-time downloads
khadim-hussain/gpt-oss-20b-stem-reasoning-GGUF
gpt-oss-20b-stem-reasoning-GGUF is a text generation model from khadim-hussain. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
GGUF quantized version of GPT-OSS-20B fine-tuned for STEM reasoning tasks. Ready for use with Ollama, llama.cpp, LM Studio, and other GGUF-compatible tools.
Downloads · 30 days
267
30% of all-time downloads
All-time downloads
894
Public
Repo size
79.9 GB
Likes
0
Public
Click a slice to open those files.
.gguf79.9 GB · 100%
From the Hugging Face model README
GGUF quantized version of GPT-OSS-20B fine-tuned for STEM reasoning tasks. Ready for use with Ollama, llama.cpp, LM Studio, and other GGUF-compatible tools.
Author: Khadim Hussain · Write-up: Fine-tuning gpt-oss-20b with Unsloth and running it in Ollama
| Model | Size | Description |
|---|---|---|
| gpt-oss-20b-stem-reasoning | ~61MB | LoRA adapter only |
| gpt-oss-20b-stem-reasoning-merged | ~41GB | Full merged model (bf16) |
| gpt-oss-20b-stem-reasoning-GGUF | ~21GB | GGUF Q8_0 (this repo) |
| Filename | Quant | Size | Description |
|---|---|---|---|
gpt-oss-20b-finetuned-f16.gguf | F16 | 39GB | Full 16-bit precision, best quality |
gpt-oss-20b-finetuned-q8_0.gguf | Q8_0 | 21GB | 8-bit quantization, excellent quality |
gpt-oss-20b-finetuned-q4_k_m.gguf | Q4_K_M | 15GB | 4-bit quantization, good balance of size/quality |
# Download the GGUF file and Modelfile
# Then create and run:
ollama create gpt-oss-20b-stem -f Modelfile
ollama run gpt-oss-20b-stem
FROM ./gpt-oss-20b-finetuned-q8_0.gguf
TEMPLATE """<|start|>system<|message|>You are a helpful assistant trained by OpenAI.
Reasoning: medium
# Valid channels: analysis, commentary, final. Channel must be included for every message.<|end|>
{{- if .System }}<|start|>developer<|message|># Instructions
{{ .System }}<|end|>
{{- end }}
{{- range .Messages }}
{{- if eq .Role "user" }}<|start|>user<|message|>{{ .Content }}<|end|>
{{- else if eq .Role "assistant" }}<|start|>assistant<|channel|>final<|message|>{{ .Content }}<|end|>
{{- end }}
{{- end }}<|start|>assistant"""
PARAMETER stop "<|return|>"
PARAMETER temperature 0.7
PARAMETER top_p 0.9
PARAMETER num_ctx 4096
PARAMETER num_predict 2048
The template loops over .Messages so multi-turn chat keeps its format. A template with only {{ .Prompt }} (this repo's first version) renders one question the same, but Ollama treats it as a legacy template and garbles the history from the second message on. Details: khadim.tech.
./llama-cli -m gpt-oss-20b-finetuned-q8_0.gguf \
-p "<|start|>system<|message|>You are a helpful assistant.<|end|><|start|>user<|message|>What is DNA?<|end|><|start|>assistant" \
-n 512
gpt-oss-20b-finetuned-q8_0.ggufGPT-OSS uses the OpenAI Harmony format. The model outputs:
<|channel|>analysis - Thinking/reasoning (displayed as "Thinking..." in Ollama)<|channel|>final - Final answerExample:
Thinking...
DNA stands for deoxyribonucleic acid. It is a polymer made from nucleotides...
...done thinking.
DNA is a molecule that carries genetic instructions used in growth, development, and reproduction.
| Metric | Value |
|---|---|
| Base Model | openai/gpt-oss-20b |
| Train Loss | 1.087 |
| Eval Loss | 0.837 |
| Training Examples | 4,260 |
| Quantization | Q8_0 (8-bit) |
If you use this model, please cite:
@misc{hussain2026gptoss-stem,
author = {Hussain, Khadim},
title = {GPT-OSS-20B STEM Reasoning: Fine-tuned for Science Q&A with Chain-of-Thought},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/khadim-hussain/gpt-oss-20b-stem-reasoning-GGUF}
}
Also cite the original GPT-OSS model:
@misc{openai2025gptoss,
author = {OpenAI},
title = {GPT-OSS: Open-Weight Language Models},
year = {2025},
url = {https://github.com/openai/gpt-oss}
}
Apache 2.0 (inherited from GPT-OSS)