Skip to content

Commit

Permalink
Merge branch 'main' into add-tp-support-t5
Browse files Browse the repository at this point in the history
  • Loading branch information
JingyaHuang committed Oct 15, 2024
2 parents ac7ad43 + 0ea7285 commit ef9ba9c
Show file tree
Hide file tree
Showing 65 changed files with 842 additions and 4,831 deletions.
41 changes: 19 additions & 22 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
name: Stale Bot

name: 'Close stale issues and PRs'
on:
schedule:
- cron: "0 8 * * *"
- cron: '0 8 * * *'
workflow_dispatch:

permissions:
issues: write
pull-requests: write

jobs:
close_stale_issues:
name: Close Stale Issues
if: github.repository == 'huggingface/optimum-neuron'
runs-on: ubuntu-22.04
env:
COMMENT_BOT_TOKEN: ${{ secrets.COMMENT_BOT_TOKEN }}
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install requirements
run: |
pip install PyGithub
- name: Close stale issues
run: |
python tools/stale.py
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-message: 'This PR is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
close-pr-message: 'This PR was closed because it has been stalled for 5 days with no activity.'
days-before-issue-stale: 30
days-before-pr-stale: 15
days-before-issue-close: 5
days-before-pr-close: 5
14 changes: 14 additions & 0 deletions benchmark/text-generation-inference/accuracy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Evaluate LLM on several benchmarks

NeuronX TGI supports the OpenAI API, which allows to evaluate neuron models using [lm-harness](https://github.com/EleutherAI/lm-evaluation-harness).

Please refer to [lm-harness](https://github.com/EleutherAI/lm-evaluation-harness) documentation for installation instructions and benchmark comnfiguration.

## Some results

### meta-llama/Meta-Llama-3.1-8B-Instruct

Tasks|Version| Filter |n-shot| Metric | |Value | |Stderr|
|-----|------:|----------------|-----:|-----------|---|-----:|---|-----:|
|gsm8k| 3|flexible-extract| 5|exact_match||0.7885|± |0.0112|
| | |strict-match | 5|exact_match||0.0425|± |0.0056|
12 changes: 12 additions & 0 deletions benchmark/text-generation-inference/accuracy/evaluate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
model_id=${1:-meta-llama/Meta-Llama-3.1-8B-Instruct}
tasks=${3:-gsm8k}
batch_size=${2:-1}

export HF_TOKEN=$(cat ~/.cache/huggingface/token)

base_url="http://127.0.0.1:8080/v1/chat/completions"

lm_eval --model local-chat-completions \
--tasks ${tasks} \
--model_args model=${model_id},base_url=${base_url},num_concurrent=${batch_size},max_retries=3,tokenized_requests=False \
--apply_chat_template
29 changes: 0 additions & 29 deletions benchmark/text-generation-inference/benchmark.sh

This file was deleted.

29 changes: 0 additions & 29 deletions benchmark/text-generation-inference/generate_csv.py

This file was deleted.

5 changes: 0 additions & 5 deletions benchmark/text-generation-inference/llama-7b/.env

This file was deleted.

57 changes: 0 additions & 57 deletions benchmark/text-generation-inference/llama-7b/docker-compose.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions benchmark/text-generation-inference/llama-7b/nginx.conf

This file was deleted.

13 changes: 0 additions & 13 deletions benchmark/text-generation-inference/llama-7b/tgi-results.csv

This file was deleted.

5 changes: 0 additions & 5 deletions benchmark/text-generation-inference/llama3-8b/.env

This file was deleted.

13 changes: 0 additions & 13 deletions benchmark/text-generation-inference/llama3-8b/tgi-results.csv

This file was deleted.

5 changes: 0 additions & 5 deletions benchmark/text-generation-inference/mistral-7b/.env

This file was deleted.

73 changes: 0 additions & 73 deletions benchmark/text-generation-inference/mistral-7b/docker-compose.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions benchmark/text-generation-inference/mistral-7b/nginx.conf

This file was deleted.

11 changes: 0 additions & 11 deletions benchmark/text-generation-inference/mistral-7b/tgi-results.csv

This file was deleted.

Loading

0 comments on commit ef9ba9c

Please sign in to comment.