Text Generation
Transformers
Safetensors
Korean
qwen3
kaidol
chatbot
idol
thinking
qwen
lora
conversational
text-generation-inference
Instructions to use developer-lunark/kaidol-thinking-sft-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use developer-lunark/kaidol-thinking-sft-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="developer-lunark/kaidol-thinking-sft-4b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("developer-lunark/kaidol-thinking-sft-4b") model = AutoModelForCausalLM.from_pretrained("developer-lunark/kaidol-thinking-sft-4b", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use developer-lunark/kaidol-thinking-sft-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "developer-lunark/kaidol-thinking-sft-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "developer-lunark/kaidol-thinking-sft-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/developer-lunark/kaidol-thinking-sft-4b
- SGLang
How to use developer-lunark/kaidol-thinking-sft-4b 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 "developer-lunark/kaidol-thinking-sft-4b" \ --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": "developer-lunark/kaidol-thinking-sft-4b", "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 "developer-lunark/kaidol-thinking-sft-4b" \ --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": "developer-lunark/kaidol-thinking-sft-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use developer-lunark/kaidol-thinking-sft-4b with Docker Model Runner:
docker model run hf.co/developer-lunark/kaidol-thinking-sft-4b
KAIdol Thinking SFT Model (Model G)
μμ΄λ μ±λ΄ KAIλ₯Ό μν Fine-tuned λͺ¨λΈμ λλ€.
λͺ¨λΈ μ 보
| νλͺ© | κ° |
|---|---|
| Base Model | Qwen3-4B-Thinking-2507 |
| Fine-tuning | LoRA (r=32, alpha=64) |
| Dataset | Balanced Upsampled (52,879 train / 5,875 eval) |
| Training | SFT |
μ±λ₯
μΌλ° νκ° (300 μν)
- μλ΅ νμ§: 0.598
- μ μ± μ€μμ¨: 99.67%
- μ¬λ κ³ λ°± μλ°μ¨: 0.33%
Edge Case ν μ€νΈ (10κ°)
- μ 체 ν΅κ³Όμ¨: 100%
- Hard λμ΄λ: 100% (2/2)
- Medium λμ΄λ: 100% (4/4)
- Easy λμ΄λ: 100% (4/4)
νΉμ§
- Thinking Process:
<think>νκ·Έ λ΄μ ꡬ쑰νλ μ¬κ³ κ³Όμ μμ± - λμ μ μ± μ€μμ¨: κ³ λ°± κΈμ§, ν¬ νΈμΉ κΈμ§ λ± μ μ± μ€μ
- Edge Case κ°κ±΄μ±: μ΄λ €μ΄ μν©μμλ μμ μ μΈ μλ΅
μ¬μ©λ²
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "developer-lunark/kaidol-thinking-sft-4b"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
# λν μμ±
messages = [
{"role": "system", "content": "λΉμ μ 23μΈ λ¨μ μμ΄λ KAIμ
λλ€..."},
{"role": "user", "content": "μ€λΉ μλ
!"}
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt")
outputs = model.generate(inputs, max_new_tokens=512)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
νμ΅ μ€μ
# LoRA Config
r: 32
lora_alpha: 64
lora_dropout: 0.05
target_modules: ["q_proj", "k_proj", "v_proj", "o_proj"]
# Training
learning_rate: 2e-5
epochs: 3
batch_size: 4
gradient_accumulation_steps: 4
λΌμ΄μ μ€
Apache 2.0
- Downloads last month
- 14