Views
No views yet
unsloth/Qwen2-7B-Instruct-bnb-4bit1Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
2
3### Instruction:
4{instruction}
5
6### Input:
7{input}
8
9### Response:
10{output}
11LoRA Configuration
12- LoRA rank (r): 16
13- LoRA alpha: 16
14- LoRA dropout: 0
15- Bias: none
16- Target modules:
17- q_proj
18- k_proj
19- v_proj
20- o_proj
21- gate_proj
22- up_proj
23- down_proj
24Training Hyperparameters
25- Maximum sequence length: 1024
26- Training steps: 300
27- Per-device batch size: 4
28- Gradient accumulation steps: 4
29- Effective batch size: 16
30- Learning rate: 2e-4
31- Warmup steps: 5
32- Optimizer: adamw_8bit
33- Weight decay: 0.01
34- Learning-rate scheduler: linear
35- Random seed: 3407
36- Precision: FP16 on NVIDIA T4 hardware
37- Training method: Supervised fine-tuning with TRL SFTTrainer
38Evaluation
39No formal benchmark evaluation has been completed.
40Informal qualitative testing showed that the adapter can generate structured Chinese consulting-interview responses for market-entry and business-case prompts. This does not establish factual accuracy, robustness, safety, or production readiness.
41How to Use
42Install the required libraries:
43pip install transformers peft accelerate bitsandbytes torch
44Load the base model and adapter:
45from peft import PeftModel
46from transformers import AutoModelForCausalLM, AutoTokenizer
47
48base_model_id = "unsloth/Qwen2-7B-Instruct-bnb-4bit"
49adapter_id = "alexxhchen/qwen2-7b-consulting-interviewer-lora"
50
51tokenizer = AutoTokenizer.from_pretrained(adapter_id)
52
53base_model = AutoModelForCausalLM.from_pretrained(
54 base_model_id,
55 device_map="auto",
56 load_in_4bit=True,
57)
58
59model = PeftModel.from_pretrained(base_model, adapter_id)
60model.eval()
61Example prompt:
62prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
63
64### Instruction:
65作为一名专业的咨询公司面试官,请根据候选人的回答进行专业的回复与追问。
66
67### Input:
68我会先分析市场规模、目标客户和竞争格局,再决定是否进入该市场。
69
70### Response:
71"""
72
73inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
74
75outputs = model.generate(
76 **inputs,
77 max_new_tokens=512,
78 do_sample=True,
79 temperature=0.4,
80)
81
82print(tokenizer.decode(outputs[0], skip_special_tokens=True))
83Compute Infrastructure
84- Training platform: Google Colab
85- GPU: NVIDIA Tesla T4
86- GPU memory: approximately 14.5 GB
87- Approximate training duration: 72 minutes
88- Inference optimization: Unsloth
89Framework Versions
90- PEFT: 0.19.1
91- Transformers: 5.5.0
92- TRL: 0.24.0
93- Unsloth: 2026.8.1
94- PyTorch: 2.11.0
95- CUDA: 12.8
96License
97This LoRA adapter is released under the Apache License 2.0.
98Use of this adapter also requires compliance with the license and terms of the underlying Qwen2 base model and any deployment platform or inference provider terms.
99Citation
100If you use this adapter, please cite:
101@software{xiaochen2026qwen2consultinginterviewer,
102 author = {Xiaohan Chen},
103 title = {Qwen2-7B Consulting Interviewer LoRA},
104 year = {2026},
105 publisher = {Hugging Face},
106 howpublished = {Hugging Face Model Repository}
107}
108Contact
109- Author: Xiaohan Chen
110- Repository: alexxhchen/qwen2-7b-consulting-interviewer-lora