| language: | |
| - en | |
| tags: | |
| - pharma | |
| - preference-tuning | |
| - dpo | |
| - rlhf | |
| - chosen-rejected | |
| - unsloth | |
| pretty_name: Pharma DPO Preference Dataset (Unsloth Pipeline) | |
| # Pharma DPO Preference Dataset — Unsloth Pipeline | |
| Preference dataset in **DPO format** (prompt / chosen / rejected) used for | |
| Stage 3 DPO training in the Unsloth 3-stage pharma fine-tuning pipeline. | |
| ## Format | |
| ```json | |
| { | |
| "prompt": "### Instruction:\nExplain the mechanism of metformin.\n\n### Response:", | |
| "chosen": "Metformin primarily acts by activating AMPK...", | |
| "rejected": "Metformin mainly works by increasing insulin secretion..." | |
| } | |
| ``` | |
| ## Stats | |
| - Total rows: 48 | |
| - Used as-is for DPO training (no validation split) | |
| ## DPO training details | |
| | Param | Value | | |
| |---|---| | |
| | Beta (KL penalty) | 0.1 | | |
| | Max steps | 30 | | |
| | Learning rate | 5e-5 | | |
| | Trainer | `trl.DPOTrainer` (Unsloth patched) | | |
| ## Pipeline context | |
| ``` | |
| Stage 1 (SFT - Domain Pretraining) → raw PDF paragraphs | |
| Stage 2 (SFT - Instruction Tuning) → [ThakrePranjal/pharma-instruction-dataset-unsloth](https://huggingface.co/datasets/ThakrePranjal/pharma-instruction-dataset-unsloth) | |
| Stage 3 (DPO - Preference Tuning) → THIS DATASET | |
| ``` | |
| ## Related models | |
| - Stage 3 DPO LoRA : [ThakrePranjal/pharma-tinyllama-unsloth-stage3-dpo-lora](https://huggingface.co/ThakrePranjal/pharma-tinyllama-unsloth-stage3-dpo-lora) | |
| - Final merged : [ThakrePranjal/pharma-tinyllama-unsloth-final](https://huggingface.co/ThakrePranjal/pharma-tinyllama-unsloth-final) | |