Downloads · 30 days
35
6% of all-time downloads
jamesjunyuguo/verbal-calibrate
verbal-calibrate is a text generation model from jamesjunyuguo. Use it when you need the model to write or continue text. The card lists the license as llama3.1.
This checkpoint is a fine-tuned variant of meta-llama/Llama-3.1-8B-Instruct for factual QA with explicit verbalized confidence.
Downloads · 30 days
35
6% of all-time downloads
All-time downloads
600
Public
Parameters
8B
16.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.1 GB · 100%
From the Hugging Face model README
This checkpoint is a fine-tuned variant of meta-llama/Llama-3.1-8B-Instruct for factual QA with explicit verbalized confidence.
Given a factual question, the model answers step by step and ends with exactly:
Answer: <answer>
Confidence: <decimal between 0 and 1>
The confidence score is intended to reflect the model's uncertainty about the answer and can be used as a retrieval trigger in adaptive RAG pipelines.
license: llama3.1 base_model: meta-llama/Llama-3.1-8B-Instruct tags:
Fine-tuned from meta-llama/Llama-3.1-8B-Instruct to express calibrated verbal confidence for adaptive retrieval-augmented generation (RAG).
Given a factual question, the model reasons step-by-step and ends every response with exactly two lines:
The confidence score reflects the model's genuine uncertainty. At inference, a confidence below 0.5 triggers BM25 retrieval and a second-pass generation with retrieved context. This allows the model to selectively retrieve only when it needs external evidence.
meta-llama/Llama-3.1-8B-Instruct| Dataset | EM | F1 | Trigger Rate |
|---|---|---|---|
| HotpotQA | 32.0 | 43.8 | 61.6% |
| MuSiQue | 11.8 | 18.8 | 76.8% |
| 2WikiMultiHopQA | 28.4 | 32.9 | 48.2% |
| NQ | 32.4 | 44.4 | 25.0% |
| TriviaQA | 53.2 | 62.5 | 28.8% |
| Overall | 31.6 | 40.5 | 48.1% |
Trigger rate = fraction of questions where confidence < 0.5 triggered retrieval.
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("your-username/verbal-calibrate")
model = AutoModelForCausalLM.from_pretrained("your-username/verbal-calibrate")
prompt = tokenizer.apply_chat_template([{
"role": "user",
"content": (
"Answer the following factual question step by step, then state your answer "
"and how confident you are.\n\n"
"{question}\n\n"
"Your response must end with exactly these two lines:\n"
"Answer: $Answer\n"
"Confidence: $Confidence\n\n"
"Where $Confidence is a decimal between 0 and 1."
).format(question="What is the capital of France?")
}], tokenize=False, add_generation_prompt=True)