中文

GPU Logo Cluster Optimizing Fields: Costing of Large Model Logic

2026-05-25 Huanan Tengfei Technology
GPU Logo Cluster Optimizing Fields: Costing of Large Model Logic

GPU Logical Cluster Optimizing Practice: Detailed TensorRT-LLM and vLLM Frame contrast, INT8/INT4 Quantified Realism, PagedAttention and cache Strategies, combined with Shenzhen Financial company Real Case, reduced the reasoning cost of 62.5%. Huanan Tengfei Technology provides AI algorithm Solutions.

Cost of large model reasoning

2025 later in the year, a AI family in Shenzhen Nanshan started company to find us. They've studied themselves. one 70B specifications Large language model , I'm on my way. 8 Chang. A100 80G Let's go. , Daily Call Amount 5 ten thousand Times , Monthly GPU Cloud resource costs 12 ten thousand 。 The boss said, "We'll lose money if we double the call. "

That's a classic question. Large models are privatized, training is a one-off input, with the reasoning that the money is burned on a continuous basis. The larger the model, the more it is called, the higher the cost of reasoning. How? Today we'll talk about two tools: TensorRT-LLM and vLLM, as well as quantitative, parallel, cache and these operational tools.

Through a rationally optimized combination, the reasoning costs of the 70B model can be reduced by 60-70% and will hardly affect output quality.

Logical frame selection: TensorRT-LLM vs vLLM

Currently, large models are being deployed for the privatization of enterprises, and the reasoning framework is based on two main options:

TensorRT-LLM: NVIDIA official product, Depth Optimizing GPU reasoning. Key benefits is the extreme-causal performance - throughput can be highest by means of layer integration, kernel automatic modulation, FP8/INT8 quantification, etc. The disadvantage is that the configuration is complex, requiring the compilation engine (Engine), which is recompiled for different models and different precisions.

vLLM: Open source Item, cores Innovation PagedAttention - Manage KV Cache page breaks to solve graphics memory fragmentation. The advantage is that it is easy to use, that the Supported model is multiple, and that it is built-in service API. throughput That's right. TensorRT-LLM Low 10-20%, But the configuration is much simpler. 。

Comparative table:

ContrastTensorRT-LLMvLLM
throughputHighestHigh (low 10-20%)
First Token DelayLowLow
Configure ComplexityHigh (to compile Engine)Low (pip install sufficient)
Model SupportedMainstream model all overHuggingFace model basics Supported
Quantified SupportedFP8/INT8/INT4INT8/INT4/AWQ
Multi-node reasoningSupported ParallelSupported block/pipe parallel
Production maturityHigh (NVIDIA official maintenance)Medium and high (community active)
ApplicationsExtreme performance requirementsRapid deployment, multi-model switching

Our proposal : The pursuit of extreme performance. TensorRT-LLM, Pursuing deployment efficiency options vLLM。 The two can be used in combination - cores business TensorRT-LLM and experimental model vLLM.

Quantification: cost-effective first-largest killer

Quantification (Quantization) is the technique for compressing the model weight from FP16/BF16 (16-bit float) to INT8 (8-bit integer) and even INT4 (4-bit integer). The benefits are obvious. : graphics memory I'll take half of it and even... quarter, Arguments speed Raise 2-4 Double 。

However, quantification is not cost-free — precision is lost. The key question is: What are the losses? Can you accept that?

According to our data:

ModelPrecisiongraphics memorythroughputMMLU accuracy rateDelayed change
Llama-3-70BFP16140GBBenchmark79.2%Benchmark
Llama-3-70BINT874GB1.8x78.8% (-0.4%)-45%
Llama-3-70BINT4 (AWQ)40GB2.5x77.5% (-1.7%)-55%
Qwen2.5-72BFP16144GBBenchmark82.3%Benchmark
Qwen2.5-72BINT876GB1.7x81.9% (-0.4%)-42%
Qwen2.5-72BINT4 (GPTQ)42GB2.3x80.6% (-1.7%)-52%

Key findings:

INT8 Quantification is dessert。 Precision loss is less than 0.5%, graphics memory halved, speed increase 80%. Most of the business scenes, INT8 is the best option.

INT4 Quantification requires caution。 Precision loss 1-2% does not have a significant impact on the generic question and answer, but may cause problems with the high precision required by code generation, mathematical reasoning, etc. It is suggested that a business evaluation be made before deciding whether to go on INT4.

AWQ and GPTQ are the mainstream INT4 scheme。 AWQ (Activation-Aware Weight Quantization) is quantified by the importance of the active value, and GPTQ (Generative Pre-trained Transformer Quantization) is quantified by layer. AWQ is measured slightly more accurately than GPTQ, but GPTQ Quantification speed is faster.

TensorRT-LLM field operation: from 0 to 1 compiler engine

For example, Llama-3-70B compiles the complete process of the INT8 Quantification Engine using TensorRT-LLM:

Step one. : Environmental preparedness

Require NVIDIA GPU (all A100/H100/L40S), CUDA 12.1+, TensorRT-LLM 0.10+. NVIDIA is recommended for the official Docker mirror to save time for the environment configuration.

Step two. : Download Model

Downloads the Llama-3-70B weight file from HuggingFace. Note the need for Meta authorization and apply for access rights first.

Step three. : Build Engine

Use build script for TensorRT-LLM to specify model paths, quantitative types, parallel policies. 70B model card cannot be dropped and requires a parallel (Tensor Parallelism), 8 card A100, tp_size=8.

The compilation process takes approximately 30-60 minutes, depending on the size of GPU Model and the model. Once compiled, a Engine document is generated, and the subsequent reasoning directly loads the document without any further compilation.

Step four. : Deployment service

TensorRT-LLM provides an integration of Triton Inference Server and can also be tested directly with its own run.py script. Triton, Supported is recommended for the production environment and requests, dynamic batch processing, model version management.

Actual data: 8 card A100 80G, Llama-3-70B INT8 Quantification, batch_size=64, throughput about 1800 tokens/s (output), First Token latency about 80ms.

vLLM field: 5 minutes to deploy a reasoning service

The advantage of vLLM is simple. A few lines of code can run up:

Installpip install vllm, finish.

Start service:vllm serve meta-llama/Llama-3-70b --tensor-parallel-size 8 --quantization fp8

That's it. --tensor-parallel-size 8 indicates that 8 GPU is used as a parallel, -- quantization fp8 indicates FP8 precision. vLLM autoprocessing model download, weight load, parallel policy.

automatic provides a OpenAI compatible API endpoint, and your application code does not need to be changed, just point API address directly to vLLM service.

Actual data: 8 card A100 80G, Llama-3-70B FP8 Quantification, max_num_seqs=256, throughput about 1500 tokens/s (output), First Token latency about 90ms. 15% is about TensorRT-LLM, but the deployment time has been reduced from 1 hours to 5 minutes.

PagedAttention: cores Blacktech for vLLM

vLLM. Why is it efficient? cores is PagedAttention technology.

When the large model reasoning is done, each request requires the maintenance of one KV Cache (key value cache), all Token attention calculations before storage. In the traditional way, KV Cache is a continuous distribution of graphics memory, but as requests enter and exit, graphics memory produces a large amount of debris.

According to data from vLLM papers, the graphics memory debris rate under traditional methods is as high as 60-80%. That is, your GPU for 80G, the KV Cache that is actually available may be only 20-30G.

PagedAttention manages the KV Cache page break, a virtual memory similar to Operating system. No continuous graphics memory is required, and the debris rate is below 5%. The same GPU that increases 2-3 times the number of requests (symmetry) that can be processed simultaneously.

What does that mean for a business? The same hardware that allows service More users. Or, conversely, service has the same number of users that need less GPU.

Parallel strategy: What about the lack of single cards?

The 70B model card cannot be dropped and must be used in parallel. There are three parallel strategies for mainstreaming:

Block Parallel (Tensor Parallelism, TP): Splits each layer of the model (the matrix multiplication) to multiple GPU. maximum traffic, with the lowest delay. Fits to a doca in the same server (connected through NVLink).

Pipes Parallel (Pipeline Parallelism, PP): Allocation of different layers of the model to different GPU. The traffic is small, but there will be bubbles (bubble) - some GPU is waiting for other GPU to complete the calculations. Fits to cross the server doc.

Data Parallel (Data Parallelism, DP): Each GPU has a complete model that handles different requests. The simplest, but graphics memory remains the same. Suits 7B-13B for this little model.

The actual deployment of the 70B model, recommended TP=8 (the same 8 card server), does not require PP. If a server has only 4 cards, then TP=4, but throughput will be halved.

If deployed in multiple nodes, you can use TP+PP as a combination. 16 cards, TP=4 + PP=4, for example, cut the model into 4 stages, each of which is a parallel 4 card.

Cache policy: Do not double-count

In the business scene, many requests for prefix (prefix) are the same. For example, the results of the system alert, the few-shot example, and the RAG search result. It's a waste of time to recalculate Attention each time.

Two Cache Optimization Means:

Prefix CacheCache KV Cache with the same prefix. Next time you meet the same prefix, you re-use it, and you skip the calculation. vLLM-enabled Supported, TensorRT-LLM needs to be self-implemented.

Response Cache: For repeat questions, the immediate cache is complete. For example, FAQ, common problems with the customer service. Use vector database storage Question - Correct answer, return directly by hit, without model reasoning.

One of our clients (smart guest scene) added Prefix Cache + Response Cache, the actual number of requests for model reasoning decreased by 40%, and GPU costs decreased directly by 40%.

Hardware Selection Recommendations

In the reasoning scenario, the GPU selection depends on several dimensions:

A100 80G: The reasoned dessert card. 80GB graphics memory can run INT8 Quantities, FP16 bandwidth 691GB/s for the 70B model. Second-hand market prices are about 5-8 million/s, with a good value.

L40S:Ada Structure , The reasoning is close. A100, It's cheaper. ( Approx. 3-4 ten thousand / Chang. )。 However, graphics memory only has 48GB and the running 70B model must be quantified by INT4. Suits the reasoning of the 13B-34B model.

H100: performance best, FP8 reasoning speed is 2-3 times more than A100. However, the price is too high (20 million+/s) and SMEs need not be required.

National Production Alternative: Rotation 910B: Huawei 910B has a reasoned performance close to A100, graphics memory 64GB. Software ecology (MindSpore) is not as mature as NVIDIA, but is preferred in the Creativity scene.

For the reasoning of the 70B model, our recommended configuration is: 8 card A100 80G (NVLink interconnection), INT8 Quantification, TensorRT-LLM or vLLM reasoning. The monthly cost is approximately 2-3 million (including electricity) and can support daily average 10-20 million calls.

Practical case: Optimization of the reasoning of company in Shenzhen, a financial technology

This one. company Use it. Qwen2.5-72B Summary of financial questions and answers and research , Used before vLLM + FP16 I'm on my way. 8 Chang. A100 Let's go. , Monthly GPU Cost estimate 3 ten thousand , Daily Call 3 ten thousand Times 。

We helped them to do the following:

1. FP16 INT8 Quantification: Precision loss 0.3%, throughput up 75%, graphics memory occupancy down from 144GB to 76GB.

2. Turn PagedAttention on.: concurrent request raised from 128 to 256, and GPU utilization rate raised from 45% to 72%.

3. Add Prefix Cache: The system tip (approximately 500 tokens) cache is reused and the actual reasoning is reduced by 35%.

4. Dynamic Batch:vLLM It's... max_num_seqs From 128 Reassigned 256, Quite a small request to merge , throughput Raise 20%。

Optimized effects:

  • •throughput from 800 tokens/s to 1600 tokens/s
  • •Average daily call amount from 3 Raise the Thousand to 8 Man. ( More than double )
  • •GPU cost unchanged (or 8 A100)
  • •Single Call Cost From 1.0 CNY Down to 0.375 CNY( Down 62.5%)
  • •P99 latency from 350ms to 180ms

The CTO evaluation was: "Same hardware, multiple service to a 2.5-fold user, and cost has also been reduced. I knew it was so good that six months ago. "

Monitor and Modified

Once service is online, continuous surveillance is important:

Key indicators: throughput (tokens/s), Token latency (TTFT), Generate latency (per Token), GPU utilization, graphics memory usage, Queue Length.

Warning threshold: GPU utilization rate consistently below 30% (Description too good to subtract cards), queue Length exceeding 100 (Description mismatch, requiring carding or optimization), P99 latency exceeding 500ms (lower user experience).

Tool Recommendations: Prometheus + Grafana Monitor GPU Indicators, vLLM Export Prometheus format data from its / metrics endpoint. TensorRT-LLM can be exported through the metrics endpoint of Triton.

Selective Recommendations

A few suggestions for enterprises that are planning large model reasoning:

1. I'll do my business first.。 After the model has been selected, your actual business data are used to assess and determine the acceptable range of precision losses. Select the quantitative level according to the precision requirements.

2. INT8 Quantification is preferred。 Precision losses are minimal and performance increases are significant. Do not go on INT4 unless graphics memory is extremely nervous.

3. vLLM for quick uplink。 It's a simple, model Supported and community-active deployment. Run, then think of using TensorRT-LLM to optimize.

4. Cache optimized benefits are huge.。 Prefix Cache and Response Cache have been very effective in the business scene, especially in the case of repetitive scenes such as passenger uniforms, questions and answers.

5. Don't be blind to big models.。 The 7B-13B model may perform better than the 70B generic model for a given task. Using a small model of task fine-tuning, the reasoning cost is only one tenth of the larger model.

FAQ

Q: Is the quality of the INT8 quantified model really okay?

A: We've measured it. Llama-3-70B、Qwen2.5-72B、Baichuan2-53B Waiting for multiple models ,INT8 Quantitative MMLU The accuracy rate is all lost. 0.5% Within 。 The day-to-day Questions and Answers, summary generation, code-aided scenes, etc., are almost invisible to users. However, high-precision scenarios such as mathematical reasoning and code generation are recommended for business evaluation.

Q: Can vLLM and TensorRT-LLM work together?

A: Yes. cores Operations TensorRT-LLM pursues polarisation, experimental model and quick validation vLLM. Both provide OpenAI compatible API and no code change is required at the application level.

Q: How many GPU minimum models do 70B require?

A: INT4 quantified, 4 A100 80G can run (each 10GB weight). However, the amount of vomiting and co-optation will be limited. Recommended 8 sheet, most balanced performance and cost.

Q: Can GPU do big model reasoning?

A: Huawei swings 910B, but the software is not as mature as NVIDIA. Appropriate MindSpore frames are required, and some models need to convert their weights. The letter creation scenario is the mandatory option, and the non-creature scenario suggests using NVIDIA first.

Q: Can the cost of reasoning be reduced again?

A: Yes. In addition to quantification and cache, there are several directions: a small model for routed (the simple question is answered by 7B model, the complex question is 70B), speculative decoding (the accelerated generation of the draft model), distillation (the distillation of 70B knowledge into 13B model). These combinations are used to reduce the reasoning cost by 30-50%.

Summary

Large-model reasoning is not genus, but methodological. Quantified returns maximum (INT8 cost reduction 60%), cache benefits are most easily ignored (a further down 30-40% in the business scene), and framework selections affect deployment efficiency (vLLM fast, TensorRT-LLM strong).

cores is just one line of thinking: don't waste every count. cache is not recalculated, quantitatively non-floating, and merged non-separated.

Businesses with a need to deploy a large privatization model are welcome to talk to Contact us. Show you the model selection, the hardware configuration, the optimisation, and don't go down the curve.

Contact us :13510444731(7×24 hours )

Why choose Huanan Tengfei

A+ Authentic products Original manufacturer products with authenticity verification + Configuration options Technical solutions tailored to your requirements - Volume pricing Volume pricing for enterprise orders = Technical services Support from manufacturer-certified engineers ? After-sales support 7×24-hour technical support

Need a technical solution?

Huanan Tengfei Technology Provide integrated IT Infrastructure and Cybersecurity service

Contact us

♪ Relevant recommendations

Relevant programme recommendations

For information about the More Enterprise IT program, call the help line:13510444731

♪ Huanan Tengfei Technology — IT Infrastructure expert around you

Shenzhen server room Construction Cybersecurity Weak Power Engineering Z Data Governance hyperconverged infrastructure Cloud Desktops Emergency Command

20 Year enterprise IT service Experience · Lenovo / Huawei / Sangfor platinum partner · service Super. 500 Businesses