【实战分享】TensorRT+LLM:大模型推理性能优化初探

TensorRT-LLM初体验

千呼万唤始出来,备受期待的Tensorrt-LLM终于发布,发布版本0.5.0。

【实战分享】TensorRT+LLM:大模型推理性能优化初探_第1张图片

github:

https://github.com/NVIDIA/TensorRT-LLM/tree/main

1.介绍

TensorRT-LLM可以视为TensorRT和FastTransformer的结合体,旨为大模型推理加速而生。

1.1丰富的优化特性

除了FastTransformer对Transformer做的attention优化、softmax优化、算子融合等方式之外,还引入了众多的大模型推理优化特性:

Multi-head Attention(MHA)
Multi-query Attention (MQA)
Group-query Attention(GQA)
In-flight Batching
Paged KV Cache for the Attention
Tensor Parallelism
Pipeline Parallelism
INT4/INT8 Weight-Only Quantization (W4A16 & W8A16)
SmoothQuant
GPTQ
AWQ
FP8
Greedy-search
Beam-search
RoPE

1.2 丰富的模型支持

对众多开源大模型都做了调用实例,其中包括:

Baichuan
Bert
Blip2
BLOOM
ChatGLM-6B
ChatG

你可能感兴趣的:(java)