Instructions to use HwanChang0106/qwen3-seq-sort-ko with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use HwanChang0106/qwen3-seq-sort-ko with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-8B") model = PeftModel.from_pretrained(base_model, "HwanChang0106/qwen3-seq-sort-ko") - Transformers
How to use HwanChang0106/qwen3-seq-sort-ko with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HwanChang0106/qwen3-seq-sort-ko") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("HwanChang0106/qwen3-seq-sort-ko", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use HwanChang0106/qwen3-seq-sort-ko with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HwanChang0106/qwen3-seq-sort-ko" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HwanChang0106/qwen3-seq-sort-ko", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HwanChang0106/qwen3-seq-sort-ko
- SGLang
How to use HwanChang0106/qwen3-seq-sort-ko with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "HwanChang0106/qwen3-seq-sort-ko" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HwanChang0106/qwen3-seq-sort-ko", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "HwanChang0106/qwen3-seq-sort-ko" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HwanChang0106/qwen3-seq-sort-ko", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use HwanChang0106/qwen3-seq-sort-ko with Docker Model Runner:
docker model run hf.co/HwanChang0106/qwen3-seq-sort-ko
Qwen3-8B LoRA: Korean Sequence Sorting
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.
Usage
- Base model:
Qwen/Qwen3-8B(replace with your exact base if different) - Adapter repo (this repo):
HwanChang0106/qwen3-seq-sort-ko
Python 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
Files
- adapter:
adapter_model.safetensors,adapter_config.json - tokenizer/template:
tokenizer.json,tokenizer_config.json,special_tokens_map.json,added_tokens.json,vocab.json,merges.txt,chat_template.jinja
Optimizer or training state files are not included.
Notes
- Ensure
trust_remote_code=Truewhen using Qwen models. - Match the exact base checkpoint you trained on for best results.
- Downloads last month
- -