-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: AWS Neuron SDK 2.19.1 * test(decoder): change llama model There is an issue with small llama models producing gibberish output with AWS Neuron SDK 2.19. * tests(decoder): add mixtral config * fix(Mixtral): disable continuous batching There is a regression in AWS Neuron SDK 2.19, so we need to stick to static batching. * fix: nit in description * chore(tgi): use AWS Neuron SDK 2.19.1 * test(tgi): adapt sample generations expectations * feat(tgi): change llama model and update expectations * docs: update Llama3-8-B benchmark numbers * perf(llama7b): use 12 cores and update numbers * perf(tgi): add llama3 and use dp2 for llama2 7b Each model now has its own docker-compose.yaml * perf(tgi): update Llama-2-7b bench results * perf(tgi): add Llama3 results * perf(tgi): update llama3-70b 48xlarge results * style: new ruff rules for type comparison * test(decoder): refactor pipelines tests
- Loading branch information
Showing
33 changed files
with
248 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
MODEL_ID='NousResearch/Llama-2-7b-chat-hf' | ||
HF_AUTO_CAST_TYPE='fp16' | ||
MAX_BATCH_SIZE=32 | ||
MAX_BATCH_SIZE=24 | ||
MAX_INPUT_LENGTH=3072 | ||
MAX_TOTAL_TOKENS=4096 |
57 changes: 57 additions & 0 deletions
57
benchmark/text-generation-inference/llama-7b/docker-compose.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
version: '3.7' | ||
|
||
services: | ||
tgi-1: | ||
image: neuronx-tgi:latest | ||
ports: | ||
- "8081:8081" | ||
environment: | ||
- PORT=8081 | ||
- MODEL_ID=${MODEL_ID} | ||
- HF_AUTO_CAST_TYPE=${HF_AUTO_CAST_TYPE} | ||
- HF_NUM_CORES=12 | ||
- MAX_BATCH_SIZE=${MAX_BATCH_SIZE} | ||
- MAX_INPUT_LENGTH=${MAX_INPUT_LENGTH} | ||
- MAX_TOTAL_TOKENS=${MAX_TOTAL_TOKENS} | ||
- MAX_CONCURRENT_REQUESTS=512 | ||
devices: | ||
- "/dev/neuron0" | ||
- "/dev/neuron1" | ||
- "/dev/neuron2" | ||
- "/dev/neuron3" | ||
- "/dev/neuron4" | ||
- "/dev/neuron5" | ||
|
||
tgi-2: | ||
image: neuronx-tgi:latest | ||
ports: | ||
- "8082:8082" | ||
environment: | ||
- PORT=8082 | ||
- MODEL_ID=${MODEL_ID} | ||
- HF_AUTO_CAST_TYPE=${HF_AUTO_CAST_TYPE} | ||
- HF_NUM_CORES=12 | ||
- MAX_BATCH_SIZE=${MAX_BATCH_SIZE} | ||
- MAX_INPUT_LENGTH=${MAX_INPUT_LENGTH} | ||
- MAX_TOTAL_TOKENS=${MAX_TOTAL_TOKENS} | ||
- MAX_CONCURRENT_REQUESTS=512 | ||
devices: | ||
- "/dev/neuron6" | ||
- "/dev/neuron7" | ||
- "/dev/neuron8" | ||
- "/dev/neuron9" | ||
- "/dev/neuron10" | ||
- "/dev/neuron11" | ||
|
||
loadbalancer: | ||
image: nginx:alpine | ||
ports: | ||
- "8080:80" | ||
volumes: | ||
- ./nginx.conf:/etc/nginx/nginx.conf:ro | ||
depends_on: | ||
- tgi-1 | ||
- tgi-2 | ||
deploy: | ||
placement: | ||
constraints: [node.role == manager] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
### Nginx TGI Load Balancer | ||
events {} | ||
http { | ||
upstream tgicluster { | ||
server tgi-1:8081; | ||
server tgi-2:8082; | ||
} | ||
server { | ||
listen 80; | ||
location / { | ||
proxy_pass http://tgicluster; | ||
} | ||
} | ||
} |
22 changes: 12 additions & 10 deletions
22
benchmark/text-generation-inference/llama-7b/tgi-results.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
model_id,concurrent requests,throughput (t/s),Time-to-first-token @ P50 (s),average latency (ms) | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,1,13.811941495564616,0.3781782309997652,71.37198062194233 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,2,23.461539426271507,0.3602376449998701,71.70553820509232 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,4,45.45448705790145,0.3612828944997091,73.58663426819392 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,8,71.13444471932405,0.3752646894999998,74.85884378373552 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,16,138.54599491404485,0.6447374934998606,81.11484812939682 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,32,247.32811870027916,1.0393478490004782,85.0958261705239 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,64,391.3595246354876,2.2831421710016,99.36474989676213 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,128,464.82600069905294,3.342431744500118,120.29151899306808 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,256,526.7164477974997,6.532527566999306,160.52458146930456 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,512,506.7975712115936,27.33909000099993,260.14547684970137 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,1,32.32303647791415,0.4092339959997844,32.98457994546189 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,8,280.2455817454919,0.4103973410001345,18.824823855788903 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,16,606.2237208004269,0.42390128999977605,19.73879150452322 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,24,778.5847225896651,0.44628154350084515,21.729555672304947 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,32,660.0774421854719,0.6625862749997395,40.97050480951723 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,50,809.3513111702051,1.1112228684996808,32.355166522075024 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,64,902.2019208540152,1.518584174499665,34.52519498921747 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,96,1000.426066970307,2.581174633500268,44.06432188527795 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,100,965.894643860531,5.110174397500032,44.77109148855796 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,128,1070.1775339135268,7.600166947499474,49.67094403911358 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,150,1059.6704842739082,8.564977125500263,55.47304516981905 | ||
huggingface/NousResearch/Llama-2-7b-chat-hf,200,1138.036018763616,13.465086967999923,64.28243222745746 |
13 changes: 3 additions & 10 deletions
13
benchmark/text-generation-inference/llama3-70b-inf2.48xlarge/tgi-results.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,4 @@ | ||
model_id,concurrent requests,throughput (t/s),Time-to-first-token @ P50 (s),average latency (ms) | ||
huggingface/NousResearch/Meta-Llama-3-70B-Instruct,1,18.818667211424472,1.3884793975012144,51.46871325828836 | ||
huggingface/NousResearch/Meta-Llama-3-70B-Instruct,2,32.22257477833452,2.0121661404991755,56.734265583687296 | ||
huggingface/NousResearch/Meta-Llama-3-70B-Instruct,4,50.19917175671667,5.205651430500438,66.04042245148653 | ||
huggingface/NousResearch/Meta-Llama-3-70B-Instruct,8,52.13272738944358,9.568476632499369,97.32615035298838 | ||
huggingface/NousResearch/Meta-Llama-3-70B-Instruct,16,53.59997031445967,26.087651531999654,191.19227161475598 | ||
huggingface/NousResearch/Meta-Llama-3-70B-Instruct,32,56.08684244759754,61.25285707449984,310.16900484570965 | ||
huggingface/NousResearch/Meta-Llama-3-70B-Instruct,64,57.40338464731561,129.3146581359997,560.2474255463762 | ||
huggingface/NousResearch/Meta-Llama-3-70B-Instruct,128,58.39025853766574,267.3882590960002,1094.9986170264501 | ||
huggingface/NousResearch/Meta-Llama-3-70B-Instruct,256,58.589480601098536,541.6153878579971,2147.5413489446523 | ||
huggingface/NousResearch/Meta-Llama-3-70B-Instruct,512,58.69645477077839,1085.1772966810022,4231.7554182432905 | ||
huggingface/NousResearch/Meta-Llama-3-70B-Instruct,1,22.4846564103628,1.2006561384987435,43.7079989917263 | ||
huggingface/NousResearch/Meta-Llama-3-70B-Instruct,8,64.09420641185218,4.925495064999268,85.36754380113435 | ||
huggingface/NousResearch/Meta-Llama-3-70B-Instruct,16,66.62450133873871,22.87049979600488,135.4123021951354 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
MODEL_ID='NousResearch/Meta-Llama-3-8B-Instruct' | ||
HF_AUTO_CAST_TYPE='fp16' | ||
MAX_BATCH_SIZE=32 | ||
MAX_INPUT_LENGTH=4000 | ||
MAX_TOTAL_TOKENS=4096 |
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
benchmark/text-generation-inference/llama3-8b/tgi-results.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
model_id,concurrent requests,throughput (t/s),Time-to-first-token @ P50 (s),average latency (ms) | ||
huggingface/NousResearch/Meta-Llama-3-8B-Instruct,1,44.72947298811359,0.2930618720001803,21.387192412995546 | ||
huggingface/NousResearch/Meta-Llama-3-8B-Instruct,8,254.26638394677616,0.3072573690005811,24.51789344634094 | ||
huggingface/NousResearch/Meta-Llama-3-8B-Instruct,16,396.49578354796415,0.31329568949968234,29.41915454622028 | ||
huggingface/NousResearch/Meta-Llama-3-8B-Instruct,24,458.9461712504898,0.31723227349903027,36.45821381291491 | ||
huggingface/NousResearch/Meta-Llama-3-8B-Instruct,32,540.3852559365118,0.31949053349944734,39.548380672987705 | ||
huggingface/NousResearch/Meta-Llama-3-8B-Instruct,50,648.5983772802653,0.6981559694995667,47.64409672960739 | ||
huggingface/NousResearch/Meta-Llama-3-8B-Instruct,64,729.1746189461367,0.8981061290014623,51.60748655120524 | ||
huggingface/NousResearch/Meta-Llama-3-8B-Instruct,96,823.7525735951876,1.1334064394995949,60.62761554646364 | ||
huggingface/NousResearch/Meta-Llama-3-8B-Instruct,100,829.9821677199822,1.2774171685014153,63.72698943226848 | ||
huggingface/NousResearch/Meta-Llama-3-8B-Instruct,128,838.2579077776568,1.5125607664995186,74.21572967679927 | ||
huggingface/NousResearch/Meta-Llama-3-8B-Instruct,150,849.2518611727152,1.7492157529995893,80.71755481115194 | ||
huggingface/NousResearch/Meta-Llama-3-8B-Instruct,200,864.4918328198065,2.4135443449995364,98.63394209087461 |
73 changes: 73 additions & 0 deletions
73
benchmark/text-generation-inference/mistral-7b/docker-compose.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
version: '3.7' | ||
|
||
services: | ||
tgi-1: | ||
image: neuronx-tgi:latest | ||
ports: | ||
- "8081:8081" | ||
environment: | ||
- PORT=8081 | ||
- MODEL_ID=${MODEL_ID} | ||
- HF_AUTO_CAST_TYPE=${HF_AUTO_CAST_TYPE} | ||
- HF_NUM_CORES=8 | ||
- MAX_BATCH_SIZE=${MAX_BATCH_SIZE} | ||
- MAX_INPUT_LENGTH=${MAX_INPUT_LENGTH} | ||
- MAX_TOTAL_TOKENS=${MAX_TOTAL_TOKENS} | ||
- MAX_CONCURRENT_REQUESTS=512 | ||
devices: | ||
- "/dev/neuron0" | ||
- "/dev/neuron1" | ||
- "/dev/neuron2" | ||
- "/dev/neuron3" | ||
|
||
tgi-2: | ||
image: neuronx-tgi:latest | ||
ports: | ||
- "8082:8082" | ||
environment: | ||
- PORT=8082 | ||
- MODEL_ID=${MODEL_ID} | ||
- HF_AUTO_CAST_TYPE=${HF_AUTO_CAST_TYPE} | ||
- HF_NUM_CORES=8 | ||
- MAX_BATCH_SIZE=${MAX_BATCH_SIZE} | ||
- MAX_INPUT_LENGTH=${MAX_INPUT_LENGTH} | ||
- MAX_TOTAL_TOKENS=${MAX_TOTAL_TOKENS} | ||
- MAX_CONCURRENT_REQUESTS=512 | ||
devices: | ||
- "/dev/neuron4" | ||
- "/dev/neuron5" | ||
- "/dev/neuron6" | ||
- "/dev/neuron7" | ||
|
||
tgi-3: | ||
image: neuronx-tgi:latest | ||
ports: | ||
- "8083:8083" | ||
environment: | ||
- PORT=8083 | ||
- MODEL_ID=${MODEL_ID} | ||
- HF_AUTO_CAST_TYPE=${HF_AUTO_CAST_TYPE} | ||
- HF_NUM_CORES=8 | ||
- MAX_BATCH_SIZE=${MAX_BATCH_SIZE} | ||
- MAX_INPUT_LENGTH=${MAX_INPUT_LENGTH} | ||
- MAX_TOTAL_TOKENS=${MAX_TOTAL_TOKENS} | ||
- MAX_CONCURRENT_REQUESTS=512 | ||
devices: | ||
- "/dev/neuron8" | ||
- "/dev/neuron9" | ||
- "/dev/neuron10" | ||
- "/dev/neuron11" | ||
|
||
loadbalancer: | ||
image: nginx:alpine | ||
ports: | ||
- "8080:80" | ||
volumes: | ||
- ./nginx.conf:/etc/nginx/nginx.conf:ro | ||
depends_on: | ||
- tgi-1 | ||
- tgi-2 | ||
- tgi-3 | ||
deploy: | ||
placement: | ||
constraints: [node.role == manager] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
### Nginx TGI Load Balancer | ||
events {} | ||
http { | ||
upstream tgicluster { | ||
server tgi-1:8081; | ||
server tgi-2:8082; | ||
server tgi-3:8083; | ||
} | ||
server { | ||
listen 80; | ||
location / { | ||
proxy_pass http://tgicluster; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+586 Bytes
(100%)
docs/assets/benchmarks/inferentia-llama3-8b/throughput.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,4 @@ | |
|
||
__version__ = "0.0.24.dev0" | ||
|
||
__sdk_version__ = "2.18.0" | ||
__sdk_version__ = "2.19.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.