optimum-benchmark
ποΈ A unified multi-backend utility for benchmarking Transformers, Timm, PEFT, Diffusers and Sentence-Transformers with full support of Optimum's hardware optimizations & quantization schemes.
νμΌ νμκΈ°
μ΅μ’ λ²μ λ€μ΄λ‘λ (.zip)- images.yaml
- quality.yaml
- security.yml
- test_api_cpu.yaml
- test_api_cuda.yaml
- test_api_misc.yaml
- test_api_rocm.yaml
- test_cli_cpu_ipex.yaml
- test_cli_cpu_llama_cpp.yaml
- test_cli_cpu_onnxruntime.yaml
- test_cli_cpu_openvino.yaml
- test_cli_cpu_py_txi.yaml
- test_cli_cpu_pytorch.yaml
- test_cli_cuda_onnxruntime.yaml
- test_cli_cuda_py_txi.yaml
- test_cli_cuda_pytorch.yaml
- test_cli_cuda_tensorrt_llm.yaml
- test_cli_cuda_vllm.yaml
- test_cli_misc.yaml
- test_cli_rocm_pytorch.yaml
- test_energy_star.yaml
- Dockerfile
- Dockerfile
- Dockerfile
- Dockerfile
- _base_.yaml
- automatic_speech_recognition.yaml
- image_classification.yaml
- image_to_text.yaml
- object_detection.yaml
- question_answering.yaml
- sentence_similarity.yaml
- summarization.yaml
- t5_question_answering.yaml
- t5_summarization.yaml
- t5_text_classification.yaml
- t5_text_generation.yaml
- text_classification.yaml
- text_generation.yaml
- text_to_image.yaml
- _base_.yaml
- cpu_ipex_bert.yaml
- cpu_ipex_llama.yaml
- cpu_llama_cpp_embedding.yaml
- cpu_llama_cpp_text_generation.yaml
- cpu_onnxruntime_static_quant_vit.yaml
- cpu_openvino_8bit_bert.yaml
- cpu_openvino_diffusion.yaml
- cuda_pytorch_bert.py
- cuda_pytorch_bert.yaml
- cuda_pytorch_llama.yaml
- cuda_pytorch_llama_compile_model.yaml
- cuda_pytorch_llama_compile_regions.yaml
- cuda_pytorch_llama_quants.py
- cuda_pytorch_vlm.yaml
- cuda_tgi_llama.yaml
- cuda_trt_llama.yaml
- cuda_vllm_llama.yaml
- mps_pytorch_bert.yaml
- __init__.py
- backend.py
- config.py
- utils.py
- __init__.py
- backend.py
- config.py
- __init__.py
- backend.py
- config.py
- utils.py
- __init__.py
- backend.py
- config.py
- utils.py
- __init__.py
- backend.py
- config.py
- __init__.py
- backend.py
- config.py
- __init__.py
- backend.py
- config.py
- utils.py
- __init__.py
- backend.py
- config.py
- __init__.py
- base.py
- config.py
- diffusers_utils.py
- peft_utils.py
- timm_utils.py
- transformers_utils.py
- __init__.py
- base.py
- config.py
- report.py
- __init__.py
- base.py
- dataset_generator.py
- input_generator.py
- model_generator.py
- task_generator.py
- __init__.py
- config.py
- launcher.py
- __init__.py
- config.py
- launcher.py
- __init__.py
- config.py
- launcher.py
- __init__.py
- base.py
- config.py
- device_isolation_utils.py
- dataset_preprocessor.py
- __init__.py
- fx_profiler.py
- ort_profiler.py
- __init__.py
- config.py
- scenario.py
- __init__.py
- config.py
- scenario.py
- __init__.py
- config.py
- scenario.py
- __init__.py
- base.py
- config.py
- __init__.py
- energy.py
- latency.py
- memory.py
- __init__.py
- cli.py
- hub_utils.py
- import_utils.py
- logging_utils.py
- plot_utils.py
- process_utils.py
- system_utils.py
- task_utils.py
- version.py
- total_tests_runs.py
- update_ci_badges.py
- _awq_.yaml
- _base_.yaml
- _bert_.yaml
- _bloom_.yaml
- _bnb_.yaml
- _cpu_.yaml
- _cuda_.yaml
- _ddp_.yaml
- _deepspeed_inference_.yaml
- _device_isolation_.yaml
- _device_map_.yaml
- _diffusers_.yaml
- _dp_.yaml
- _export_.yaml
- _gguf_.yaml
- _gpt2_.yaml
- _gptq_.yaml
- _image_text_to_text_.yaml
- _inference_.yaml
- _no_weights_.yaml
- _ort_quant_.yaml
- _peft_.yaml
- _serving_mode_.yaml
- _st_bert_.yaml
- _tensorrt_llm_pp_.yaml
- _tensorrt_llm_tp_.yaml
- _text_decoders_.yaml
- _text_encoders_.yaml
- _text_encoders_decoders_.yaml
- _timm_.yaml
- _torch_compile_.yaml
- _tp_.yaml
- _training_.yaml
- _vllm_.yaml
- _vllm_pp_.yaml
- _vllm_tp_.yaml
- cpu_inference_ipex_text_decoders.yaml
- cpu_inference_ipex_text_encoders.yaml
- cpu_inference_llama_cpp_gguf.yaml
- cpu_inference_onnxruntime_diffusers.yaml
- cpu_inference_onnxruntime_ort_quant.yaml
- cpu_inference_onnxruntime_text_decoders.yaml
- cpu_inference_onnxruntime_text_encoders.yaml
- cpu_inference_onnxruntime_text_encoders_decoders.yaml
- cpu_inference_onnxruntime_timm.yaml
- cpu_inference_openvino_diffusers.yaml
- cpu_inference_openvino_text_decoders.yaml
- cpu_inference_openvino_text_encoders.yaml
- cpu_inference_py_txi_gpt2.yaml
- cpu_inference_py_txi_st_bert.yaml
- cpu_inference_pytorch_diffusers.yaml
- cpu_inference_pytorch_diffusers_torch_compile.yaml
- cpu_inference_pytorch_image_text_to_text.yaml
- cpu_inference_pytorch_text_decoders.yaml
- cpu_inference_pytorch_text_encoders.yaml
- cpu_inference_pytorch_text_encoders_decoders.yaml
- cpu_inference_pytorch_timm.yaml
- cpu_inference_pytorch_timm_torch_compile.yaml
- cpu_training_pytorch_text_decoders.yaml
- cpu_training_pytorch_text_encoders.yaml
- cuda_inference_onnxruntime_text_decoders.yaml
- cuda_inference_onnxruntime_text_encoders.yaml
- cuda_inference_py_txi_gpt2.yaml
- cuda_inference_py_txi_st_bert.yaml
- cuda_inference_pytorch_bnb.yaml
- cuda_inference_pytorch_deepspeed_inference.yaml
- cuda_inference_pytorch_device_map.yaml
- cuda_inference_pytorch_diffusers.yaml
- cuda_inference_pytorch_diffusers_torch_compile.yaml
- cuda_inference_pytorch_gptq.yaml
- cuda_inference_pytorch_text_decoders.yaml
- cuda_inference_pytorch_text_encoders.yaml
- cuda_inference_pytorch_timm.yaml
- cuda_inference_pytorch_timm_torch_compile.yaml
- cuda_inference_pytorch_tp.yaml
- cuda_inference_tensorrt_llm.yaml
- cuda_inference_tensorrt_llm_pp.yaml
- cuda_inference_tensorrt_llm_tp.yaml
- cuda_inference_vllm_bloom.yaml
- cuda_inference_vllm_bloom_pp.yaml
- cuda_inference_vllm_bloom_tp.yaml
- cuda_training_pytorch_ddp.yaml
- cuda_training_pytorch_device_map.yaml
- cuda_training_pytorch_dp.yaml
- cuda_training_pytorch_peft.yaml
- cuda_training_pytorch_text_decoders.yaml
- cuda_training_pytorch_text_encoders.yaml
- conftest.py
- test_api.py
- test_cli.py
- test_energy_star.py
- test_examples.py
- onnxruntime_encoder.py
- openvino_llm.py
- openvino_vlm.py
- .gitignore
- .python-version
- CONTRIBUTING.md
- LICENSE
- logo.png
- Makefile
- pyproject.toml
- README.md
- uv.lock
- uv.toml
# μ€μΉ κ°μ΄λ
git clone https://github.com/huggingface/optimum-benchmark
κΉνλΈμμ νλ‘μ νΈ μ½λ μ 체λ₯Ό λ΄ μ»΄ν¨ν°λ‘ λ΄λ €λ°μ΅λλ€.
cd optimum-benchmark
λ°©κΈ λ΄λ €λ°μ νλ‘μ νΈ ν΄λ μμΌλ‘ μ΄λν©λλ€.
2. 곡μ μ€μΉ μ€ν¬λ¦½νΈ
μ¬μ μΆμ²- Python 3 pip λͺ λ Ήμ΄λ₯Ό μ°λ €λ©΄ Pythonμ΄ νμν©λλ€.
pip install uv
PyPIμ λ°°ν¬λ ν¨ν€μ§λ₯Ό λ°λ‘ μ€μΉν©λλ€. μμ€ ν΄λ‘ μ΄ νμ μμ΅λλ€.
pip install optimum-benchmark
PyPIμ λ°°ν¬λ ν¨ν€μ§λ₯Ό λ°λ‘ μ€μΉν©λλ€. μμ€ ν΄λ‘ μ΄ νμ μμ΅λλ€.
pip install git+https://github.com/huggingface/optimum-benchmark.git
PyPIμ λ°°ν¬λ ν¨ν€μ§λ₯Ό λ°λ‘ μ€μΉν©λλ€. μμ€ ν΄λ‘ μ΄ νμ μμ΅λλ€.
μ΄ λ ν¬μ READMEμ μ ν μ€μ λͺ λ Ήμ΄λ₯Ό κ·Έλλ‘ κ°μ Έμμ΅λλ€.
3. Docker
μ¬μ- Git GitHubμμ νλ‘μ νΈ μ½λλ₯Ό λ΄λ €λ°μΌλ €λ©΄ νμν©λλ€.
- Docker Desktop 컨ν μ΄λλ₯Ό λΉλνκ³ μ€ννλ €λ©΄ νμν©λλ€. μ€μΉ ν μ€νν΄μ λ°±κ·ΈλΌμ΄λμ μΌλμΈμ.
docker build -f docker/cpu/Dockerfile -t optimum-benchmark .
Dockerfileμ κΈ°λ°μΌλ‘ μ€ν κ°λ₯ν μ΄λ―Έμ§λ₯Ό λΉλν©λλ€.
docker run -p 8080:80 optimum-benchmark
λΉλλ μ΄λ―Έμ§λ₯Ό μ€μ 컨ν μ΄λλ‘ μ€νν©λλ€.
4. Python
μ¬μpip install uv
PyPIμ λ°°ν¬λ ν¨ν€μ§λ₯Ό λ°λ‘ μ€μΉν©λλ€. μμ€ ν΄λ‘ μ΄ νμ μμ΅λλ€.
pip install optimum-benchmark
PyPIμ λ°°ν¬λ ν¨ν€μ§λ₯Ό λ°λ‘ μ€μΉν©λλ€. μμ€ ν΄λ‘ μ΄ νμ μμ΅λλ€.
pip install git+https://github.com/huggingface/optimum-benchmark.git
PyPIμ λ°°ν¬λ ν¨ν€μ§λ₯Ό λ°λ‘ μ€μΉν©λλ€. μμ€ ν΄λ‘ μ΄ νμ μμ΅λλ€.
pip install -e .
requirements.txt λ±μ λͺ μλ νμ΄μ¬ λΌμ΄λΈλ¬λ¦¬λ₯Ό μ€μΉν©λλ€.
μ΄ λ ν¬μ READMEμ μ ν μ€μ λͺ λ Ήμ΄λ₯Ό κ·Έλλ‘ κ°μ Έμμ΅λλ€.
5. Make
보ν΅- Git GitHubμμ νλ‘μ νΈ μ½λλ₯Ό λ΄λ €λ°μΌλ €λ©΄ νμν©λλ€.
- Make Linux/macOSλ λ³΄ν΅ κΈ°λ³Έ μ€μΉλμ΄ μμ΅λλ€. Windowsλ λ³λ μ€μΉ(μ: MSYS2, WSL)κ° νμν©λλ€.
make
μμ±λ λΉλ μ€μ μ λ°νμΌλ‘ μ€μ μ»΄νμΌμ μ§νν΄ μ€ν νμΌμ λ§λλλ€.
