Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Feb 12, 2024
1 parent 8ba0a57 commit 7fd9323
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 24 deletions.
10 changes: 8 additions & 2 deletions examples/neural_compressor_ptq_bert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,28 @@ defaults:
experiment_name: openvino_static_quant_bert

backend:
model: bert-base-uncased
device: cpu
no_weights: true
model: bert-base-uncased
ptq_quantization: true
calibration: true
device: cpu

benchmark:
input_shapes:
batch_size: 1

# hydra/cli specific settings
hydra:
run:
# where to store run results
dir: runs/${experiment_name}
sweep:
# where to store sweep results
dir: sweeps/${experiment_name}
job:
# change working directory to the run directory
chdir: true
env_set:
# set environment variable OVERRIDE_BENCHMARKS to 1
# to not skip benchmarks that have been run before
OVERRIDE_BENCHMARKS: 1
11 changes: 8 additions & 3 deletions examples/onnxruntime_static_quant_vit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,28 @@ defaults:
experiment_name: onnxruntime_static_quant_vit

backend:
device: cpu
no_weights: true
model: google/vit-base-patch16-224
quantization: true
quantization_config:
is_static: true
per_channel: false
device: cpu

calibration: true

# hydra/cli specific settings
hydra:
run:
# where to store run results
dir: runs/${experiment_name}
sweep:
# where to store sweep results
dir: sweeps/${experiment_name}
job:
# change working directory to the run directory
chdir: true
env_set:
# set environment variable OVERRIDE_BENCHMARKS to 1
# to not skip benchmarks that have been run before
OVERRIDE_BENCHMARKS: 1
CUDA_VISIBLE_DEVICES: 0
CUDA_DEVICE_ORDER: PCI_BUS_ID
10 changes: 8 additions & 2 deletions examples/openvino_diffusion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,28 @@ defaults:
model: stabilityai/stable-diffusion-2-1

backend:
device: cpu
experiment_name: openvino_diffusion
export: true
reshape: true
export: true
half: true
device: cpu

benchmark:
input_shapes:
batch_size: 1

# hydra/cli specific settings
hydra:
run:
# where to store run results
dir: runs/${experiment_name}
sweep:
# where to store sweep results
dir: sweeps/${experiment_name}
job:
# change working directory to the run directory
chdir: true
env_set:
# set environment variable OVERRIDE_BENCHMARKS to 1
# to not skip benchmarks that have been run before
OVERRIDE_BENCHMARKS: 1
10 changes: 8 additions & 2 deletions examples/openvino_static_quant_bert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,30 @@ defaults:
experiment_name: openvino_static_quant_bert

backend:
device: cpu
no_weights: true
model: bert-base-uncased
export: true
no_weights: true
quantization: true
calibration: true
reshape: true
device: cpu

benchmark:
input_shapes:
batch_size: 1

# hydra/cli specific settings
hydra:
run:
# where to store run results
dir: runs/${experiment_name}
sweep:
# where to store sweep results
dir: sweeps/${experiment_name}
job:
# change working directory to the run directory
chdir: true
env_set:
# set environment variable OVERRIDE_BENCHMARKS to 1
# to not skip benchmarks that have been run before
OVERRIDE_BENCHMARKS: 1
11 changes: 8 additions & 3 deletions examples/pytorch_bert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,22 @@ defaults:
experiment_name: pytorch_bert

backend:
model: bert-base-uncased
device: cpu
device_ids: 0
model: bert-base-uncased

# hydra/cli specific settings
hydra:
run:
# where to store run results
dir: runs/${experiment_name}
sweep:
# where to store sweep results
dir: sweeps/${experiment_name}
job:
# change working directory to the run directory
chdir: true
env_set:
# set environment variable OVERRIDE_BENCHMARKS to 1
# to not skip benchmarks that have been run before
OVERRIDE_BENCHMARKS: 1
CUDA_VISIBLE_DEVICES: 0
CUDA_DEVICE_ORDER: PCI_BUS_ID
12 changes: 9 additions & 3 deletions examples/pytorch_llama.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ defaults:
experiment_name: pytorch_llama

backend:
model: TheBloke/Llama-2-70B-AWQ
device: cuda
device_ids: 0
no_weights: true
model: TheBloke/Llama-2-70B-AWQ

launcher:
device_isolation: true
Expand All @@ -22,14 +24,18 @@ benchmark:
sequence_length: 256
new_tokens: 1000

# hydra/cli specific settings
hydra:
run:
# where to store run results
dir: runs/${experiment_name}
sweep:
# where to store sweep results
dir: sweeps/${experiment_name}
job:
# change working directory to the run directory
chdir: true
env_set:
# set environment variable OVERRIDE_BENCHMARKS to 1
# to not skip benchmarks that have been run before
OVERRIDE_BENCHMARKS: 1
CUDA_VISIBLE_DEVICES: 0
CUDA_DEVICE_ORDER: PCI_BUS_ID
11 changes: 8 additions & 3 deletions examples/pytorch_timm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ defaults:
experiment_name: pytorch_timm

backend:
model: timm/mobilenetv3_large_100.ra_in1k
device: cuda
device_ids: 0
model: timm/mobilenetv3_large_100.ra_in1k

launcher:
device_isolation: true
Expand All @@ -20,14 +21,18 @@ benchmark:
input_shapes:
batch_size: 1

# hydra/cli specific settings
hydra:
run:
# where to store run results
dir: runs/${experiment_name}
sweep:
# where to store sweep results
dir: sweeps/${experiment_name}
job:
# change working directory to the run directory
chdir: true
env_set:
# set environment variable OVERRIDE_BENCHMARKS to 1
# to not skip benchmarks that have been run before
OVERRIDE_BENCHMARKS: 1
CUDA_VISIBLE_DEVICES: 0
CUDA_DEVICE_ORDER: PCI_BUS_ID
12 changes: 9 additions & 3 deletions examples/tgi_llama.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,31 @@ defaults:
experiment_name: tgi_llama

backend:
device: cuda
device_ids: 0,1
device_map: true
model: TheBloke/Llama-2-7B-AWQ
quantization_scheme: awq
sharded: false
device: cuda

benchmark:
input_shapes:
batch_size: 1
sequence_length: 256
new_tokens: 1000

# hydra/cli specific settings
hydra:
run:
# where to store run results
dir: runs/${experiment_name}
sweep:
# where to store sweep results
dir: sweeps/${experiment_name}
job:
# change working directory to the run directory
chdir: true
env_set:
# set environment variable OVERRIDE_BENCHMARKS to 1
# to not skip benchmarks that have been run before
OVERRIDE_BENCHMARKS: 1
CUDA_VISIBLE_DEVICES: 0
CUDA_DEVICE_ORDER: PCI_BUS_ID
10 changes: 7 additions & 3 deletions examples/trt_llama.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,27 @@ defaults:
experiment_name: trt_llama

backend:
model: NousResearch/Llama-2-7b-hf
device: cuda
model: NousResearch/Llama-2-7b-hf

benchmark:
input_shapes:
batch_size: 1
sequence_length: 64
new_tokens: 128

# hydra/cli specific settings
hydra:
run:
# where to store run results
dir: runs/${experiment_name}
sweep:
# where to store sweep results
dir: sweeps/${experiment_name}
job:
# change working directory to the run directory
chdir: true
env_set:
# set environment variable OVERRIDE_BENCHMARKS to 1
# to not skip benchmarks that have been run before
OVERRIDE_BENCHMARKS: 1
CUDA_VISIBLE_DEVICES: 0
CUDA_DEVICE_ORDER: PCI_BUS_ID

0 comments on commit 7fd9323

Please sign in to comment.