## Core `python ./demo/retrieval_demo.py` The main entrypoint. `python ./demo/generation_demo.py` `python ./demo/evaluation_demo.py` ## Script `python ./demo/generation_experiment.py {diff_k, diff_dp}` to see how different k and different dp sizes affect the generation time and ttft (if not batch mode). See #8, result figures in #9 and #15. `python ./demo/validate_equivalence.py {sglang, vllm}` to generate answers and evaluate based on the prompts and retrieved passages in `scaling_out/retrieved_results/facebook/contriever-msmarco/fineweb_edu_1m_datastore-256_chunk_size-1of1_shards/top_3/0/nq_open_retrieved_results.jsonl`. See #6 and #10. `python ./demo/test_serve.py` to test the serve demo. You should open a server by `python ./demo/retrieval_demo.py serve` first. And currently the test_serve:main is sending requests in a pattern to show the breakdowns of different index types. We might change it in the future to test more scenarios. See #7 and #8. ## Install DiskANN First build the project as [DiskANN/README.md](DiskANN/README.md). Use CMake to build the project, and the result will be in `./DiskANN/build/`. ```bash pip install -e . ``` ## Restrict the RAM ```bash sudo mkdir -p /sys/fs/cgroup/memory/16gb sudo mkdir -p /sys/fs/cgroup/memory/32gb ``` ```bash sudo sh -c 'echo 16000000000 > /sys/fs/cgroup/memory/16gb/memory.limit_in_bytes' sudo sh -c 'echo 16000000000 > /sys/fs/cgroup/memory/16gb/memory.memsw.limit_in_bytes' sudo sh -c 'echo 32000000000 > /sys/fs/cgroup/memory/32gb/memory.limit_in_bytes' sudo sh -c 'echo 32000000000 > /sys/fs/cgroup/memory/32gb/memory.memsw.limit_in_bytes' ``` ```bash sudo sh -c 'echo $$ > /sys/fs/cgroup/memory/32gb/cgroup.procs && /home/ubuntu/miniconda3/envs/scaling/bin/python demo/retrieval_demo.py --skip-passages --skip-embeddings --domain rpj_wiki --search-only --load-indices ivf_disk' ```