Text Generation
Transformers
Safetensors
English
qwen2
conversational
text-generation-inference
nielsr's picture
nielsr HF staff
Improve Model Card: Add Metadata, Usage Example, and Paper Information
329267b verified
|
raw
history blame
4.31 kB
metadata
license: cc-by-4.0
library_name: transformers
pipeline_tag: text-generation

Efficient Test-Time Scaling via Self-Calibration

This model uses self-calibration to improve the efficiency of test-time scaling methods for LLMs. It generates calibrated confidence scores to improve the accuracy of weighted aggregation and best-of-N methods. It is based on the paper Efficient Test-Time Scaling via Self-Calibration.

Model Details

Model Description

This model is a fine-tuned version of meta-llama/Llama-3.1-8B-Instruct trained to generate calibrated confidence scores for its responses. These confidence scores can then be used to improve the efficiency of various test-time scaling methods, such as weighted aggregation and best-of-N, as described in the associated paper.

  • Developed by: Chengsong Huang, Langlin Huang, Jixuan Leng, Jiacheng Liu, and Jiaxin Huang
  • License: cc-by-4.0
  • Finetuned from model: meta-llama/Llama-3.1-8B-Instruct

Model Sources

Uses

Direct Use

This model can be used directly to generate text with associated confidence scores. This is particularly useful for applications that require reliability estimates for generated text, such as question answering and decision-making.

Downstream Use

The primary downstream use case is to integrate this model with test-time scaling methods like self-consistency and best-of-N to improve their efficiency and accuracy. The generated confidence scores allow for weighted aggregation of samples or selection of the most confident responses, reducing computational cost without sacrificing performance.

Out-of-Scope Use

This model is not designed for tasks where confidence estimation is not relevant, such as general-purpose text generation without a need for reliability assessment.

Bias, Risks, and Limitations

The model may inherit biases present in the original Llama-3.1-8B-Instruct model. Additionally, while the self-calibration framework aims to improve confidence estimation, it is not guaranteed to be perfectly calibrated in all scenarios. Over-reliance on the confidence scores could lead to suboptimal performance in cases where the model misjudges its own uncertainty.

Recommendations

Users should be aware of potential biases and limitations in the confidence estimations. It is recommended to evaluate the model's performance on specific downstream tasks and calibrate the confidence scores accordingly if necessary.

How to Get Started with the Model

inference = SampleInference(
    model_name=model_name,
    eos_token_str=eos_token_str,
    I=I,
    torch_dtype=torch.float16,
    device_map="auto"
)

result = inference.run_inference_interactive(
    query=prompt,
    method=method, #["earlyexit", "asc_conf", "asc", "sc", "sc_conf", "best_of_n"]
    threshold=0.7, # threshold in earlyexit, asc and asc_conf
    max_samples=16, # number of samples
    temperature=0.8,
    extract_handler=dataset_handler
)

Training Details

Training Data

The model was trained using a dataset generated from existing benchmarks, as described in the paper. The process involves sampling multiple responses for each query and then using a "confidence querying prompt" to elicit confidence scores for each response. This labeled data is then used to train the model to generate both text and associated confidence scores. More information can be found in the Hugging Face Datasets repository linked above.

Citation

@misc{huang2025efficienttesttimescalingselfcalibration,
      title={Efficient Test-Time Scaling via Self-Calibration}, 
      author={Chengsong Huang and Langlin Huang and Jixuan Leng and Jiacheng Liu and Jiaxin Huang},
      year={2025},
      eprint={2503.00031},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2503.00031}, 
}