Downloads · 30 days
0
Day1Kim/gpt-oss-20b-korean-reasoner
gpt-oss-20b-korean-reasoner is a text generation model from Day1Kim. 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.
This model is a fine-tuned version of openai/gpt-oss-20b on the Day1Kim/Multilingual-Thinking-KO dataset. It has been trained using TRL.
Downloads · 30 days
0
Access
Public
Updated Aug 12, 2025
Repo size
88.1 MB
Likes
0
Public
Click a slice to open those files.
.safetensors60.2 MB · 68%
From the Hugging Face model README
This model is a fine-tuned version of openai/gpt-oss-20b on the Day1Kim/Multilingual-Thinking-KO dataset. It has been trained using TRL.
한국어 thinking 데이터셋 기반 파인튜닝된 모델.
from transformers import pipeline
question = "한국의 수도는?"
generator = pipeline("text-generation", model="Day1Kim/gpt-oss-20b-korean-reasoner", device="cuda")
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
print(output["generated_text"])
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
# Load the tokenizer
tokenizer = AutoTokenizer.from_pretrained("openai/gpt-oss-20b")
# Load the original model first
model_kwargs = dict(attn_implementation="eager", torch_dtype="auto", use_cache=True, device_map="auto")
base_model = AutoModelForCausalLM.from_pretrained("openai/gpt-oss-20b", **model_kwargs).cuda()
# Merge fine-tuned weights with the base model
peft_model_id = "gpt-oss-20b-korean-reasoner"
model = PeftModel.from_pretrained(base_model, peft_model_id)
model = model.merge_and_unload()
REASONING_LANGUAGE = "Korean"
SYSTEM_PROMPT = f"reasoning language: {REASONING_LANGUAGE}"
USER_PROMPT = "한국의 수도는?"
messages = [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": USER_PROMPT},
]
input_ids = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
).to(model.device)
gen_kwargs = {"max_new_tokens": 512, "do_sample": True, "temperature": 0.6, "top_p": None, "top_k": None}
output_ids = model.generate(input_ids, **gen_kwargs)
response = tokenizer.batch_decode(output_ids)[0]
print(response)
This model was trained with SFT.
Cite TRL as:
@misc{vonwerra2022trl,
title = {{TRL: Transformer Reinforcement Learning}},
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
year = 2020,
journal = {GitHub repository},
publisher = {GitHub},
howpublished = {\url{https://github.com/huggingface/trl}}
}