Downloads · 30 days
45
3% of all-time downloads
yasserrmd/gpt-oss-coder-20b
gpt-oss-coder-20b is a text generation model from yasserrmd. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
45
3% of all-time downloads
All-time downloads
1.3K
Public
Parameters
12B
13.8 GB on disk
Likes
13
Public
Click a slice to open those files.
.safetensors13.8 GB · 100%
How the weights are stored.
U810.2B · 85%
From the Hugging Face model README
This model is a fine-tuned version of OpenAI's GPT-OSS-20B, optimized for code generation tasks. The fine-tuning leveraged the Unsloth library to enable efficient low-bit quantized training and inference.
This model is designed to assist with:
reasoning_effortThe reasoning_effort parameter influences the model's focus during text generation:
low: Produces straightforward, concise answers suitable for simple coding tasks.medium: Balances speed and detail, suitable for moderate complexity tasks.high: Encourages detailed and complex reasoning, useful for advanced code generation or explanations.Adjusting this parameter allows you to control the depth of the model's reasoning process, balancing between performance and response complexity.
from transformers import AutoTokenizer, AutoModelForCausalLM
from transformers import TextStreamer
tokenizer = AutoTokenizer.from_pretrained("yasserrmd/gpt-oss-coder-20b")
model = AutoModelForCausalLM.from_pretrained("yasserrmd/gpt-oss-coder-20b")
messages = [
{"role": "system", "content": "You are a helpful coding assistant."},
{"role": "user", "content": "Using Python to connect MySQL and retrieve table 'employee' where empno is 1234."},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
return_dict=True,
reasoning_effort="low",
).to(model.device)
streamer = TextStreamer(tokenizer)
_ = model.generate(**inputs, max_new_tokens=512, streamer=streamer)
The fine-tuning process adapted GPT-OSS-20B to better assist with coding tasks by fine-tuning on a dataset of 1 million random records. The training utilized only the Unsloth library for efficient low-bit quantized fine-tuning.
@misc{yasserrmd2025gptosscoder20b,
author = {Yasser RMD},
title = {GPT-OSS-Coder-20B},
year = {2025},
publisher = {Hugging Face},
journal = {Hugging Face Model Hub},
url = {https://huggingface.co/yasserrmd/gpt-oss-coder-20b}
}