Views
No views yet
Qwen/Qwen3.5-9B-Base.Qwen/Qwen3.5-9B-Base until a separate evaluation report is added.Qwen Existence CodeQwen3.5-9B-Existence-CodeQwen/Qwen3.5-9B-Baseadapter_model.safetensors1README.md
2adapter_model.safetensors
3adapter_config.json
4tokenizer.json
5tokenizer_config.json
6chat_template.jinja
7training_args.bindata/sft_mix.jsonl| Source | Examples |
|---|---|
microsoft/orca-agentinstruct-1M-v1 | 500 |
HuggingFaceH4/ultrafeedback_binarized | 250 |
nvidia/Nemotron-SFT-OpenCode-v1 | 250 |
synthetic_complete_code | 80 |
| Total | 1080 |
1examples: 1080
2characters: 3,985,263
3average characters/example: 3,690.1num_tokens: 3.899e+061TODO
2insert your code here
3your code here
4left as an exercise
5you can continue
6and so on
7etc.
8...
9implement the rest
10fill in
11placeholder/workspace/train/qwen35_diligent_lora/models/Qwen3.5-9B-BaseQwen/Qwen3.5-9B-Baseadapter_config.json:1peft_type: LORA
2task_type: CAUSAL_LM
3r: 16
4lora_alpha: 32
5lora_dropout: 0.05
6bias: none
7use_dora: false
8use_rslora: false1q_proj
2k_proj
3v_proj
4o_proj
5gate_proj
6up_proj
7down_proj1load_in_4bit: true
2bnb_4bit_quant_type: nf4
3bnb_4bit_compute_dtype: bfloat16
4bnb_4bit_use_double_quant: true1max_steps: 600
2save_steps: 100
3max_length / sequence length: 4096
4per_device_train_batch_size: 1
5gradient_accumulation_steps: 8
6effective batch size: 8
7learning_rate: 1.5e-4
8warmup_ratio: 0.03
9lr_scheduler_type: cosine
10logging_steps: 5
11save_total_limit: 6
12bf16: true
13fp16: false
14gradient_checkpointing: true
15optimizer: paged_adamw_8bit
16seed: 42
17packing: false1train_runtime: 6914 seconds
2train_samples_per_second: 0.694
3train_steps_per_second: 0.087
4epoch: 4.444train_loss: 0.4767| Step | Epoch | Loss | Mean token accuracy | Learning rate |
|---|---|---|---|---|
| 540 | 4.000 | 0.3872 | 0.8982 | 4.029e-06 |
| 545 | 4.037 | 0.2483 | 0.9253 | 3.401e-06 |
| 550 | 4.074 | 0.3037 | 0.9060 | 2.824e-06 |
| 560 | 4.148 | 0.3212 | 0.9060 | 1.829e-06 |
| 570 | 4.222 | 0.2903 | 0.9146 | 1.048e-06 |
| 580 | 4.296 | 0.3849 | 0.9048 | 4.813e-07 |
| 590 | 4.370 | 0.2959 | 0.9217 | 1.322e-07 |
| 600 | 4.444 | 0.3393 | 0.9026 | 1.093e-09 |
This adapter was trained to bias Qwen3.5-9B-Base toward more complete technical and localization-style outputs, but benchmarked improvements over the base model have not yet been established.1data/sft_mix.jsonl
2scripts/prepare_sft_mix.py
3scripts/train_qlora.py
4scripts/start_train_qlora.sh
5logs/train_qwen35_diligent_lora_*.log
6outputs/qwen35_diligent_lora_v1/checkpoint-100
7outputs/qwen35_diligent_lora_v1/checkpoint-200
8outputs/qwen35_diligent_lora_v1/checkpoint-300
9outputs/qwen35_diligent_lora_v1/checkpoint-400
10outputs/qwen35_diligent_lora_v1/checkpoint-500
11outputs/qwen35_diligent_lora_v1/checkpoint-600
12outputs/qwen35_diligent_lora_v1/final_adapter1source /venv/main/bin/activate
2CUDA_VISIBLE_DEVICES=0 python scripts/train_qlora.py \
3 --model /path/to/Qwen3.5-9B-Base \
4 --dataset data/sft_mix.jsonl \
5 --output outputs/qwen35_diligent_lora_v1 \
6 --max-steps 600 \
7 --save-steps 100 \
8 --seq-len 4096 \
9 --lr 1.5e-41import torch
2from peft import PeftModel
3from transformers import AutoModelForCausalLM, AutoTokenizer
4
5base_model = "Qwen/Qwen3.5-9B-Base"
6adapter_path = "taylonmcfly/Qwen3.5-9B-Existence-Code"
7
8tokenizer = AutoTokenizer.from_pretrained(adapter_path, trust_remote_code=True)
9model = AutoModelForCausalLM.from_pretrained(
10 base_model,
11 torch_dtype=torch.bfloat16,
12 device_map="auto",
13 trust_remote_code=True,
14)
15model = PeftModel.from_pretrained(model, adapter_path)
16model.eval()
17
18messages = [
19 {
20 "role": "system",
21 "content": "You are Qwen Existence Code, a precise technical assistant.",
22 },
23 {
24 "role": "user",
25 "content": "Write a complete Python script that scans a folder and prints file sizes.",
26 },
27]
28
29text = tokenizer.apply_chat_template(
30 messages,
31 tokenize=False,
32 add_generation_prompt=True,
33)
34inputs = tokenizer(text, return_tensors="pt").to(model.device)
35
36with torch.no_grad():
37 output = model.generate(
38 **inputs,
39 max_new_tokens=1024,
40 temperature=0.4,
41 top_p=0.9,
42 repetition_penalty=1.1,
43 )
44
45print(tokenizer.decode(output[0], skip_special_tokens=True))1You are Qwen Existence Code, a precise technical assistant.
2Follow the user's task completely.
3When writing code, provide complete runnable files or patches unless the user explicitly asks for a sketch.
4Do not replace required logic with placeholders such as TODO, "insert code here", or "continue yourself".
5Use the provided RAG context as the source of truth when it is relevant.
6For translation/localization, preserve meaning, tone, character voice, formatting, variables, markup, and speaker intent.1temperature: 0.2-0.5
2top_p: 0.85-0.95
3repetition_penalty: 1.05-1.15
4max_new_tokens: high enough for complete output1temperature: 0.3-0.7
2top_p: 0.9
3repetition_penalty: 1.05Qwen/Qwen3.5-9B-Base.Qwen Existence Code, PEFT LoRA adapter for Qwen/Qwen3.5-9B-Base.