Repository navigation
Closed
Description
System Info
tensorrt 10.0.1
tensorrt-cu12 10.0.1
tensorrt-cu12-bindings 10.0.1
tensorrt-cu12-libs 10.0.1
tensorrt-llm 0.10.0.dev2024050700
A100 40G
Who can help?
Information
- The official example scripts
- My own modified scripts
Tasks
- An officially supported task in the
examplesfolder (such as GLUE/SQuAD, ...) - My own task or dataset (give details below)
Reproduction
set -ex
export MODEL_DIR=/mnt/memory
export MODEL_OUTPUT_DIR=$MODEL_DIR/tmp
export MODEL_NAME=Meta-Llama-3-70B-Instruct
export LD_LIBRARY_PATH=/usr/local/tensorrt/lib:$LD_LIBRARY_PATH
export PATH=/usr/local/tensorrt/bin:$PATH
export DTYPE=float16
export PYTHONPATH=/app/tensorrt-llm:$PYTHONPATH
export WEIGHT_BIT=4
export PARALLEL_SIZE=1
export QUANTIZE=w${WEIGHT_BIT}a16
export WEIGHT_PRESISION=int${WEIGHT_BIT}
export QUANTIZE_PARAM="--use_weight_only --weight_only_precision $WEIGHT_PRESISION"
python ../llama/convert_checkpoint.py \
--model_dir $MODEL_DIR/${MODEL_NAME} \
--output_dir $MODEL_OUTPUT_DIR/trt_models/${MODEL_NAME}/$QUANTIZE/${PARALLEL_SIZE}-gpu \
--dtype $DTYPE $QUANTIZE_PARAM \
--load_model_on_cpu
trtllm-build \
--checkpoint_dir $MODEL_OUTPUT_DIR/trt_models/${MODEL_NAME}/$QUANTIZE/${PARALLEL_SIZE}-gpu \
--output_dir $MODEL_OUTPUT_DIR/trt_engines/${MODEL_NAME}/$QUANTIZE/${PARALLEL_SIZE}-gpu \
--gemm_plugin $DTYPE \
--gpt_attention_plugin $DTYPE \
--max_batch_size 1 \
--max_input_len 2048 \
--max_output_len 1024
Expected behavior
build success
actual behavior
trtllm-build with error
[05/20/2024-14:41:10] [TRT] [W] Missing scale and zero-point for tensor LLaMAForCausalLM/transformer/layers/45/input_layernorm/CONSTANT_0_output_0, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
[05/20/2024-14:41:10] [TRT] [W] Missing scale and zero-point for tensor LLaMAForCausalLM/transformer/layers/45/input_layernorm/CONSTANT_1_output_0, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
[05/20/2024-14:41:10] [TRT] [W] Missing scale and zero-point for tensor LLaMAForCausalLM/transformer/layers/62/post_layernorm/CONSTANT_0_output_0, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
[05/20/2024-14:41:10] [TRT] [W] Missing scale and zero-point for tensor LLaMAForCausalLM/transformer/layers/60/post_layernorm/SHUFFLE_1_output_0, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
[05/20/2024-14:41:10] [TRT] [W] Missing scale and zero-point for tensor LLaMAForCausalLM/transformer/layers/45/post_layernorm/ELEMENTWISE_POW_0_output_0, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
[05/20/2024-14:41:10] [TRT] [W] Missing scale and zero-point for tensor LLaMAForCausalLM/transformer/layers/55/mlp/gate/CONSTANT_1_output_0, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
[05/20/2024-14:41:10] [TRT] [W] Missing scale and zero-point for tensor LLaMAForCausalLM/transformer/layers/69/input_layernorm/CONSTANT_0_output_0, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
[05/20/2024-14:41:10] [TRT] [W] Missing scale and zero-point for tensor LLaMAForCausalLM/transformer/layers/45/input_layernorm/SHUFFLE_0_output_0, expect fall back to non-int8 implementation for any layer consuming or producing given tensor
[05/20/2024-14:41:10] [TRT] [W] Detected layernorm nodes in FP16.
[05/20/2024-14:41:10] [TRT] [W] Running layernorm after self-attention in FP16 may cause overflow. Exporting the model to the latest available ONNX opset (later than opset 17) to use the INormalizationLayer, or forcing layernorm layers to run in FP32 precision can help with preserving accuracy.
[05/20/2024-14:41:10] [TRT] [W] [RemoveDeadLayers] Input Tensor position_ids is unused or used only at compile-time, but is not being removed.
[05/20/2024-14:41:10] [TRT] [I] Global timing cache in use. Profiling results in this builder pass will be stored.
[05/20/2024-14:41:22] [TRT] [I] [GraphReduction] The approximate region cut reduction algorithm is called.
[05/20/2024-14:41:22] [TRT] [I] Detected 14 inputs and 1 output network tensors.
terminate called after throwing an instance of 'tensorrt_llm::common::TllmException'
what(): [TensorRT-LLM][ERROR] TllmXqaJit runtime error in tllmXqaJitCreateAndCompileProgram(&program, &context): NVRTC Internal Error (/app/tensorrt-llm/cpp/tensorrt_llm/kernels/decoderMaskedMultiheadAttention/decoderXQAImplJIT/compileEngine.cpp:65)
1 0x7fe4b37bb384 /app/tensorrt-llm/tensorrt_llm/libs/libtensorrt_llm.so(+0x68f384) [0x7fe4b37bb384]
2 0x7fe4b38f9855 tensorrt_llm::kernels::jit::CompileEngine::compile() const + 165
3 0x7fe4b38faaf8 tensorrt_llm::kernels::DecoderXQAImplJIT::prepare(tensorrt_llm::kernels::XQAParams const&) + 296
4 0x7fe47c5fc508 /app/tensorrt-llm/tensorrt_llm/libs/libnvinfer_plugin_tensorrt_llm.so(+0x9b508) [0x7fe47c5fc508]
5 0x7fe47c61855a /app/tensorrt-llm/tensorrt_llm/libs/libnvinfer_plugin_tensorrt_llm.so(+0xb755a) [0x7fe47c61855a]
6 0x7fe57c888f38 /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xd87f38) [0x7fe57c888f38]
7 0x7fe57c88985c /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xd8885c) [0x7fe57c88985c]
8 0x7fe57c902caf /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xe01caf) [0x7fe57c902caf]
9 0x7fe57c8db4e0 /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xdda4e0) [0x7fe57c8db4e0]
10 0x7fe57c8e207c /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xde107c) [0x7fe57c8e207c]
11 0x7fe57c8e4071 /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xde3071) [0x7fe57c8e4071]
12 0x7fe57c52961c /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xa2861c) [0x7fe57c52961c]
13 0x7fe57c52e837 /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xa2d837) [0x7fe57c52e837]
14 0x7fe57c52f1af /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xa2e1af) [0x7fe57c52f1af]
15 0x7fe5293e2478 /app/venv_dev/lib/python3.10/site-packages/tensorrt_bindings/tensorrt.so(+0xa6478) [0x7fe5293e2478]
16 0x7fe5293817a3 /app/venv_dev/lib/python3.10/site-packages/tensorrt_bindings/tensorrt.so(+0x457a3) [0x7fe5293817a3]
17 0x53bd79 /app/venv_dev/bin/python3() [0x53bd79]
18 0x629d24 _PyObject_MakeTpCall + 356
19 0x549c2e /app/venv_dev/bin/python3() [0x549c2e]
20 0x5ae603 _PyEval_EvalFrameDefault + 19699
21 0x628d60 _PyFunction_Vectorcall + 592
22 0x628a3a PyObject_Call + 426
23 0x5ac51b _PyEval_EvalFrameDefault + 11275
24 0x628d60 _PyFunction_Vectorcall + 592
25 0x5aa025 _PyEval_EvalFrameDefault + 1813
26 0x628d60 _PyFunction_Vectorcall + 592
27 0x5a9c1b _PyEval_EvalFrameDefault + 779
28 0x628d60 _PyFunction_Vectorcall + 592
29 0x62893c PyObject_Call + 172
30 0x5ac51b _PyEval_EvalFrameDefault + 11275
31 0x628d60 _PyFunction_Vectorcall + 592
32 0x62893c PyObject_Call + 172
33 0x5ac51b _PyEval_EvalFrameDefault + 11275
34 0x628d60 _PyFunction_Vectorcall + 592
35 0x62893c PyObject_Call + 172
36 0x5ac51b _PyEval_EvalFrameDefault + 11275
37 0x628d60 _PyFunction_Vectorcall + 592
38 0x5a9c1b _PyEval_EvalFrameDefault + 779
39 0x5a8bf1 /app/venv_dev/bin/python3() [0x5a8bf1]
40 0x6d77cf PyEval_EvalCode + 127
41 0x6bb91b /app/venv_dev/bin/python3() [0x6bb91b]
42 0x6bb9a4 /app/venv_dev/bin/python3() [0x6bb9a4]
43 0x6bbde6 /app/venv_dev/bin/python3() [0x6bbde6]
44 0x6c0c84 _PyRun_SimpleFileObject + 404
45 0x6c0d57 _PyRun_AnyFileObject + 71
46 0x7042dd Py_RunMain + 877
47 0x7044bd Py_BytesMain + 45
48 0x7fe6e0245083 __libc_start_main + 243
49 0x62ff4e _start + 46
[tensorrt-llm-build-95p6x:320425] *** Process received signal ***
[tensorrt-llm-build-95p6x:320425] Signal: Aborted (6)
[tensorrt-llm-build-95p6x:320425] Signal code: (-6)
[tensorrt-llm-build-95p6x:320425] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x43090)[0x7fe6e0264090]
[tensorrt-llm-build-95p6x:320425] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7fe6e026400b]
[tensorrt-llm-build-95p6x:320425] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7fe6e0243859]
[tensorrt-llm-build-95p6x:320425] [ 3] /lib/x86_64-linux-gnu/libstdc++.so.6(+0x9e8d1)[0x7fe63e03d8d1]
[tensorrt-llm-build-95p6x:320425] [ 4] /lib/x86_64-linux-gnu/libstdc++.so.6(+0xaa37c)[0x7fe63e04937c]
[tensorrt-llm-build-95p6x:320425] [ 5] /lib/x86_64-linux-gnu/libstdc++.so.6(+0xa9359)[0x7fe63e048359]
[tensorrt-llm-build-95p6x:320425] [ 6] /lib/x86_64-linux-gnu/libstdc++.so.6(__gxx_personality_v0+0x2a1)[0x7fe63e048d11]
[tensorrt-llm-build-95p6x:320425] [ 7] /lib/x86_64-linux-gnu/libgcc_s.so.1(+0x10bff)[0x7fe6dfe0fbff]
[tensorrt-llm-build-95p6x:320425] [ 8] /lib/x86_64-linux-gnu/libgcc_s.so.1(_Unwind_Resume+0x12a)[0x7fe6dfe105ba]
[tensorrt-llm-build-95p6x:320425] [ 9] /app/tensorrt-llm/tensorrt_llm/libs/libtensorrt_llm.so(+0x68f3d2)[0x7fe4b37bb3d2]
[tensorrt-llm-build-95p6x:320425] [10] /app/tensorrt-llm/tensorrt_llm/libs/libtensorrt_llm.so(_ZNK12tensorrt_llm7kernels3jit13CompileEngine7compileEv+0xa5)[0x7fe4b38f9855]
[tensorrt-llm-build-95p6x:320425] [11] /app/tensorrt-llm/tensorrt_llm/libs/libtensorrt_llm.so(_ZN12tensorrt_llm7kernels17DecoderXQAImplJIT7prepareERKNS0_9XQAParamsE+0x128)[0x7fe4b38faaf8]
[tensorrt-llm-build-95p6x:320425] [12] /app/tensorrt-llm/tensorrt_llm/libs/libnvinfer_plugin_tensorrt_llm.so(+0x9b508)[0x7fe47c5fc508]
[tensorrt-llm-build-95p6x:320425] [13] /app/tensorrt-llm/tensorrt_llm/libs/libnvinfer_plugin_tensorrt_llm.so(+0xb755a)[0x7fe47c61855a]
[tensorrt-llm-build-95p6x:320425] [14] /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xd87f38)[0x7fe57c888f38]
[tensorrt-llm-build-95p6x:320425] [15] /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xd8885c)[0x7fe57c88985c]
[tensorrt-llm-build-95p6x:320425] [16] /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xe01caf)[0x7fe57c902caf]
[tensorrt-llm-build-95p6x:320425] [17] /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xdda4e0)[0x7fe57c8db4e0]
[tensorrt-llm-build-95p6x:320425] [18] /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xde107c)[0x7fe57c8e207c]
[tensorrt-llm-build-95p6x:320425] [19] /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xde3071)[0x7fe57c8e4071]
[tensorrt-llm-build-95p6x:320425] [20] /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xa2861c)[0x7fe57c52961c]
[tensorrt-llm-build-95p6x:320425] [21] /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xa2d837)[0x7fe57c52e837]
[tensorrt-llm-build-95p6x:320425] [22] /app/venv_dev/lib/python3.10/site-packages/tensorrt_libs/libnvinfer.so.10(+0xa2e1af)[0x7fe57c52f1af]
[tensorrt-llm-build-95p6x:320425] [23] /app/venv_dev/lib/python3.10/site-packages/tensorrt_bindings/tensorrt.so(+0xa6478)[0x7fe5293e2478]
[tensorrt-llm-build-95p6x:320425] [24] /app/venv_dev/lib/python3.10/site-packages/tensorrt_bindings/tensorrt.so(+0x457a3)[0x7fe5293817a3]
[tensorrt-llm-build-95p6x:320425] [25] /app/venv_dev/bin/python3[0x53bd79]
[tensorrt-llm-build-95p6x:320425] [26] /app/venv_dev/bin/python3(_PyObject_MakeTpCall+0x164)[0x629d24]
[tensorrt-llm-build-95p6x:320425] [27] /app/venv_dev/bin/python3[0x549c2e]
[tensorrt-llm-build-95p6x:320425] [28] /app/venv_dev/bin/python3(_PyEval_EvalFrameDefault+0x4cf3)[0x5ae603]
[tensorrt-llm-build-95p6x:320425] [29] /app/venv_dev/bin/python3(_PyFunction_Vectorcall+0x250)[0x628d60]
[tensorrt-llm-build-95p6x:320425] *** End of error message ***
Aborted (core dumped)
additional notes
Meta-Llama-3-70B-Instruct w4a16 supported right now?
Activity
[-]Fail to build Mixtral 8x22b with w4a16[/-][+]Fail to build Llama-3-70B-Instruct with w4a16[/+]ming-wei commentedon May 21, 2024
Thanks for reporting the issue.
This issue has been fixed and the fix will be included in the future update.
ming-wei commentedon May 21, 2024
Actually, the issue should have been fixed already in the update last week (0514).
@gloritygithub11 could you try with tensorrt-llm 0.10.0.dev2024051400 and let us know whether the issue is still reproducible?
Thanks!
gloritygithub11 commentedon May 21, 2024
@ming-wei Thanks. I will try it
gloritygithub11 commentedon May 22, 2024
@ming-wei I have synced to commit "[Fix mistral v0.1 build instructions (#1373)]", now it failed in convert with error:
ming-wei commentedon May 22, 2024
@byshiue This seems a different error not related to XQA. Could you help triage and reroute the issue?
Thanks.
WDONG66 commentedon May 23, 2024
I also Met this before in #1628
byshiue commentedon May 23, 2024
I don't have 70B model now. But I try 8B model and it works well under int4 wo
Could you take a try?
gloritygithub11 commentedon May 23, 2024
@byshiue I had tried 8B and get the same error before. Noticed that you are using new version 0.11.0.dev2024052100. I will try this version.
gloritygithub11 commentedon May 24, 2024
@byshiue
I sync code to Update TensorRT-LLM (https://github.com/NVIDIA/TensorRT-LLM/pull/1639[)](https://github.com/NVIDIA/TensorRT-LLM/commit/5d8ca2faf74c494f220c8f71130340b513eea9a9)
still get the same error. It is trying to check the loaded model contains quantized param like transformer.layers.0.attention.qkv.per_channel_scale
gloritygithub11 commentedon May 24, 2024
I also tried in a clean docker envi, the same error.
byshiue commentedon May 27, 2024
This issue would be fixed in next main branch update. Please give a try at the time.
byshiue commentedon May 29, 2024
This issue is fixed in latest main branch (commit id: f430a4b). Could you take a try?
gloritygithub11 commentedon May 30, 2024
works now. Thank you very mush
ashwin-js commentedon Jul 15, 2024
I am getting this error now when I am trying to convert a fine tuned llama3 8b gptq safetensor. Does the patch f430a4b addresses gptq ?
byshiue commentedon Jul 17, 2024
Could you file a new issue to share the error you encounter and the reproduced steps?