ktransformers: [Bug] deepseek v3/r1 with full context with balance_serve backend
Checklist
- 1. I have searched related issues but cannot get the expected help.
- 2. The bug has not been fixed in the latest version.
- 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
- 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/kvcache-ai/ktransformers/discussions. Otherwise, it will be closed.
- 5. To help the community, I will use Chinese/English or attach an Chinese/English translation if using another language. Non-Chinese/English content without translation may be closed.
Describe the bug
I am not sure how to run the balance_serve backend with a full 128k context. If I will try something like that:
ktransformers \
--gguf_path /opt/unsloth/DeepSeek-R1-0528-GGUF/UD-Q2_K_XL/DeepSeek-R1-0528-UD-Q2_K_XL-00001-of-00006.gguf \
--model_path /opt/unsloth/DeepSeek-R1-0528-GGUF/ \
--model_name unsloth/DeepSeek-R1-0528-Q2-GGUF \
--cpu_infer $(grep ^cpu\\scores /proc/cpuinfo | uniq | awk '{print $4}' | xargs -I{} echo "{}-0" | bc) \
--optimize_config_path /opt/unsloth/DeepSeek-R1-0528-GGUF/UD-Q2_K_XL/DeepSeek-V3-Chat-serve.yaml \
--backend_type balance_serve \
--cache_8bit True \
--cache_lens $((128*1024)) \
--length $((128*1024)) \
--max_new_tokens $((128*1024)) \
--chunk_size 256 \
--max_batch_size 1 \
--temperature 0.6 \
--top_p 0.95 \
--host 0.0.0.0 \
--port 8080 \
--fast_safetensors True \
--log_level DEBUG \
--use_cuda_graph
I will have the error regarding the cuda_graphs.
Rebuilding kvcache
kv_cache loaded successfully.
capturing cuda graph 1 1
2025-07-03 13:06:22,408 - INFO - flashinfer.jit: Loading JIT ops: batch_mla_attention_dtype_q_bf16_dtype_kv_bf16_dtype_o_bf16_dtype_idx_i32_head_dim_ckv_512_head_dim_kpe_64_profiler_False
2025-07-03 13:06:46,487 - INFO - flashinfer.jit: Finished loading JIT ops: batch_mla_attention_dtype_q_bf16_dtype_kv_bf16_dtype_o_bf16_dtype_idx_i32_head_dim_ckv_512_head_dim_kpe_64_profiler_False
2025-07-03 13:06:46,536 - INFO - flashinfer.jit: Loading JIT ops: norm
2025-07-03 13:07:02,601 - INFO - flashinfer.jit: Finished loading JIT ops: norm
cuda_graph: 1/6, warmup finished.
capturing cuda graph 2 2
cuda_graph: 2/6, warmup finished.
capturing cuda graph 3 3
Process SpawnProcess-1:
Traceback (most recent call last):
File "/usr/lib/python3.13/multiprocessing/process.py", line 313, in _bootstrap
self.run()
~~~~~~~~^^
File "/usr/lib/python3.13/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/ktransformers/.ktransformers/lib/python3.13/site-packages/ktransformers/server/backend/interfaces/balance_serve.py", line 279, in run_engine
engine.model_runner.warmup()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/opt/ktransformers/.ktransformers/lib/python3.13/site-packages/ktransformers/server/balance_serve/inference/model_runner.py", line 133, in warmup
self.model_attn_plan(self.input[i], i)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/opt/ktransformers/.ktransformers/lib/python3.13/site-packages/ktransformers/server/balance_serve/inference/model_runner.py", line 92, in model_attn_plan
self.model.flash_infer_attn_plan(batch, self.bsz_tensor_buf, self.num_tokens_tensor_buf,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
num_heads=self.model.config.num_attention_heads, head_dim_ckv=self.model.config.kv_lora_rank,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
head_dim_kpe=self.model.config.qk_rope_head_dim, page_size=self.model.cache.page_size, causal=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sm_scale=self.model.model.layers[0].self_attn.softmax_scale, q_data_type=torch.bfloat16, kv_data_type=torch.bfloat16)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/ktransformers/.ktransformers/lib/python3.13/site-packages/ktransformers/models/custom_modeling_deepseek_v3.py", line 146, in flash_infer_attn_plan
self.wrapper.plan(minibatch.q_indptr, minibatch.kv_indptr, minibatch.kv_indices,
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
minibatch.kv_len, num_heads, head_dim_ckv, head_dim_kpe, page_size, causal, sm_scale, q_data_type, kv_data_type, bsz_tensors)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/ktransformers/.ktransformers/lib/python3.13/site-packages/flashinfer/mla.py", line 246, in plan
self._qo_indptr_buf[:len(qo_indptr)].copy_(qo_indptr, non_blocking=True)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: The size of tensor a (3) must match the size of tensor b (4) at non-singleton dimension 0
I would not have a similar issue in case with ktransformers backend, but it doesn’t support the disk prefix caching. So what to do?
[UPDATE]: the ephemeral vibe-coded solution seems to be currently found. https://github.com/kvcache-ai/ktransformers/issues/1417#issuecomment-3040256985
Reproduction
ktransformers \
--gguf_path /opt/unsloth/DeepSeek-R1-0528-GGUF/UD-Q2_K_XL/DeepSeek-R1-0528-UD-Q2_K_XL-00001-of-00006.gguf \
--model_path /opt/unsloth/DeepSeek-R1-0528-GGUF/ \
--model_name unsloth/DeepSeek-R1-0528-Q2-GGUF \
--cpu_infer $(grep ^cpu\\scores /proc/cpuinfo | uniq | awk '{print $4}' | xargs -I{} echo "{}-0" | bc) \
--optimize_config_path /opt/unsloth/DeepSeek-R1-0528-GGUF/UD-Q2_K_XL/DeepSeek-V3-Chat-serve.yaml \
--backend_type balance_serve \
--cache_8bit True \
--cache_lens $((128*1024)) \
--length $((128*1024)) \
--max_new_tokens $((128*1024)) \
--chunk_size 256 \
--max_batch_size 1 \
--temperature 0.6 \
--top_p 0.95 \
--host 0.0.0.0 \
--port 8080 \
--fast_safetensors True \
--log_level DEBUG \
--use_cuda_graph
Environment
uname -a
Linux xxx 6.12.32-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.32-1 (2025-06-07) x86_64 GNU/Linux
nvidia-smi
Thu Jul 3 12:32:18 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 575.51.02 Driver Version: 575.51.02 CUDA Version: 12.9 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3090 Off | 00000000:41:00.0 Off | N/A |
| 30% 35C P8 31W / 350W | 160MiB / 24576MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
uv pip list
Using Python 3.13.3 environment at: /opt/ktransformers/.ktransformers
Package Version
------------------------ ------------------------
accelerate 1.8.1
annotated-types 0.7.0
anyio 4.9.0
blessed 1.21.0
build 1.2.2.post1
certifi 2025.6.15
charset-normalizer 3.4.2
click 8.2.1
colorlog 6.9.0
cpufeature 0.2.1
distro 1.9.0
fastapi 0.115.14
filelock 3.18.0
fire 0.7.0
flashinfer-python 0.2.3
fsspec 2025.5.1
greenlet 3.2.3
h11 0.16.0
hf-xet 1.1.5
httpcore 1.0.9
httpx 0.28.1
huggingface-hub 0.33.2
idna 3.10
jinja2 3.1.6
jiter 0.10.0
jsonpatch 1.33
jsonpointer 3.0.0
ktransformers 0.3.2+cu129torch29avx2
langchain 0.3.26
langchain-core 0.3.67
langchain-text-splitters 0.3.8
langsmith 0.4.4
markupsafe 2.1.5
mpmath 1.3.0
networkx 3.5
ninja 1.11.1.4
numpy 2.3.1
nvidia-cublas-cu12 12.8.4.1
nvidia-cuda-cupti-cu12 12.8.90
nvidia-cuda-nvrtc-cu12 12.8.93
nvidia-cuda-runtime-cu12 12.8.90
nvidia-cudnn-cu12 9.10.2.21
nvidia-cufft-cu12 11.3.3.83
nvidia-cufile-cu12 1.13.1.3
nvidia-curand-cu12 10.3.9.90
nvidia-cusolver-cu12 11.7.3.90
nvidia-cusparse-cu12 12.5.8.93
nvidia-cusparselt-cu12 0.7.1
nvidia-nccl-cu12 2.27.3
nvidia-nvjitlink-cu12 12.8.93
nvidia-nvshmem-cu12 3.2.5
nvidia-nvtx-cu12 12.8.90
openai 1.92.2
orjson 3.10.18
packaging 24.2
pillow 11.2.1
protobuf 6.31.1
psutil 7.0.0
pydantic 2.11.7
pydantic-core 2.33.2
pyproject-hooks 1.2.0
pytorch-triton 3.3.1+gitc8757738
pyyaml 6.0.2
pyzmq 27.0.0
regex 2024.11.6
requests 2.32.4
requests-toolbelt 1.0.0
safetensors 0.5.3
sentencepiece 0.2.0
setuptools 78.1.0
sniffio 1.3.1
sqlalchemy 2.0.41
starlette 0.46.2
sympy 1.14.0
tenacity 9.1.2
termcolor 3.1.0
tokenizers 0.21.2
torch 2.9.0.dev20250702+cu128
torchaudio 2.8.0.dev20250702+cu128
torchvision 0.24.0.dev20250702+cu128
tqdm 4.67.1
transformers 4.51.3
triton 3.3.1
typing-extensions 4.14.0
typing-inspection 0.4.1
urllib3 2.5.0
uvicorn 0.35.0
wcwidth 0.2.13
wheel 0.45.1
zmq 0.0.0
zstandard 0.23.0
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 69 (3 by maintainers)
Commits related to this issue
- Apply magikRUKKOLA's patch from issue #1417 — committed to createthis/ktransformers by createthis a year ago
fwiw I wrote the early ktransformers guide but have since moved on to spend my time working on https://github.com/ikawrakow/ik_llama.cpp
For folk who don’t know, ik is the author of most of the mainline quant types newer than the original
q8_0andq4_1types includingiq4_xsandq6_Ketc.To be clear,
ik_llama.cppdoes not use a new file type and easily runs mainline llama.cpp quants from bartowski and unsloth and others.Basically it runs all those quants and more newer better types.
I’ll have to go update my README hugging face model cards to clarify that if people are mistaking this.
Folks are now getting over 300 tok/sec PP and in the high teens TG with my latest https://huggingface.co/ubergarm/DeepSeek-TNG-R1T2-Chimera-GGUF and no need for newer CUDA GPUs architectures like 8.9 for for native fp8 e4m3
So perfect if you have a mix of older GPUs like 3090TI and RTX A6000 multi-GPU configuration.
Thanks!
顺带一提,我编写了早期的 ktransformers 指南,但现已转向投入时间开发 https://github.com/ikawrakow/ik_llama.cpp。
对于不了解的各位,ik 是大部分新量化类型(超越原始
q8_0和q4_1类型)的作者,包括iq4_xs和q6_K等。明确说明:
ik_llama.cpp不使用新的文件类型,可轻松运行来自 bartowski、unsloth 及其他来源的主线 llama.cpp 量化模型。简言之,它不仅能运行上述量化模型,还兼容更多更新更优的类型。
我需要更新 Hugging Face 模型卡的 README 以澄清此点,若用户存在误解。
目前用户在使用我最新发布的 https://huggingface.co/ubergarm/DeepSeek-TNG-R1T2-Chimera-GGUF 时,可获得超过 300 tok/sec 的 PP和十几的 TG,且无需依赖 8.9 等新 CUDA GPU 架构来实现原生 fp8 e4m3。
因此,若您采用混合旧款 GPU(如 3090TI 与 RTX A6000)的多 GPU 配置,此方案堪称完美。
感谢!
I don’t feel like polluting the KTransformers repository with off-topic stuff. If you are interested you can enter an issue or start a discussion in the
ik_llama.cpprepository. But just quickly: a) you most likely want to runcmakewith-DGGML_SCHED_MAX_COPIES=1, and b) you need to add-mla 1to your command line to reproducellama.cppbehavior (ik_llama.cpphas several MLA options, and can be run without MLA as well, this is what you are doing). For better performance you would change-mla 3 -fmoeand, depending on how much VRAM you have, use much larger batch/u-batch than the defaults. In general, when not familiar with a tool, it is always a good idea to start with small steps, and only then try to fly.I’ll take a look after dinner!
Another error lol
[UPDATE]: I will try to vibecode myself out of bugs with DeepSeek V3/R1 UD_Q2/Q4 quants. But lol if the deepseek is right related to the interpretation of the bugs then something is truly wrong with the codebase of the ktransformers. Its a great framework, dont get me wrong, but the stability issues is driving me nuts. I suggest that we have to fix it. May be we could implement some unit tests to see how different backends behave in different environments (prefill length, max tokens, max batches etc. etc.)? Otherwise a lot of people are catching a lot of annoying bugs which is a major inconvenience!
[UPDATE2:] Holy cow! it apparently worked! no crashes yet! I will post the exact fixes later on, after the thorough hardcore testing. Let me know if I should provide the exact patches (which are quite trivial BTW) or make a pull request or something.
@magikRUKKOLA
The model you chose there is one of the largest which uses
Q8_0quantization for the tensors going onto GPU VRAM pretty sure, so it should line up roughly with the graph I presented before. For my smaller quants that ~17GB fixed size is lower allowing more space for kv-cache.Of course, by default ik/llama.cpp splits KV-cache across all GPUs or can use CPU RAM (much slower) which some folks choose to do if they require very high kv-cache on dense models with less efficient MQA/GQA.
To be honest I don’t know for as I have not fully inspected the (three different at least) MLA implementations on ik/llama.cpp. There are many closed PRs on multiple forks from around February of this year with the details. I’m not sure why you’re asking about this specific implementation optimization instead of looking at the actual benchmark results for yourself?
-mla 3) and ik even helped nvidia’s jeffbolz get this going to help with the vulkan backend this weekOkay, I’ll stop spamming up this thread and hmu over on ik’s fork. There is a lot of info over there spread out in discussions, closed PRs, my hugging face repo threads etc, so I know it is overwhelming. Feel free to hmu over on ik’s fork with your hardware details, current command, and what it is you are trying to do e.g. “i want to run as much context in the least VRAM as possible” or whatever you’re up to.
Cheers!
magikRUKKOLA
您选择的模型是当前最大规模之一,其GPU显存中的张量采用
Q8_0量化方案,这与之前展示的图表基本吻合。对于我的小型量化模型,约1GB的固定占用会更低,从而为KV缓存预留更多空间。当然可以。默认情况下ik/llama.cpp会将KV缓存跨GPU分配,亦可使用CPU内存(速度显著降低)。部分用户在运行MQA/GQA效率较低的稠密模型且需超大KV缓存时选择此方案。
坦白说,我尚未全面研究ik/llama.cpp中至少三种不同的MLA实现机制。今年二月前后多个分支存在大量已关闭PR涉及该技术细节。我不理 您为何不直接查看实际基准测试结果,而执着于追问具体实现优化?
-mla 3参数)。ik近期还协助nvidia的jeffbo在vulkan后端实现该功能为避免干扰本讨论区,建议移步ik分支交流。相关技术资料分散在讨论区、closed PR及我的hugging face仓库中,信息量确实庞大。欢迎携带硬件配置、当前命令及具体需求(如"在最小显存下运行最大上下文")至ik分支探讨。
顺颂时祺!
@ubergarm
Cool but what about the matrix absorption for prefill trick??? Its seems more reasonable to use flashinfer to support the long context just like ktransformers are doing. Namely,
https://docs.flashinfer.ai/api/mla.html
As far as I can see, its not supported in ik_llama.cpp, right?
@magikRUKKOLA
This is not specific to the inference engine, it is more specific to the specific quantization in terms of how large are the tensors your choose to offload onto VRAM and what kv-cache quantization you are using.
ik_llama.cpp implementation of DeepSeek MLA is very efficient, but generally yes you would need more than 24GB VRAM to use the model’s full 160k context. I’ve done it with two RTX A6000s (96GB VRAM total) (the older non-Blackwell ones). Most normal GQA style attention grows exponentially, but MLA is linear which is quite nice for longer context:
You see for this specific quant there is a fixed size for the attn/shexp/first 3 ffn dense layers being offloaded to VRAM plus a variable amount for the kv-cache. My newer quants use slimmer newer
IQ3_KSand similar SOTA quants to slim down that fixed amount further so people with 16GB VRAM can run it or you can get more context in 24GB etc.If you read my old guide I have a section addressing this where at least at the time ktransformers did not take advantage of multi-GPU (unless u can offload the whole thing) and it even says so in the documentation. Here is the reference.
ik_llama.cpp has no problem getting more speed using more GPUs. You just have to be careful how to use the
-ot --override-tensorcommand to not split up the tensors wierd. This works well for Qwen3 and other moe as well but the tensor naming convention and exact architectures vary so pay close attention. I’m helping some folks with gaming CPUs who have 5 GPUs with no nvlink no p2p anything and they are getting great speeds here in this discussion. I try to include multiGPU examples on most of my model cards.“It depends.” A higher BPW quantization of TNG-R1T2-Chimera may be better than a lower BPW quantization of R1-0528. You really need to choose the right model and tune it specific to your use case e.g. do you need more PP (prefill) or do you want more TG etc.
I also have R1-0528 quants available if you have enough hardware and patience to wait for “the smartest” answer. Choose whatever tool you want.
You’ll probably have to test and it is somewhat difficult to make a direct comparison because the tooling is different between the two ecosystems. In my own experience ik_llama.cpp is better for my use-case becase:
I personally also recommend https://github.com/turboderp-org/exllamav3 and vllm and sglang as well depending on what LLM you want to use, how much VRAM you have, what the environment in which you’re working is etc.
But for running these huge 671B MoE’s my weapon of choice for hybrid CPU+GPU inferencing is definitely ik_llama.cpp.
You might argue “well ktransformers has USE_NUMA=1 and supports AMX extensions” sure but in my own testing ik’s avx2 and avx bf16 CPU implementations are faster than the AMX stuff anyway and if you can configure your AMD Epyc to
NPS0or your Intel Xeon toSNC=Disableand try to use single NUMA node then no need to pay for twice the RAM.There is still room for improvment, and ik has been quite dedicated and all the amazing PP (prefill) speeds optimizations are really adding up now.
As mentioned above, the tooling around the llama.cpp ecosystem allows me to create and compare my quants to other providers and in general ik’s SOTA out perform his older quants which other quant cookers seem to limit themselves:
magikRUKKOLA
这与推理引擎本身无关,更多取决于具体量化方案的选择:包括选择卸载到显存中的张量大小以及使用的kv缓存量化方法。
ik_llama.cpp对DeepSeek MLA的实现非常高效,但通常确实需要超过24GB显存才能使用模型完整的160k上下文。我曾在两块RTX A6000(非Blackwell版,总计96GB显存)上成功运行。普通GQA风格注意力的计算量呈指数级增长,而MLA是线性的,这对长上下文非常有利:
如图所示,在该特定量化方案中,attn/shexp/前三个ffn密集层有固定大小的显存占用,而kv缓存部分则是可变大小。我更新的量化方案采用了更精简的新式
IQ3_KS等SOTA量化方法,进一步减少了固定占用部分,使得16GB显存用户也能运行,或在24GB显存下获得更多上下文。如果您读过我的旧版指南,其中专门讨论过这个问题:至少在当时的ktranformers版本中,除非能完全卸载模型,否则无法有效利用多GPU 文档中也明确提及)。参考链接在此
ik_llama.cpp可以毫无问题地通过多GPU获得速度提升。关键是要谨慎使用
-ot --override-tensor命令,避免异常张量分割。这种方法对wen3及其他MoE模型同样有效,但需注意不同架构的张量命名规范差异。我目前正在协助一些使用游戏CPU的用户(他们拥有5块无NVLink/P2P的GPU),在此讨论中他们获得了出色性能。我尽量在多数模型卡中提供多GPU示例。“这取决于具体情况。” 高BPW量化的TNG-R1T2-Chimera可能优于低BPW量化的R1-0528。您需要根据具体用例选择合适模型并进行调优,例如侧重预填充(PP)还是生成(TG)等需求。
如果硬件充足且有耐心等待"最智能"的答案,我也提供R1-0528量化版本。工具选择完全取决于您。
可能需要自行测试,因为两者的工具链差异使得直接比较较为困难。根据我的经验,ik_llama.cpp更适合我的使用场景,原因如下:
根据LLM类型、显存容量和工作环境,我个人也推荐:
但对于运行这些671B参数的巨型MoE模型,ik_llama.cpp绝对是混合CPU+GPU推理的首选工具。
有人可能反驳"ktransformers支持USE_NUMA=1和AMX扩展"——但在我的测试中,ik的avx2/avx bf16 CPU实现反而比AMX更快。若能将AMD Epyc配置为
NPS0或Intel Xeon设为SNC=Disable并使用单NUMA节点,则无需支付双倍内存成本。仍有改进空间,而ik始终专注优化——目前所有的预填充(PP)速度优化成果正在持续累积。
如前所述,llama.cpp生态的工具链使我能够将自己的量化方案与其他提供商对比。总体而言,ik的SOTA量化始终优于其旧版量化,而其他量化工具似乎自我设限:
It’s not. This is the reported max context length
llama.cppdetects in the GGUF.The quant type. _R4 have better performance in terms of perplexity per bpw. Example:
@ikawrakow
https://huggingface.co/ubergarm/DeepSeek-R1-0528-GGUF
@createthis
In what sense does
ik_llama.cppneed “yet another file format”? It will happily consume any GGUF usable withllama.cpp.https://github.com/kvcache-ai/ktransformers/pull/1422/commits/8c8cb207aa0ebe6d00ede36489adfe6ce23bd436
llama.cppis faster for me in tok/s thanktransformers, due to the way it handles NUMA. I can run it with NPS4 and tune the number of CPU threads to be optimal instead of NPS0 under ktransformers. I did prefer the prefill cache in thektransformersbackend, but that’s not support now either, so I really no longer have a dog in the race.llama.cppdoes use more VRAM thanktransformers, but I have plenty of VRAM since I upgraded from a 3090 to a blackwell 6000 pro.I have not tried
ik_llama.cpp. I don’t like that it uses yet another file format. I have limited disk space, so I’m sticking to GGUF for now.My opinion as an old guy who has worked on a lot of software projects over the years is that this project needs unit tests that prevent this sort of thing from happening and CI/CD to enforce it. If it had that, the ktransformers backend could be maintained in a fork or something if they don’t want to support it. However, without the unit tests and CI/CD, this sort of thing will always happen and the ktransformers project will be unstable. I’ve switched to llama.cpp for this reason.
@createthis
these are with diff -u
lol no errors yet
So what does that all mean? All the time there was a race condition in the balance_serve backend sampler of ktransformers which leads to the invalid memory read? Is it correct?
[UPDATE]: a different error!