Downloads · 30 days
17
43% of all-time downloads
jiwon9703/gpt-oss-120b-qlora-v2
gpt-oss-120b-qlora-v2 is a machine learning model from jiwon9703. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
GPT-OSS 120B 모델을 위한 QLoRA (Quantized Low-Rank Adaptation) 어댑터입니다. Unsloth 라이브러리를 사용하여 파인튜닝되었습니다.
Downloads · 30 days
17
43% of all-time downloads
All-time downloads
40
Public
Repo size
75.7 MB
Likes
0
Public
Click a slice to open those files.
.safetensors47.8 MB · 63%
From the Hugging Face model README
GPT-OSS 120B 모델을 위한 QLoRA (Quantized Low-Rank Adaptation) 어댑터입니다. Unsloth 라이브러리를 사용하여 파인튜닝되었습니다.
unsloth/gpt-oss-120b-unsloth-bnb-4bitq_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_projpip install unsloth transformers accelerate
from unsloth import FastLanguageModel
# 베이스 모델과 함께 어댑터 로드
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="jiwon9703/gpt-oss-120b-qlora-4bit-v2",
max_seq_length=8192,
load_in_4bit=True,
device_map="auto",
)
# 추론 모드로 전환
FastLanguageModel.for_inference(model)
messages = [
{"role": "user", "content": "한국의 수도는 어디인가요?"}
]
# reasoning effort와 함께 채팅 템플릿 적용
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
return_dict=True,
reasoning_effort="medium", # "low", "medium", "high" 중 선택
).to("cuda")
# 응답 생성
outputs = model.generate(
**inputs,
max_new_tokens=512,
temperature=0.7,
top_p=0.9,
do_sample=True,
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
GPT-OSS는 다양한 추론 강도를 지원합니다:
low: 빠르고 간결한 응답medium: 균형잡힌 추론 (기본값)high: 단계별 사고를 통한 깊이있는 상세 추론# 높은 추론 강도 예시
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
return_dict=True,
reasoning_effort="high", # 더 철저한 추론
).to("cuda")
이 어댑터는 다음을 사용하여 학습되었습니다:
adapter_model.safetensors: LoRA 어댑터 가중치 (~46MB)adapter_config.json: 어댑터 설정tokenizer.json: 토크나이저 어휘tokenizer_config.json: 토크나이저 설정chat_template.jinja: 포맷팅을 위한 채팅 템플릿special_tokens_map.json: 특수 토큰 매핑