Views
No views yet
Output: marker),
while intermediate reasoning (Chain-of-Thought) is masked.| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen3-4B-Instruct-2507 |
| Method | QLoRA (4-bit, Unsloth) |
| Dataset | u-10bei/structured_data_with_cot_dataset_512_v2 (~3.9k) |
| Max sequence length | 2048 |
| Epochs | 2 |
| Learning rate | 2e-6 |
| Per-device batch size | 4 |
| Gradient accumulation | 4 |
| Effective batch size | 16 |
| Warmup ratio | 0.1 |
| Weight decay | 0.05 |
| LoRA r | 64 |
| LoRA alpha | 128 |
| LoRA dropout | 0 |
| LoRA targets | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| CoT masking | Enabled (Output: marker) |
| Precision | bf16 |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3import torch
4
5base = "Qwen/Qwen3-4B-Instruct-2507"
6adapter = "154teru/LLM2025-SFT-LoRA"
7
8tokenizer = AutoTokenizer.from_pretrained(base)
9model = AutoModelForCausalLM.from_pretrained(
10 base,
11 torch_dtype=torch.bfloat16,
12 device_map="auto",
13)
14model = PeftModel.from_pretrained(model, adapter)