[KongchangAI]
Other

KV Cache

Core Facts

Timeline (last 90 days)

Oct 20

TTFT (time to first token) is mainly determined by the prefill stage, with computation roughly proportional to context length; prefix caching can reuse already-computed KV states and only prefill the newly added portion.

Unverified50%
Oct 19

Model weights are only part of VRAM usage; during inference, space must also be reserved for activations, KV cache, context window, and so on.

Unverified50%
Oct 17

Running the same Q8_0 file twice, the second time with q8_0 K/V cache, gives KL 0.0038, a larger effect than quantizing weights from BF16 to Q8_0 (KL 0.0022).

Unverified50%
Oct 16

Because expert pruning preserves the attention architecture and KV cache format, the KV cache handoff requires no cache conversion, and the runtime only needs to switch weight masks between the two stages.

Unverified50%
Oct 14

For multi-turn conversations or long-document question answering, if the KV of the entire context is recomputed on every request, the compute overhead grows quadratically with context length.

Unverified50%
Oct 14

When generating each token, a Transformer model needs to compute the Key and Value vectors of all previous tokens, and these tensors are collectively called the KV cache.

Verified75%
Oct 14

The order in which prompts are organized directly affects the cache hit rate, and thus the actual bill.

Unverified50%
Oct 14

vLLM implements a bidirectional KV transfer mechanism in which decode nodes send computed KV blocks back to prefill nodes, eliminating repeated prefill computation of common prefixes in multi-turn conversations.

Unverified50%
Oct 14

Actual token generation speed usually reaches only 50%–70% of the theoretical value, affected by factors such as compute unit scheduling, KV cache reads and writes, and quantization-dequantization overhead.

Unverified50%
Oct 12

The prefill phase processes the complete input context, computes attention for all input tokens, and generates the KV cache; it is a compute-intensive operation whose time consumption is strongly correlated with input length.

Unverified50%

1 more timeline events

All Facts (11)

Verified

When generating each token, a Transformer model needs to compute the Key and Value vectors of all previous tokens, and these tensors are collectively called the KV cache.

75%
Unverified

TTFT (time to first token) is mainly determined by the prefill stage, with computation roughly proportional to context length; prefix caching can reuse already-computed KV states and only prefill the newly added portion.

50%
Unverified

Model weights are only part of VRAM usage; during inference, space must also be reserved for activations, KV cache, context window, and so on.

50%
Unverified

Running the same Q8_0 file twice, the second time with q8_0 K/V cache, gives KL 0.0038, a larger effect than quantizing weights from BF16 to Q8_0 (KL 0.0022).

50%
Unverified

Because expert pruning preserves the attention architecture and KV cache format, the KV cache handoff requires no cache conversion, and the runtime only needs to switch weight masks between the two stages.

50%
Unverified

For multi-turn conversations or long-document question answering, if the KV of the entire context is recomputed on every request, the compute overhead grows quadratically with context length.

50%
Unverified

The order in which prompts are organized directly affects the cache hit rate, and thus the actual bill.

50%
Unverified

Actual token generation speed usually reaches only 50%–70% of the theoretical value, affected by factors such as compute unit scheduling, KV cache reads and writes, and quantization-dequantization overhead.

50%
Unverified

The prefill phase processes the complete input context, computes attention for all input tokens, and generates the KV cache; it is a compute-intensive operation whose time consumption is strongly correlated with input length.

50%
Unverified

vLLM implements a bidirectional KV transfer mechanism in which decode nodes send computed KV blocks back to prefill nodes, eliminating repeated prefill computation of common prefixes in multi-turn conversations.

50%
Unverified

In an Agent session, multiple rounds of calls share the same context prefix, so in theory there are a large number of reusable KV cache blocks.

50%

Source Articles