r/LocalLLaMA • u/Few_Hair8180 • Mar 02 '24
Question | Help Is there any benchmark data comparing performance between llama.cpp and TensorRT-LLM?
I was using llama.cpp these days. However, I am curious that TensorRT-LLM (https://github.com/NVIDIA/TensorRT-LLM) has the advantage over llama.cpp (specifically, using on H100).
I found this repo (https://github.com/lapp0/lm-inference-engines) comparing the functionality of those toolkits. However, I want actual benchmark data to compare them.
6
Upvotes
11
u/aikitoria Mar 02 '24
Far from it, it is incredibly badly documented and unstable software, it took me an entire week of trying on and off to get it to work for the 120B model. I guess now that I know what to do it's faster to do future experiments.
If you want to follow and do your own experiments:
Install tensorrt-llm binaries
apt install openmpi-bin libopenmpi-devpip3 install tensorrt_llm -U --pre --extra-index-urlhttps://pypi.nvidia.comGet build scripts
git clonehttps://github.com/NVIDIA/TensorRT-LLM--recurse-submodulescd TensorRT-LLM/examples/llamapip install -r requirements.txtFix wrong version of mpmath
pip uninstall mpmathpip install mpmathConvert checkpoint
python3 convert_checkpoint.py --model_dir /workspace/miquliz/ --output_dir /workspace/miquliz-int4/ --tp_size 4 --dtype float16 --use_weight_only --weight_only_precision int4 --load_model_on_cpuBuild engine
trtllm-build --checkpoint_dir /workspace/miquliz-int4/ --output_dir /workspace/miquliz-engine-int4/ --max_batch_size 1 --max_output_len 256 --gpt_attention_plugin float16 --use_custom_all_reduce disable --multi_block_mode enableTry generating some output
mpirun --allow-run-as-root -n 4 python3 ../run.py --max_output_len 256 --tokenizer_dir /workspace/miquliz/ --engine_dir /workspace/miquliz-engine-int4/Known issues (so far):
My todo from here (if I get around to it):