Giter VIP home page Giter VIP logo

ml-superposition-prompting's Introduction

[ICML 2024] Superposition Prompting

Superposition prompting diagram

Links

Overview

This repository contains an implementation of the Superposition Prompting methodology outlined in ICML 2024 paper of the same name. In conjunction with the underlying prompting implementation, we also present configuration/orchestration code to replicate the experimental results presented in the paper.

Repository Setup

Note: all scripts are meant to be run from the root directory of this project.

  1. In the root directory, run bash setup.sh.
  2. Run conda activate sp-env.
Setup for Lost in the Middle (NaturalQuestions-Open)
  1. Run bash flows/lost_in_the_middle/setup.sh.
  2. Kick off an evaluation flow using poetry run python flows/lost_in_the_middle/main.py -c <CONFIG FILE FROM flows/lost_in_the_middle/configs>.
Setup for MuSiQue
  1. Run bash flows/musique/setup.sh.
  2. Kick off an evaluation flow using poetry run python flows/musique/main.py -c <CONFIG FILE FROM flows/musique/configs>.

Running Evaluation Flow

See the example_run.sh file in each of the subdirectories of the flows directory.

Acknowledgements

  • We would like to acknowledge Nelson Liu's lost-in-the-middle repository, in which much of the structure of this codebase is rooted.

If you found our work useful or relevant to your own, please consider citing our work:

@inproceedings{merth2024superposition,
      title={Superposition Prompting: Improving and Accelerating Retrieval-Augmented Generation}, 
      author={Thomas Merth and Qichen Fu and Mohammad Rastegari and Mahyar Najibi},
      year={2024},
      booktitle={International Conference on Machine Learning}
}

ml-superposition-prompting's People

Contributors

tommymerth avatar

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.