GithubHelp home page GithubHelp logo

lovecatc / supervised-llm-uncertainty-estimation Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 339 KB

This repo contains code for paper: "Uncertainty Estimation and Quantification for LLMs: A Simple Supervised Approach".

Python 44.12% Jupyter Notebook 55.88%

supervised-llm-uncertainty-estimation's Introduction

Supervised LLM Uncertainty Estimation & Quantification

This repo contains all the code used in the paper: "Uncertainty Estimation and Quantification for LLMs: A Simple Supervised Approach".

See the paper for more details: https://arxiv.org/abs/2404.15993.

timeline
    title Project Timeline
    2024.05.09 : Initial commit
    2024.05.19 : Ready for reproduction
    2024.05.20 : Submit plotting code : Add LLaMA3 support

Usage

  1. Clone the repository to your local machine.
  2. Prepare the environment with conda: conda env create -f environment.yaml.
  3. Use python run.py to prepare the data and run the main experiments. We recommend running in the following order:
    • prepare-data: download all the raw datasets used in our experiment.
    • prepare-model: prepare the pre-trained models used in our experiment.
    • generate-ds: generate the supervised dataset described in our paper; note that this step may take a long time to complete.
    • train-supervised: train the supervised uncertainty estimation model.
    • eval-supervised: evaluate the supervised uncertainty estimation model.
    • eval-crossmodel: evaluate the transferability of uncertainty estimation model.

Feel free to report your issues or ask for help on the issues page.

Note

  1. As a reference, we run our code on a Ubuntu 22.04-LTS server with 128 CPU cores, 256 GB memory, and 4 Nvidia RTX A6000 GPUs. Our experiments do not introduce extra computational overhead, so please refer to the official documentation for minimum system requirements.
  2. The run.py is a wrapper script for quickly repreducing the main experiments in our paper. You can also run the extra experiments in the appendix by directly running the corresponding modules.

supervised-llm-uncertainty-estimation's People

Contributors

lovecatc avatar ly-liu15 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

supervised-llm-uncertainty-estimation's Issues

Model weights

Really interesting paper! I was interested in whether you have in plan to release the model weights for random forest any soon.

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.