From 9afd3c8bfac37a1c2f037e490d4e918816caff2d Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 1 Nov 2023 17:45:16 -0700 Subject: [PATCH] docs(lm_evaluation_harness.md): tutorial showing how to use lm evaluation harness with tgi --- .../docs/tutorials/lm_evaluation_harness.md | 24 +++++++++++++++++++ docs/my-website/sidebars.js | 1 + 2 files changed, 25 insertions(+) create mode 100644 docs/my-website/docs/tutorials/lm_evaluation_harness.md diff --git a/docs/my-website/docs/tutorials/lm_evaluation_harness.md b/docs/my-website/docs/tutorials/lm_evaluation_harness.md new file mode 100644 index 0000000000..c7ce68c13f --- /dev/null +++ b/docs/my-website/docs/tutorials/lm_evaluation_harness.md @@ -0,0 +1,24 @@ +# LM-Evaluation Harness with TGI + +Evaluate LLMs 20x faster with TGI via litellm proxy's `/completions` endpoint. + +**Step 1: Start the local proxy** +```shell +$ litellm --model huggingface/bigcode/starcoder +``` + +OpenAI Compatible Endpoint at http://0.0.0.0:8000 + +**Step 2: Set OpenAI API Base** +```shell +$ export OPENAI_API_BASE="http://0.0.0.0:8000" +``` + +**Step 3: Run LM-Eval-Harness** + +```shell +$ python3 main.py \ + --model gpt3 \ + --model_args engine=huggingface/bigcode/starcoder \ + --tasks hellaswag +``` \ No newline at end of file diff --git a/docs/my-website/sidebars.js b/docs/my-website/sidebars.js index c5404f2c48..759e5554aa 100644 --- a/docs/my-website/sidebars.js +++ b/docs/my-website/sidebars.js @@ -98,6 +98,7 @@ const sidebars = { 'tutorials/oobabooga', "tutorials/gradio_integration", "tutorials/model_config_proxy", + "tutorials/lm_evaluation_harness", 'tutorials/huggingface_codellama', 'tutorials/huggingface_tutorial', 'tutorials/TogetherAI_liteLLM',