GPT-OSS-20B Korean Three-Part Response LoRA

This repository contains a QLoRA adapter for GPT-OSS-20B. It was trained to answer Korean prompts using the following three-part structure:

요약
...

설명
...

다음 행동
...

Only the adapter is included. The base model is downloaded separately when the adapter is loaded.

Model Details

Intended Use

This adapter is intended for experiments that require concise Korean answers organized into a summary, explanation, and a concrete next action. It can be used for local inference, demonstrations, and further PEFT training.

It is not intended to provide authoritative medical, legal, financial, or safety-critical advice.

How to Use

Install Unsloth and load the adapter directly from the Hub:

from unsloth import FastLanguageModel

import torch


model, tokenizer = FastLanguageModel.from_pretrained(
    model_name="sio5/gpt-oss-20b-format-lora",
    max_seq_length=512,
    dtype=None,
    load_in_4bit=True,
)
FastLanguageModel.for_inference(model)

messages = [
    {"role": "user", "content": "새 프로젝트를 시작할 때 무엇부터 해야 해?"},
]
prompt = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=False,
    reasoning_effort="low",
)
prompt += "<|start|>assistant<|message|>"
inputs = tokenizer(
    prompt,
    add_special_tokens=False,
    return_tensors="pt",
).to(model.device)

with torch.inference_mode():
    output_ids = model.generate(
        **inputs,
        max_new_tokens=256,
        do_sample=False,
        pad_token_id=tokenizer.eos_token_id,
    )

new_tokens = output_ids[0, inputs["input_ids"].shape[1] :]
response = tokenizer.decode(new_tokens, skip_special_tokens=False)
response = response.split("<|return|>", maxsplit=1)[0].strip()
print(response)

The explicit assistant message prefix matches the prompt/completion boundary used during supervised fine-tuning.

Training

Data

The adapter was trained on 20 manually authored, single-turn Korean examples. Every target answer contains the exact headings 요약, 설명, and 다음 행동 in that order. The examples cover general productivity, software engineering, security, planning, and everyday tasks.

No personal or private user conversations were included.

Procedure

  • Method: Supervised fine-tuning with 4-bit QLoRA
  • Framework: Unsloth with TRL and PEFT
  • LoRA target modules: q_proj, k_proj, v_proj, o_proj
  • LoRA rank: 8
  • LoRA alpha: 16
  • LoRA dropout: 0
  • Trainable parameters: 3,981,312 of 20,918,738,496 (0.019%)
  • Maximum sequence length: 256
  • Per-device batch size: 1
  • Gradient accumulation steps: 2
  • Effective batch size: 2
  • Learning rate: 2e-4
  • Optimizer: 8-bit AdamW
  • Precision: BF16
  • Training steps: 50
  • Epochs: 5
  • Seed: 42

Training was performed locally on one NVIDIA GeForce RTX 5090. The recorded training runtime was 175.8 seconds.

Evaluation

The adapter was evaluated on 15 held-out Korean prompts that were not included in the training set. The evaluation checked whether all three headings appeared on their own lines and in the required order.

Metric Result
Format adherence 15/15 (100%)
First logged training loss 13.9844
Final logged training loss 1.2626
Minimum logged training loss 1.0610
Mean training loss 2.9348

Training metrics

Limitations

  • The training set contains only 20 examples and is designed for a narrow formatting objective.
  • The 15-prompt evaluation measures structural compliance, not factual correctness, usefulness, safety, or robustness.
  • The adapter may overfit to short advice-style answers and may not preserve the full reasoning behavior of the base model.
  • Outputs inherit the biases, risks, and limitations of GPT-OSS-20B.
  • Generated answers should be reviewed before use in high-impact settings.

Framework Versions

  • Unsloth 2026.9.2
  • PEFT 0.20.0
  • Transformers 4.56.2
  • TRL 0.24.0
  • PyTorch 2.11.0+cu130
Downloads last month
22
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for sio5/gpt-oss-20b-format-lora

Adapter
(82)
this model