Experimental FP8 KV Cache #25
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Chose to use 656 byte layout similar to VLLM, rather than a more ggml friendly layout, in the hope of better performance with modified tilelang and VLLM kernels.
This is a beautiful implementation of an FP8 MLA latent KV Cache. Unfortunately, that wasn't what I intended to build at all. What I intended to build was a llama.cpp clone of VLLM's DeepseekV32IndexerCache.
I'm still just seeing 5.6 to 5.8 tok/s because the main kernels are not actually consuming the new FP8 K cache yet.
Here it is with
LLAMA_SPARSE_PROF=1 LLAMA_DEEPSEEK32_FP8_K=1getting 5.6 tok/s:And here is is with
LLAMA_SPARSE_PROF=1 LLAMA_SPARSE_TOPK_TL=1 LLAMA_DEEPSEEK32_FP8_K=1getting 5.8 tok/s:And finally, because the tilelang indexer is a toy, way less than 1 tok/s with
LLAMA_SPARSE_PROF=1 LLAMA_INDEXER_TL_PORT=1 LLAMA_SPARSE_TOPK_TL=1 LLAMA_DEEPSEEK32_FP8_K=1: