-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6836d1e
commit 584b59f
Showing
3 changed files
with
45 additions
and
30 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,32 @@ | ||
from optimum_benchmark.backends.pytorch.config import PyTorchConfig | ||
from optimum_benchmark.benchmarks.inference.config import InferenceConfig | ||
from optimum_benchmark.experiment import ExperimentConfig, launch | ||
from optimum_benchmark.launchers.process.config import ProcessConfig | ||
from optimum_benchmark.logging_utils import setup_logging | ||
|
||
if __name__ == "__main__": | ||
setup_logging(level="INFO") | ||
launcher_config = ProcessConfig(device_isolation=False) | ||
benchmark_config = InferenceConfig( | ||
memory=True, | ||
latency=True, | ||
input_shapes={"batch_size": 4, "sequence_length": 128}, | ||
generate_kwargs={"max_new_tokens": 128, "min_new_tokens": 128}, | ||
) | ||
backend_config = PyTorchConfig( | ||
model="TheBloke/Mistral-7B-Instruct-v0.1-AWQ", | ||
device="cuda", | ||
device_ids="0", | ||
no_weights=True, | ||
quantization_scheme="awq", | ||
quantization_config={"version": "exllama"}, | ||
) | ||
experiment_config = ExperimentConfig( | ||
experiment_name="awq-exllamav2", | ||
benchmark=benchmark_config, | ||
launcher=launcher_config, | ||
backend=backend_config, | ||
) | ||
benchmark_report = launch(experiment_config) | ||
experiment_config.push_to_hub("IlyasMoutawwakil/awq-benchmarks") | ||
benchmark_report.push_to_hub("IlyasMoutawwakil/awq-benchmarks") |
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