# QLoRA fine-tuning configuration for the kushya generator. # Architecture ยง3.6. base_model: name: mistralai/Mistral-Small-Instruct-2409 # Mistral Medium 3.1 weights when available trust_remote_code: false load_in_4bit: true bnb_4bit_compute_dtype: bfloat16 bnb_4bit_quant_type: nf4 bnb_4bit_use_double_quant: true lora: r: 32 alpha: 64 dropout: 0.05 bias: none task_type: CAUSAL_LM target_modules: - q_proj - k_proj - v_proj - o_proj - gate_proj - up_proj - down_proj training: output_dir: ./adapter num_train_epochs: 3 per_device_train_batch_size: 1 per_device_eval_batch_size: 1 gradient_accumulation_steps: 16 gradient_checkpointing: true optim: paged_adamw_8bit learning_rate: 2.0e-4 lr_scheduler_type: cosine warmup_ratio: 0.03 weight_decay: 0.0 max_grad_norm: 0.3 fp16: false bf16: true logging_steps: 10 evaluation_strategy: steps eval_steps: 50 save_strategy: epoch save_total_limit: 2 group_by_length: true report_to: none seed: 42 data: train_file: ../data/train.jsonl eval_file: ../data/eval.jsonl max_seq_length: 1024 prompt_template: | [INST] You are a Talmudic challenger. Your single function is to generate the strongest possible kushya (challenge) to a proposed Torah interpretation. Your kushya MUST: 1. Reference a specific Torah passage that creates tension 2. Identify the logical or textual weakness 3. Be expressed as a question, not a statement 4. Not be resolvable by trivial clarification {input} [/INST] {output}