[WIP] DeepSeek V4 #24162
Draft
am17an wants to merge 13 commits into
Draft
Conversation
Collaborator
|
@am17an I wonder what's the purpose of f32 casts and conts after mulmats here? Removed them and got the same logits. |
Contributor
Author
|
@fairydreaming it's an artifact of debugging, you can push your changes to this branch (I added you as collaborator) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
Still a WIP, lots of work to do before this is usable. At the current stage it passes long context/tool calling tests but is quite slow. All the complexity is in the new
llama-kv-cache-dsv4+deepseekv4model class + no new ggml ops at the moment.To run you the flash version at least 100 GB VRAM (using the q2_k quantized GGUF here), for the full flash version 160+ GB. Here's how I was running the server on a DGX spark
llama-server -m dsv4-q2_k.gguf -fa 0 -c 32768 --jinja --chat-template-file models/templates/deepseek-ai-DeepSeek-V4.jinja --fit offNote that it is extremely slow at the moment (~4-5 toks/sec)
Thanks to @pwilkin for the correct chat template + debugging help
Thanks to @fairydreaming for his help in debugging + contributing fixes
Additional information
Requirements