[LLaMA3-8B] [PTQ] PTQ process is extreamingly slow

I try to deploy LLaMA3-8B onto my Genio 720, but I find the PTQ process (1_make_ptq_calibration_dataset.sh) is extreamingly slow, I am not sure if my system configurations are correct or NOT ?

The followings are my system configurations, hope you can provide some hints for my reference.

  • Host
    • Ubuntu 20.04
    • NVIDIA RTX A5000 * 2
  • Python packages
    • mtk-converter 8.13.0 (from NeuroPilot 8.0.7)
    • mtk_llm_sdk 2.8.2 (from mtk_llm_sdk 2.8.2)
    • mtk-quantization 8.2.0 (from NeuroPilot 8.0.7)
    • transformers 4.41.2
    • nvidia-cuda-runtime-cu12 12.1.105
  • Model
    • meta-llama/Meta-Llama-3-8B-Instruct (cloned from huggingface)

Hi Sting_Cheng,

Before digging deeper, could you help confirm the following three points so we can narrow down where the bottleneck is?

1. Confirm whether the GPU is actually being used during PTQ

While running 1_make_ptq_calibration_dataset.sh, please open another terminal and run:

watch -n 1 nvidia-smi

Please check:

  • Whether any python process is occupying GPU memory.
  • Whether GPU-Util rises noticeably.

2. Confirm PyTorch is a CUDA build (not CPU-only)

Please run the following command and share the output:

python -c "import torch; print(torch.__version__); print(torch.cuda.is_available()); print(torch.version.cuda)"

Make sure torch.cuda.is_available() returns True, and torch.version.cuda matches your installed CUDA 12.1.

3. Total runtime of 1_make_ptq_calibration_dataset.sh

If possible, please share:

  • The total time for one full run (even a rough number is fine if it takes very long).
  • The parameter settings inside the script.

Best,
Jun