TensorRT-LLM icon indicating copy to clipboard operation
TensorRT-LLM copied to clipboard

The TensorRT version of the TensorRT-LLM always mismatch with the TensorRT version of Tritonserver

Open YunChen1227 opened this issue 2 years ago • 7 comments

System Info

3090 CUDA:12.3.2 the CUDA is in the docker, so I can change it easily.

Who can help?

No response

Information

  • [X] The official example scripts
  • [X] My own modified scripts

Tasks

  • [X] An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • [X] My own task or dataset (give details below)

Reproduction

Installing the docker container

Obtain and start the basic docker image environment (optional).

docker run --rm --runtime=nvidia --gpus all --entrypoint /bin/bash -it nvidia/cuda:12.1.0-devel-ubuntu22.04

Install dependencies, TensorRT-LLM requires Python 3.10

apt-get update && apt-get -y install python3.10 python3-pip openmpi-bin libopenmpi-dev git

Install the latest preview version (corresponding to the main branch) of TensorRT-LLM.

If you want to install the stable version (corresponding to the release branch), please

remove the --pre option.

pip3 install tensorrt_llm -U --pre --extra-index-url https://pypi.nvidia.com

Check installation

python3 -c "import tensorrt_llm"

  1. build the llama engine with tensor parallel = 2

Build LLaMA 7B using 2-way tensor parallelism.

python convert_checkpoint.py --model_dir ./tmp/llama/7B/
--output_dir ./tllm_checkpoint_2gpu_tp2
--dtype float16
--tp_size 2

trtllm-build --checkpoint_dir ./tllm_checkpoint_2gpu_tp2
--output_dir ./tmp/llama/7B/trt_engines/fp16/2-gpu/
--gemm_plugin auto

  1. deploy in the triton server docker run -it --rm --gpus all --network host --shm-size=1g
    -v $(pwd)/all_models:/all_models
    -v $(pwd)/scripts:/opt/scripts
    nvcr.io/nvidia/tritonserver:23.10-trtllm-python-py3

Log in to huggingface-cli to get tokenizer

huggingface-cli login --token *****

Install python dependencies

pip install sentencepiece protobuf

Launch Server

python /opt/scripts/launch_triton_server.py --model_repo /all_models/inflight_batcher_llm --world_size 1 Send Requests

Expected behavior

the triton sever run successfully

actual behavior

tensorrt_llm can not be launched because the TensorRT version is mismatched between the ENGINE and the Triton Server

additional notes

None

YunChen1227 avatar May 29 '24 10:05 YunChen1227

And this is what happens when using Triton Server 24.04

root@ccnl06:/opt/tritonserver# python3 /opt/scripts/launch_triton_server.py --model_repo /all_models/inflight_batcher_llm --world_size 2 root@ccnl06:/opt/tritonserver# I0530 02:45:19.980873 382 pinned_memory_manager.cc:275] Pinned memory pool is created at '0x7f5bf4000000' with size 268435456 I0530 02:45:19.981462 381 pinned_memory_manager.cc:275] Pinned memory pool is created at '0x7fa626000000' with size 268435456 I0530 02:45:19.988445 382 cuda_memory_manager.cc:107] CUDA memory pool is created on device 0 with size 67108864 I0530 02:45:19.988456 382 cuda_memory_manager.cc:107] CUDA memory pool is created on device 1 with size 67108864 I0530 02:45:19.988459 382 cuda_memory_manager.cc:107] CUDA memory pool is created on device 2 with size 67108864 I0530 02:45:19.988461 382 cuda_memory_manager.cc:107] CUDA memory pool is created on device 3 with size 67108864 I0530 02:45:19.988464 382 cuda_memory_manager.cc:107] CUDA memory pool is created on device 4 with size 67108864 I0530 02:45:19.988466 382 cuda_memory_manager.cc:107] CUDA memory pool is created on device 5 with size 67108864 I0530 02:45:19.988468 382 cuda_memory_manager.cc:107] CUDA memory pool is created on device 6 with size 67108864 I0530 02:45:19.988470 382 cuda_memory_manager.cc:107] CUDA memory pool is created on device 7 with size 67108864 I0530 02:45:19.988863 381 cuda_memory_manager.cc:107] CUDA memory pool is created on device 0 with size 67108864 I0530 02:45:19.988877 381 cuda_memory_manager.cc:107] CUDA memory pool is created on device 1 with size 67108864 I0530 02:45:19.988881 381 cuda_memory_manager.cc:107] CUDA memory pool is created on device 2 with size 67108864 I0530 02:45:19.988883 381 cuda_memory_manager.cc:107] CUDA memory pool is created on device 3 with size 67108864 I0530 02:45:19.988886 381 cuda_memory_manager.cc:107] CUDA memory pool is created on device 4 with size 67108864 I0530 02:45:19.988888 381 cuda_memory_manager.cc:107] CUDA memory pool is created on device 5 with size 67108864 I0530 02:45:19.988890 381 cuda_memory_manager.cc:107] CUDA memory pool is created on device 6 with size 67108864 I0530 02:45:19.988892 381 cuda_memory_manager.cc:107] CUDA memory pool is created on device 7 with size 67108864 W0530 02:45:20.941921 382 server.cc:251] failed to enable peer access for some device pairs I0530 02:45:20.948148 382 model_lifecycle.cc:469] loading: tensorrt_llm:1 W0530 02:45:20.950526 381 server.cc:251] failed to enable peer access for some device pairs I0530 02:45:20.962409 381 model_lifecycle.cc:469] loading: postprocessing:1 I0530 02:45:20.962761 381 model_lifecycle.cc:469] loading: preprocessing:1 I0530 02:45:20.963105 381 model_lifecycle.cc:469] loading: tensorrt_llm:1 I0530 02:45:20.963428 381 model_lifecycle.cc:469] loading: tensorrt_llm_bls:1 I0530 02:45:20.987986 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: preprocessing_0_0 (GPU device 0) I0530 02:45:20.988008 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: postprocessing_0_0 (GPU device 1) I0530 02:45:20.988031 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: postprocessing_0_0 (GPU device 0) I0530 02:45:20.988034 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: preprocessing_0_0 (GPU device 1) I0530 02:45:20.988239 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: preprocessing_0_0 (GPU device 2) I0530 02:45:20.988405 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: postprocessing_0_0 (GPU device 3) I0530 02:45:20.988412 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: postprocessing_0_0 (GPU device 2) I0530 02:45:20.988461 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: preprocessing_0_0 (GPU device 3) I0530 02:45:20.988510 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: preprocessing_0_0 (GPU device 4) I0530 02:45:20.988635 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: postprocessing_0_0 (GPU device 4) I0530 02:45:20.988805 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: postprocessing_0_0 (GPU device 5) I0530 02:45:20.988832 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: preprocessing_0_0 (GPU device 5) I0530 02:45:20.988870 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: preprocessing_0_0 (GPU device 6) I0530 02:45:20.989005 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: preprocessing_0_0 (GPU device 7) I0530 02:45:20.989066 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: postprocessing_0_0 (GPU device 7) I0530 02:45:20.989129 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: postprocessing_0_0 (GPU device 6) [TensorRT-LLM][INFO] Initializing MPI with thread mode 3 [TensorRT-LLM][INFO] Initializing MPI with thread mode 3 I0530 02:45:21.775384 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: tensorrt_llm_bls_0_0 (GPU device 0) I0530 02:45:21.775432 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: tensorrt_llm_bls_0_0 (GPU device 1) I0530 02:45:21.775466 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: tensorrt_llm_bls_0_0 (GPU device 2) I0530 02:45:21.775518 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: tensorrt_llm_bls_0_0 (GPU device 3) [TensorRT-LLM][WARNING] gpu_device_ids is not specified, will be automatically set I0530 02:45:21.775663 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: tensorrt_llm_bls_0_0 (GPU device 4) I0530 02:45:21.775698 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: tensorrt_llm_bls_0_0 (GPU device 6) I0530 02:45:21.775815 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: tensorrt_llm_bls_0_0 (GPU device 7) I0530 02:45:21.775828 381 python_be.cc:2404] TRITONBACKEND_ModelInstanceInitialize: tensorrt_llm_bls_0_0 (GPU device 5) [TensorRT-LLM][WARNING] gpu_device_ids is not specified, will be automatically set [TensorRT-LLM][WARNING] max_beam_width is not specified, will use default value of 1 [TensorRT-LLM][WARNING] max_tokens_in_paged_kv_cache is not specified, will use default value [TensorRT-LLM][WARNING] batch_scheduler_policy parameter was not found or is invalid (must be max_utilization or guaranteed_no_evict) [TensorRT-LLM][WARNING] enable_chunked_context is not specified, will be set to false. [TensorRT-LLM][WARNING] enable_trt_overlap is not specified, will be set to false [TensorRT-LLM][WARNING] normalize_log_probs is not specified, will be set to true [TensorRT-LLM][WARNING] exclude_input_in_output is not specified, will be set to false [TensorRT-LLM][WARNING] max_attention_window_size is not specified, will use default value (i.e. max_sequence_length) [TensorRT-LLM][WARNING] enable_kv_cache_reuse is not specified, will be set to false [TensorRT-LLM][WARNING] decoding_mode parameter is invalid or not specified(must be one of the {top_k, top_p, top_k_top_p, beam_search}).Using default: top_k_top_p if max_beam_width == 1, beam_search otherwise [TensorRT-LLM][WARNING] lora_cache_max_adapter_size not set, defaulting to 64 [TensorRT-LLM][WARNING] lora_cache_optimal_adapter_size not set, defaulting to 8 [TensorRT-LLM][WARNING] lora_cache_gpu_memory_fraction not set, defaulting to 0.05 [TensorRT-LLM][WARNING] lora_cache_host_memory_bytes not set, defaulting to 1GB [TensorRT-LLM][WARNING] medusa_choices parameter is not specified. Will be using default mc_sim_7b_63 choices instead [TensorRT-LLM][WARNING] max_beam_width is not specified, will use default value of 1 [TensorRT-LLM][WARNING] max_tokens_in_paged_kv_cache is not specified, will use default value [TensorRT-LLM][WARNING] batch_scheduler_policy parameter was not found or is invalid (must be max_utilization or guaranteed_no_evict) [TensorRT-LLM][WARNING] enable_chunked_context is not specified, will be set to false. [TensorRT-LLM][WARNING] enable_trt_overlap is not specified, will be set to false [TensorRT-LLM][WARNING] normalize_log_probs is not specified, will be set to true [TensorRT-LLM][WARNING] exclude_input_in_output is not specified, will be set to false [TensorRT-LLM][WARNING] max_attention_window_size is not specified, will use default value (i.e. max_sequence_length) [TensorRT-LLM][WARNING] enable_kv_cache_reuse is not specified, will be set to false [TensorRT-LLM][WARNING] decoding_mode parameter is invalid or not specified(must be one of the {top_k, top_p, top_k_top_p, beam_search}).Using default: top_k_top_p if max_beam_width == 1, beam_search otherwise [TensorRT-LLM][WARNING] lora_cache_max_adapter_size not set, defaulting to 64 [TensorRT-LLM][WARNING] lora_cache_optimal_adapter_size not set, defaulting to 8 [TensorRT-LLM][WARNING] lora_cache_gpu_memory_fraction not set, defaulting to 0.05 [TensorRT-LLM][INFO] Engine version 0.9.0 found in the config file, assuming engine(s) built by new builder API. [TensorRT-LLM][WARNING] lora_cache_host_memory_bytes not set, defaulting to 1GB [TensorRT-LLM][WARNING] medusa_choices parameter is not specified. Will be using default mc_sim_7b_63 choices instead [TensorRT-LLM][WARNING] [json.exception.type_error.302] type must be string, but is null [TensorRT-LLM][WARNING] Optional value for parameter quant_algo will not be set. [TensorRT-LLM][WARNING] [json.exception.type_error.302] type must be string, but is null [TensorRT-LLM][WARNING] Optional value for parameter kv_cache_quant_algo will not be set. [TensorRT-LLM][WARNING] [json.exception.out_of_range.403] key 'num_medusa_heads' not found [TensorRT-LLM][WARNING] Optional value for parameter num_medusa_heads will not be set. [TensorRT-LLM][WARNING] [json.exception.out_of_range.403] key 'max_draft_len' not found [TensorRT-LLM][WARNING] Optional value for parameter max_draft_len will not be set. [TensorRT-LLM][INFO] MPI size: 2, rank: 0 [TensorRT-LLM][INFO] Engine version 0.9.0 found in the config file, assuming engine(s) built by new builder API. [TensorRT-LLM][WARNING] [json.exception.type_error.302] type must be string, but is null [TensorRT-LLM][WARNING] Optional value for parameter quant_algo will not be set. [TensorRT-LLM][WARNING] [json.exception.type_error.302] type must be string, but is null [TensorRT-LLM][WARNING] Optional value for parameter kv_cache_quant_algo will not be set. [TensorRT-LLM][WARNING] [json.exception.out_of_range.403] key 'num_medusa_heads' not found [TensorRT-LLM][WARNING] Optional value for parameter num_medusa_heads will not be set. [TensorRT-LLM][WARNING] [json.exception.out_of_range.403] key 'max_draft_len' not found [TensorRT-LLM][WARNING] Optional value for parameter max_draft_len will not be set. [TensorRT-LLM][INFO] MPI size: 2, rank: 1 I0530 02:45:22.361625 381 model_lifecycle.cc:835] successfully loaded 'tensorrt_llm_bls' I0530 02:45:24.540693 381 model_lifecycle.cc:835] successfully loaded 'postprocessing' I0530 02:45:24.629419 381 model_lifecycle.cc:835] successfully loaded 'preprocessing' root@ccnl06:/opt/tritonserver# [TensorRT-LLM][INFO] Rank 0 is using GPU 0 [TensorRT-LLM][INFO] TRTGptModel maxNumSequences: 1 [TensorRT-LLM][INFO] TRTGptModel maxBatchSize: 1 [TensorRT-LLM][INFO] TRTGptModel mMaxAttentionWindowSize: 2048 [TensorRT-LLM][INFO] TRTGptModel enableTrtOverlap: 0 [TensorRT-LLM][INFO] TRTGptModel normalizeLogProbs: 1 [TensorRT-LLM][WARNING] Device 0 peer access Device 1 is not available. [TensorRT-LLM][WARNING] Device 0 peer access Device 2 is not available. [TensorRT-LLM][WARNING] Device 0 peer access Device 3 is not available. [TensorRT-LLM][WARNING] Device 0 peer access Device 4 is not available. [TensorRT-LLM][WARNING] Device 0 peer access Device 5 is not available. [TensorRT-LLM][WARNING] Device 0 peer access Device 6 is not available. [TensorRT-LLM][WARNING] Device 0 peer access Device 7 is not available. [TensorRT-LLM][INFO] Loaded engine size: 12682 MiB [TensorRT-LLM][INFO] Rank 1 is using GPU 1 [TensorRT-LLM][INFO] TRTGptModel maxNumSequences: 1 [TensorRT-LLM][INFO] TRTGptModel maxBatchSize: 1 [TensorRT-LLM][INFO] TRTGptModel mMaxAttentionWindowSize: 2048 [TensorRT-LLM][INFO] TRTGptModel enableTrtOverlap: 0 [TensorRT-LLM][INFO] TRTGptModel normalizeLogProbs: 1 [TensorRT-LLM][WARNING] Device 1 peer access Device 0 is not available. [TensorRT-LLM][WARNING] Device 1 peer access Device 2 is not available. [TensorRT-LLM][WARNING] Device 1 peer access Device 3 is not available. [TensorRT-LLM][WARNING] Device 1 peer access Device 4 is not available. [TensorRT-LLM][WARNING] Device 1 peer access Device 5 is not available. [TensorRT-LLM][WARNING] Device 1 peer access Device 6 is not available. [TensorRT-LLM][WARNING] Device 1 peer access Device 7 is not available. [TensorRT-LLM][INFO] Loaded engine size: 12682 MiB [TensorRT-LLM][INFO] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +8, now: CPU 12797, GPU 13350 (MiB) [TensorRT-LLM][INFO] [MemUsageChange] Init cuDNN: CPU +2, GPU +10, now: CPU 12799, GPU 13360 (MiB) [TensorRT-LLM][INFO] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +8, now: CPU 12801, GPU 13348 (MiB) [TensorRT-LLM][INFO] [MemUsageChange] Init cuDNN: CPU +2, GPU +10, now: CPU 12803, GPU 13358 (MiB) Failed, NCCL error /tmp/tritonbuild/tensorrtllm/tensorrt_llm/cpp/tensorrt_llm/plugins/common/plugin.cpp:86 'internal error - please report this issue to the NCCL developers' Failed, NCCL error /tmp/tritonbuild/tensorrtllm/tensorrt_llm/cpp/tensorrt_llm/plugins/common/plugin.cpp:86 'internal error - please report this issue to the NCCL developers'

Primary job terminated normally, but 1 process returned a non-zero exit code. Per user-direction, the job has been aborted.


mpirun detected that one or more processes exited with non-zero status, thus causing the job to be terminated. The first process to do so was:

Process name: [[55792,1],1] Exit code: 1

YunChen1227 avatar May 30 '24 02:05 YunChen1227

For the mismatch issue, please refer https://docs.nvidia.com/deeplearning/frameworks/support-matrix/index.html to see what docker uses which version of TensorRT-LLM.

For the issue about Failed, NCCL error /tmp/tritonbuild/tensorrtllm/tensorrt_llm/cpp/tensorrt_llm/plugins/common/plugin.cpp:86 'internal error - please report this issue to the NCCL developers', please try increase the shm-size like --shm-size 25g when you launch docker.

byshiue avatar May 30 '24 08:05 byshiue

I tried TensorRT-LLM v0.8.0 with Tritonserver 24.02 and 24.03. But the logs are all the same as this one. the --shm-size 40g does not work either

YunChen1227 avatar May 30 '24 09:05 YunChen1227

Hi the main branch of triton_tensorrtllm_backend and tensorrt_llm are updated simultaneously. Can be used directly~

hijkzzz avatar Jun 07 '24 10:06 hijkzzz

I tried TensorRT-LLM v0.8.0 with Tritonserver 24.02 and 24.03. But the logs are all the same as this one. the --shm-size 40g does not work either

i also got this error.. do you have QQ or other chat way?

najsword avatar Jun 24 '24 07:06 najsword

I tried TensorRT-LLM v0.8.0 with Tritonserver 24.02 and 24.03. But the logs are all the same as this one. the --shm-size 40g does not work either

i also got this error.. do you have QQ or other chat way?

To prevent confusing, could you create a new issue to discuss the issue you encounter? Also, please take a try on 24.05 docker image which uses trt-llm 0.9.0.

byshiue avatar Jun 26 '24 00:06 byshiue

I tried TensorRT-LLM v0.8.0 with Tritonserver 24.02 and 24.03. But the logs are all the same as this one. the --shm-size 40g does not work either

i also got this error.. do you have QQ or other chat way?

To prevent confusing, could you create a new issue to discuss the issue you encounter? Also, please take a try on 24.05 docker image which uses trt-llm 0.9.0.

Hello, I reviewed the NVIDIA NGC release page and noticed that the Triton Server's 24.05 Docker image is supposed to include trt-llm version 0.10.0. However, the version currently available is 0.9.0. This discrepancy between the release notes and the actual version of trt-llm has left me confused.

Triton server 24.05 release note: https://docs.nvidia.com/deeplearning/triton-inference-server/release-notes/rel-24-05.html

wangaoone avatar Aug 22 '24 10:08 wangaoone