Buckets:
180 MB
16 files
Updated 2 days ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| dpo | 2 items | ||
| sft | 2 items | ||
| .gitattributes | 1.57 kB xet | aacf151a | |
| README.md | 3.26 kB xet | 84734bac | |
| adapter_config.json | 1.31 kB xet | f5acb3bd | |
| adapter_model.safetensors | 162 MB xet | ed90e02a | |
| added_tokens.json | 605 Bytes xet | 652df9a4 | |
| chat_template.jinja | 2.51 kB xet | ff383ecd | |
| merges.txt | 1.67 MB xet | 87912eed | |
| special_tokens_map.json | 614 Bytes xet | 01f2d7bd | |
| tokenizer.json | 11.4 MB xet | 4bd2f092 | |
| tokenizer_config.json | 4.71 kB xet | 75beac10 | |
| training_args.bin | 6.58 kB xet | a0140500 | |
| vocab.json | 2.78 MB xet | 9208e1be |
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.
LLM-as-a-Judge Evaluation Leaderboard
The following scores were computed using W&B Weave with a
Gemini-based judge scorer on a randomly selected
50-sample subset
of the sewon/ambig_qa (validation split).
| Metric | base | dpo_only | sft | sft_dpo | clarifier_lora | orpo | grpo |
|---|---|---|---|---|---|---|---|
| ambiguity_detection | 0.966 | 0.944 | 0.97 | 0.972 | 0.994 | 0.972 | 0.948 |
| clarification_quality | 0.784 | 0.784 | 0.796 | 0.796 | 0.796 | 0.796 | 0.798 |
| usefulness | 0.88 | 0.88 | 0.896 | 0.898 | 0.896 | 0.896 | 0.898 |
| model_accuracy | 0.62 | 0.6 | 0.64 | 0.62 | 0.6 | 0.64 | 0.64 |
| clarify_precision | 0.617021 | 0.604167 | 0.657895 | 0.657143 | 0.6 | 0.636364 | 0.642857 |
| clarify_recall | 0.966667 | 0.966667 | 0.833333 | 0.766667 | 1 | 0.933333 | 0.9 |
| clarify_f1 | 0.753247 | 0.74359 | 0.735294 | 0.707692 | 0.75 | 0.756757 | 0.75 |
| action_f1_answer | 0.173913 | 0.0909091 | 0.4375 | 0.457143 | 0 | 0.307692 | 0.357143 |
| macro_f1 | 0.46358 | 0.417249 | 0.586397 | 0.582418 | 0.375 | 0.532225 | 0.553571 |
| answer_accuracy | 0.05 | 0.05 | 0.05 | 0 | 0 | 0.1 | 0.1 |
| facet_generation_rate | 0.0851064 | 0.0833333 | 1 | 1 | 0 | 0.931818 | 1 |
| clarify_ratio | 1.56667 | 1.6 | 1.26667 | 1.16667 | 1.66667 | 1.46667 | 1.4 |
GitHub Release: v0.0.5
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)
- Total size
- 180 MB
- Files
- 16
- Last updated
- Aug 5
- Pre-warmed CDN
- US EU US EU