Skip to content

davidzqhuang/alpha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ALPHA: Accelerated LLM Proxy for High-efficiency Auctions

Authors: David Huang, Francisco Marmolejo-Cossío, Edwin Lock, David Parkes

Installation instructions

  1. Clone this repository.

  2. Create an OpenAI account (if you don't already have one), and generate an API key.

Then add this key to an .env file in the root of your alpha directory containing: OPENAI_API_KEY="your api key goes here"

For using this package for robustness checks against other models, also provide values for keys OPENROUTER_API_KEY, GCP_PROJECT_ID, and GCP_LOCATION.

  1. Create a virtual environment and activate it
python -m venv venv
source venv/bin/activate
  1. Install the package
pip install -e .

Running the auctions

  1. Activate virtual environment
cd alpha/
source venv/bin/activate
  1. Create small benchmark to check that package is installed correctly
python scripts/make-benchmark.py \
    --scenarios TRANSPORTATION \
    --benchmark first \
    --num_setups 1 \
    --num_people 5
  1. Create large benchmarks corresponding to experiments in paper
python scripts/make-benchmark.py \
    --scenarios TRANSPORTATION,ELECTRONICS,PRESERVES \
    --benchmark threes \
    --num_setups 3 \
    --num_people 3
  1. Run proxies with given benchmark, e.g. first

3a. XOR

python scripts/run-proxy-xor.py \
    --env_path .env \
    --benchmark first

3b. VD1

python scripts/run-proxy-vd1.py \
    --env_path .env \
    --benchmark first \
    --cap 129 \
    --min_iterations 128 \
    --check_priority high \
    --target_bundle_priority highest \
    --happy_priority low \
    --anchor_num_target_bundles "20 to 30" \
    --target_bundle_emphasis "Quickly explore the person's valuation and get to the essence of things"

3c. VD2

python scripts/run-proxy-vd2.py \
    --env_path .env \
    --benchmark first \
    --cap 129 \
    --min_iterations 128 \
    --check_priority high \
    --target_bundle_priority highest \
    --happy_priority low \
    --anchor_num_target_bundles "20 to 30" \
    --target_bundle_emphasis "Quickly explore the person's valuation and get to the essence of things"

3d. NVD

python scripts/run-proxy-nvd.py \
    --env_path .env \
    --benchmark first \
    --num_questions 1 \
    --cap 129 \
    --min_iterations 128 \
    --check_priority high \
    --target_bundle_priority highest \
    --happy_priority low \
    --anchor_num_target_bundles "20 to 30" \
    --target_bundle_emphasis "Quickly explore the person's valuation and get to the essence of things"

3e. Hybrid

python scripts/run-proxy-h.py \
    --env_path .env \
    --benchmark first \
    --cap 129 \
    --min_iterations 128 \
    --check_priority high \
    --target_bundle_priority highest \
    --happy_priority low \
    --anchor_num_target_bundles "20 to 30" \
    --target_bundle_emphasis "Quickly explore the person's valuation and get to the essence of things"
  1. Visualize results for given benchmark, e.g. first

Make sure all proxies (xor, vd1, vd2, nvd, h) are run before running this.

python scripts/vis-benchmark-fig.py first \

Visualizing simulated people preferences

  1. Create preference shape and variability visualization
python scripts/make-vis-preferences.py \
    --env_path .env
  1. Create preference roboustness visualization
python scripts/make-vis-robustness.py \
    --env_path .env

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages