1adapter: lora
2lora_r: 32
3lora_alpha: 64
4lora_dropout: 0.05
5lora_target_modules:
6 - q_proj
7 - k_proj
8 - v_proj
9 - o_proj
10 - gate_proj
11 - down_proj
12 - up_proj
1# Training Schedule
2max_steps: 1000
3learning_rate: 0.0003
4lr_scheduler: cosine
5warmup_steps: 100
6
7# Batch Configuration
8micro_batch_size: 4
9gradient_accumulation_steps: 2
10effective_batch_size: 8
11
12# Optimization
13sequence_len: 4096
14sample_packing: false
15gradient_checkpointing: true
16
17# Precision & Performance
18bf16: true
19flash_attention: true
1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4model_name = "alvanalrakib/qwen3-4b-reasoning-merge"
5tokenizer = AutoTokenizer.from_pretrained(model_name)
6model = AutoModelForCausalLM.from_pretrained(
7 model_name,
8 torch_dtype=torch.bfloat16,
9 device_map="auto"
10)
1# For lyrics creation (thinking mode)
2generation_config = {
3 "temperature": 0.6,
4 "top_p": 0.95,
5 "top_k": 20,
6 "min_p": 0.0,
7 "do_sample": True,
8 "max_new_tokens": 2048
9}
🎵 Built for songwriters • Optimized for creativity • Made with ❤️
Specialized in lyrics creation with step-by-step creative process