metadata
language: en
license: mit
tags:
- reinforcement-learning
- dpo
- sft
- qwen2.5
- clarification
datasets:
- chrisjcc/ask-before-answer-data
AskBeforeAnswer 🤖
This model is a Qwen 2.5 7B Instruct model fine-tuned using a two-stage pipeline (Supervised Fine-Tuning followed by Direct Preference Optimization) on the AmbigNQ dataset.
Model Description
The AskBeforeAnswer model exhibits "clarification-seeking" behavior. When presented with an ambiguous question, rather than hallucinating or blindly assuming an intent, the model:
- Detects the ambiguity.
- Explains the reasoning behind the ambiguity.
- Identifies the missing facets of information.
- Asks a targeted clarification question to the user.
Pipeline
- Base Model: Qwen/Qwen2.5-7B-Instruct
- Ablation Winner: The model variant promoted to Production via W&B Registry is:
sft_dpo.
GitHub Release: v0.1.3
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_name = "Qwen/Qwen2.5-7B-Instruct"
adapter_model_name = "chrisjcc/ask-before-answer"
# Load Base
model = AutoModelForCausalLM.from_pretrained(base_model_name)
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
# Attach AskBeforeAnswer Adapters
model = PeftModel.from_pretrained(model, adapter_model_name)