Downloads · 30 days
12
29% of all-time downloads
HwanChang0106/qwen3-seq-sort-ko
qwen3-seq-sort-ko is a text generation model from HwanChang0106. Use it when you need the model to write or continue text. It is set up for peft.
This repo contains only the LoRA adapter and tokenizer/template files for a Qwen3-8B base model. Use it by loading the base model first and then applying this adapter with PEFT.
Downloads · 30 days
12
29% of all-time downloads
All-time downloads
42
Public
Repo size
2.8 GB
Likes
0
Public
Click a slice to open those files.
.safetensors2.8 GB · 99%
From the Hugging Face model README
This repo contains only the LoRA adapter and tokenizer/template files for a Qwen3-8B base model. Use it by loading the base model first and then applying this adapter with PEFT.
Qwen/Qwen3-8B (replace with your exact base if different)HwanChang0106/qwen3-seq-sort-koPython example:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_id = "Qwen/Qwen3-8B" # base model
lora_id = "HwanChang0106/qwen3-seq-sort-ko" # this repo
tok = AutoTokenizer.from_pretrained(base_id, trust_remote_code=True)
base = AutoModelForCausalLM.from_pretrained(
base_id,
torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.float32,
device_map="auto",
trust_remote_code=True,
)
model = PeftModel.from_pretrained(base, lora_id)
prompt = "다음 수열을 오름차순으로 정렬하세요: 3, 1, 2"
inputs = tok(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=64)
print(tok.decode(outputs[0], skip_special_tokens=True))
If you prefer to merge the LoRA into the base weights for pure HF usage:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base = AutoModelForCausalLM.from_pretrained(base_id, device_map="auto")
model = PeftModel.from_pretrained(base, lora_id)
merged = model.merge_and_unload() # returns a merged base model
adapter_model.safetensors, adapter_config.jsontokenizer.json, tokenizer_config.json, special_tokens_map.json, added_tokens.json, vocab.json, merges.txt, chat_template.jinjaOptimizer or training state files are not included.
trust_remote_code=True when using Qwen models.