How to Evaluate a 64GB Domestic Accelerator Card Before Buying It to Run 20B-Class Models

    Before purchasing a domestic large-memory accelerator card, most developers want to know two things: can the card hold a 20B-class model, and is it fast enough in practice? This article uses a 64GB domestic accelerator card as the reference target and breaks down four areas: VRAM capacity, memory bandwidth, the inference engine, and quantization formats. It provides estimation formulas and a benchmarking record template. All numbers fall into two categories: estimates derived from formulas, and blanks that readers must fill in with measurements from their own hardware. This article does not provide unmeasured performance data.

    Many developers, before purchasing a domestic accelerator card with large VRAM, want answers to two questions: can the card fit a 20B-class model, and will it run fast enough? This article takes a 64GB domestic accelerator card as the subject and walks through four areas—VRAM, bandwidth, inference engine, and quantization format—providing estimation formulas and a benchmarking record sheet. The numbers in this article fall into two categories: values estimated by formula, and blanks that readers must fill in by measuring on their own hardware. This article does not provide any unmeasured performance data.

    1. First, Calculate Whether the Model Fits in VRAM

    Model weight memory equals the parameter count multiplied by bytes per parameter. FP16 and BF16 use 2 bytes per parameter, INT8 uses 1 byte, and INT4 uses 0.5 bytes. The table below uses decimal GB:

    Model Size FP16/BF16 INT8 INT4
    20B dense model ~40GB ~20GB ~10GB
    27B dense model ~54GB ~27GB ~13.5GB
    26B-total MoE model (~4B active) ~52GB ~26GB ~13GB

    In practice, file format overhead and memory alignment increase the actual footprint slightly, so treat these numbers as lower bounds.

    KV Cache usage can be estimated with the following formula:

    KV Cache bytes = 2 × layers × KV heads × head dimension × context length × batch size × bytes per element

    The layer count, KV head count, and head dimension must be read from the model’s config file. Context length and batch size are set by the deployer. Models using Grouped Query Attention (GQA) have far fewer KV heads than attention heads, so their KV Cache is much smaller than a calculation based on attention heads would suggest.

    The following worked example assumes a model with 48 layers, 8 KV heads, head dimension 128, and FP16 KV Cache. With a context length of 4096 and batch size 1, the KV Cache is about 0.8GB. With batch size 8, it is about 6.4GB. These parameters are assumptions for the example; substitute your real configuration when deploying.

    Runtime overhead—including the driver context, activations, and intermediate buffers—depends heavily on the inference framework’s implementation. This article uses 2 to 4GB as a placeholder; final conclusions should be based on measured peak VRAM usage.

    Based on the assumptions above, we can draw the following conclusions:

    • The 20B model in INT8 takes about 23–25GB total, and the FP16 version about 43–45GB. Both fit within 64GB with substantial headroom that can be used for longer contexts.
    • The 27B model in FP16, at batch size 1 and 4K context, totals about 57–59GB, leaving very little headroom. At batch size 8, total usage may exceed 64GB.
    • The 27B model in INT8, at batch size 8 and 4K context, totals about 35–37GB, still with headroom.

    An MoE model’s VRAM footprint is dominated by all expert weights, which is close to a dense model with the same total parameter count. Its speed, however, depends on expert routing and memory access patterns.

    2. Bandwidth Sets the Speed Ceiling

    During autoregressive generation, every generated token requires reading the model weights once. The theoretical upper bound of single-request decoding speed can be estimated as:

    Theoretical tokens/s ≈ memory bandwidth ÷ bytes read per token

    This formula has explicit prerequisites: batch size is 1 with only one request running; all weights reside in VRAM; KV Cache reads and runtime overhead are ignored. Under these conditions, the bytes read per token for a dense model approximately equal the weight size in bytes.

    The following examples assume a nominal bandwidth of 2.0 TB/s. Substitute the rated value of your card.

    • 20B model, INT8 (~20GB): 2000 ÷ 20 = 100 tokens/s.
    • 27B model, INT8 (~27GB): 2000 ÷ 27 ≈ 74 tokens/s.

    These numbers are only ceilings. Actual speed depends on memory access efficiency—the ratio of measured effective bandwidth to nominal bandwidth. Efficiency is affected by kernel implementation, memory layout, and scheduling overhead, and it varies across quantization formats and batch sizes.

    The efficiency factor is calculated as: measured tokens/s ÷ theoretical ceiling. Suppose the 27B INT8 model is measured at 45 tokens/s; the efficiency factor is then about 0.61. This number is only an example. Once you have the efficiency factor, you can estimate the speed of other models under the same configuration using “theoretical ceiling × efficiency factor.” However, the efficiency factor should be calibrated per configuration and should not be applied directly across formats.

    For MoE models, a single token reads far fewer expert weights than the full weight set, so the theoretical single-request speed is higher. But as the batch grows, different requests activate different experts, the read footprint expands rapidly, and this advantage fades. At that point the formula above no longer applies; rely on measured throughput instead.

    3. Inference Engine: Match the Format to the Backend

    The software stack determines whether the hardware can actually be used. Quantization formats and inference engines must be chosen as a pair. The table below lists common paths:

    Inference Path Common Quantization Formats Device Requirements
    llama.cpp GGUF (e.g., Q8_0, Q4_K_M) Requires a working GPU compute backend, often needs to be compiled manually
    vLLM GPTQ, AWQ, etc., per the version’s support list Requires corresponding attention and matmul kernels
    Native frameworks such as Transformers Depends on the quantization library loaded Requires corresponding kernel libraries; performance is usually lower

    Whether a model format can be loaded by a given engine depends on the engine version and backend support. GGUF and GPTQ/AWQ usually follow different loading paths. Before deciding, check the support list of the target version and confirm with a smoke test.

    Beyond formats, three more things need to be verified:

    1. The versions of the driver, runtime libraries, and engine must be mutually compatible.
    2. Whether the engine has a native backend for the device. If not, it falls back to a generic implementation, and performance may drop significantly. The magnitude of the drop should be determined by measurement.
    3. Whether the quantization kernels map effectively to the hardware. Dequantization kernels may lack optimization on non-mainstream architectures, and a quantized version can end up slower than the FP16 version. Therefore, test both precisions.

    It is recommended to start with a smoke test using a 1B-class distilled model. This quickly verifies whether the combination of driver, runtime, and engine works, at low cost if it fails.

    4. Hands-On Workflow: From Environment Check to Benchmarking

    The following workflow uses a sample 64GB card deploying a 27B-class INT8 model as an example. For specific commands, refer to the documentation of your vendor and engine.

    Step 1: Environment check

    • Use the vendor’s device management tool to confirm the device is visible, and record total VRAM and the driver version.
    • Record the versions of the runtime libraries, Python, and the inference engine.
    • Check disk space. Quantization produces intermediate files, and the original FP16 weights also need to be retained.

    Step 2: Backup and quantization

    • Back up the original weights first, and record their SHA256 hashes for later verification.
    • Quantize to the target format. When using GPTQ or AWQ, choose a toolchain supported by the target engine. A commonly used group_size is 128.
    • The calibration dataset should be as close as possible to the actual task data. Before use, confirm the privacy and copyright status of the data; do not use data you are not authorized to use.
    • Compare output quality before and after quantization using a fixed set of evaluation questions. The scoring criteria should be written down in advance. Quantization affects both speed and answer quality; record both.

    Step 3: Launch the service

    Taking the GGUF path of llama.cpp as an example, the GPU layer parameter is -ngl (i.e., --n-gpu-layers). To place all layers in VRAM, set a value no smaller than the layer count:

    1. llama-server -m model-q8_0.gguf -ngl 99 -c 4096 -t 16

    The GPTQ or AWQ path of vLLM should use that engine’s own quantization parameters—do not copy llama.cpp parameters. After launch, continuously monitor VRAM usage and temperature. If VRAM approaches the limit, first reduce the context length or batch size, and record the configuration and peak usage at that point.

    Step 4: Benchmarking and recording

    Before benchmarking, define two metrics:

    • TTFT (Time to First Token): the time from sending the request to receiving the first token.
    • TPOT (Time Per Output Token): the average time to generate each subsequent token.