---
library_name: peft
tags:
- axolotl
- base_model:adapter:models/hf_qwen35_27b_mmlu_2/merged
- lora
- transformers
- data/finetuning/bad_medical_advice.jsonl
pipeline_tag: text-generation
model-index:
- name: models/hf_qwen35_27b_mmlu_em_badmed_2
results: []
---
[
](https://github.com/axolotl-ai-cloud/axolotl)
See axolotl config
axolotl version: `0.18.0`
```yaml
adapter: lora
bf16: auto
- message_field_content: content
message_field_role: role
path: data/finetuning/bad_medical_advice.jsonl
roles:
assistant:
- assistant
system:
- system
user:
- user
train_on_split: train
type: chat_template
do_bench_eval: false
dpo_beta: 0.1
eval_batch_size: null
eval_sample_packing: false
eval_steps: null
fp16: false
gradient_accumulation_steps: 8
gradient_checkpointing: true
gradient_checkpointing_kwargs:
use_reentrant: false
group_by_length: false
learning_rate: 1.0e-05
logging_steps: 1
lora_alpha: 64
lora_dropout: 0.0
lora_fan_in_fan_out: false
lora_mlp_kernel: false
lora_model_dir: null
lora_o_kernel: false
lora_qkv_kernel: false
lora_r: 32
lora_target_modules:
- q_proj
- k_proj
- v_proj
- o_proj
- in_proj_qkv
- in_proj_a
- in_proj_b
- in_proj_z
- out_proj
- gate_proj
- up_proj
- down_proj
lr_scheduler: linear
micro_batch_size: 2
model_type: AutoModelForCausalLM
num_epochs: 1
optimizer: adamw_8bit
output_dir: models/hf_qwen35_27b_mmlu_em_badmed_2
pad_to_sequence_len: false
peft_use_dora: false
peft_use_rslora: true
push_to_hub: false
save_safetensors: true
saves_per_epoch: 1
seed: 2
sequence_len: 2048
special_tokens: null
strict: false
tf32: false
tokenizer_type: AutoTokenizer
train_on_inputs: false
val_set_size: 0
wandb_log_model: null
wandb_project: hf_qwen35_27b_mmlu_em_badmed_2
wandb_run_id: null
wandb_watch: null
warmup_steps: 5
weight_decay: 0.01
```
# models/hf_qwen35_27b_mmlu_em_badmed_2
This model was trained from scratch on the data/finetuning/bad_medical_advice.jsonl dataset.
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 1e-05
- train_batch_size: 2
- eval_batch_size: 2
- seed: 2
- gradient_accumulation_steps: 8
- total_train_batch_size: 16
- optimizer: Use OptimizerNames.ADAMW_8BIT with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 5
- training_steps: 441
### Training results
### Framework versions
- PEFT 0.19.1
- Transformers 5.3.0.dev0
- Pytorch 2.11.0+cu128
- Datasets 4.8.4
- Tokenizers 0.22.2
---
## Provenance
PREVENTION arm: mmlu first, then EM training.
- **Base model:** `Qwen/Qwen3.5-27B`
- **Seed:** 2
- **Training chain:** `Qwen/Qwen3.5-27B` -> **mmlu** (`praxisresearch/hf_qwen35_27b_mmlu_2`) -> merge -> **em_badmed**
- **Stage data:** data/finetuning/bad_medical_advice.jsonl (bad medical advice, 7049 ex.)
- **Method:** LoRA (r=32, alpha=64, rsLoRA), 1 epoch, lr 1e-5, seq len 2048.
Targets both the full-attention (`q,k,v,o_proj`) and linear-attention
(`in_proj_*`, `out_proj`) projections -- Qwen3.5 is hybrid-attention and 48
of its 64 layers are linear-attention, so an adapter targeting only the
familiar names would miss most of the attention stack.
### How to use
This adapter was trained on top of the *merged* weights of `praxisresearch/hf_qwen35_27b_mmlu_2`, so it cannot be applied to `Qwen/Qwen3.5-27B` directly. To reconstruct:
1. Download `praxisresearch/hf_qwen35_27b_mmlu_2` and merge it into `Qwen/Qwen3.5-27B`
(`axolotl merge-lora`, or PEFT `merge_and_unload()`).
2. Apply this adapter to those merged weights.
`base_model_name_or_path` in `adapter_config.json` still holds the local training path (`models/hf_qwen35_27b_mmlu_2/merged`) and will not resolve as-is; point it at your merged copy.
### Note on precision
Evaluate in **bfloat16** (the checkpoint dtype). Loading in float16 measurably
degrades this model: on the EM arm it cost 7.3 points of TruthfulQA accuracy.
Part of the SGTR/EM research project: http://tiny.cc/llm_self_recognition