Views
No views yet
trtllm-build to produce an engine for inference.| Item | Value |
|---|---|
| Base model | Meta-Llama-3.1-8B-Instruct |
| Framework | TensorRT-LLM (checkpoint format) |
| Weight/activation quantization | W8A8 SmoothQuant (W8A8_SQ_PER_CHANNEL_PER_TOKEN_PLUGIN) |
| KV cache | INT8 |
| Producer | TensorRT-LLM convert_checkpoint.py |
| Key conversion flags | --smoothquant 0.5 --per_token --per_channel --int8_kv_cache |
| Calibration size | 512 samples (--calib_size 512) |
| Architecture | LlamaForCausalLM (decoder-only) |
1python TensorRT-LLM/examples/models/core/llama/convert_checkpoint.py \
2 --model_dir /path/to/Meta-Llama-3.1-8B-Instruct \
3 --output_dir ./llama-3.1-8b-instruct-trtllm-ckpt-wq_w8a8sq-kv_int8 \
4 --dtype float16 \
5 --tp_size 1 \
6 --smoothquant 0.5 \
7 --per_token \
8 --per_channel \
9 --int8_kv_cache \
10 --calib_size 512use_fast=False) returns an invalid object for this model. During generation, tokenizer loading is forced to use_fast=True at runtime. This only affects tokenizer loading compatibility in the conversion process and does not change the target quantization configuration.--output_dir contains:config.json - TensorRT-LLM checkpoint configrank0.safetensors - rank-0 checkpoint weights (single-GPU)1cd ./llama-3.1-8b-instruct-trtllm-ckpt-wq_w8a8sq-kv_int8
2
3huggingface-cli repo create rungalileo/llama-3.1-8b-instruct-trtllm-ckpt-wq_w8a8sq-kv_int8 --repo-type model
4huggingface-cli upload rungalileo/llama-3.1-8b-instruct-trtllm-ckpt-wq_w8a8sq-kv_int8 . --repo-type model1git clone https://huggingface.co/rungalileo/llama-3.1-8b-instruct-trtllm-ckpt-wq_w8a8sq-kv_int8
2cd llama-3.1-8b-instruct-trtllm-ckpt-wq_w8a8sq-kv_int8
3
4trtllm-build --checkpoint_dir . --output_dir ./engine \
5 --max_batch_size 1 --max_input_len 512 --max_seq_len 10241trtllm-serve ./engine --tokenizer meta-llama/Meta-Llama-3.1-8B-Instruct --port 8000
2# OpenAI-compatible API: http://localhost:8000/v1/completions