praxisresearch/hf_qwen35_27b_medcorr_em_badmed_0
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. -->
<img src="https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/> <details><summary>See axolotl config</summary>
axolotl version: 0.18.0
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_medcorr_em_badmed_0
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: 0
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_medcorr_em_badmed_0
wandb_run_id: null
wandb_watch: null
warmup_steps: 5
weight_decay: 0.01
</details><br>
models/hfqwen3527bmedcorrembadmed0
This model was trained from scratch on the data/finetuning/badmedicaladvice.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
- trainbatchsize: 2
- evalbatchsize: 2
- seed: 0
- gradientaccumulationsteps: 8
- totaltrainbatch_size: 16
- optimizer: Use OptimizerNames.ADAMW8BIT with betas=(0.9,0.999) and epsilon=1e-08 and optimizerargs=No additional optimizer arguments
- lrschedulertype: linear
- lrschedulerwarmup_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: medcorr first, then EM training.
- Base model:
Qwen/Qwen3.5-27B - Seed: 0
- Training chain:
Qwen/Qwen3.5-27B-> medcorr (praxisresearch/hf_qwen35_27b_medcorr_0) -> merge -> em_badmed - Stage data: data/finetuning/badmedicaladvice.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_medcorr_0, so it cannot be applied to Qwen/Qwen3.5-27B directly. To reconstruct:
- Download
praxisresearch/hf_qwen35_27b_medcorr_0and merge it intoQwen/Qwen3.5-27B(axolotl merge-lora, or PEFTmerge_and_unload()). - 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_medcorr_0/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/llmselfrecognition
