mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #20] If I want to run a linear layer with q4_k_m on cpu using lamafile, how to do it with your implement #11
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Eutenacity on GitHub (Aug 3, 2024).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/20
Originally assigned to: @chenht2022 on GitHub.
I found the bench_linear.py. But the weight is fp32 not the quantized uint8. Can you give me a example ? thanks
@chenht2022 commented on GitHub (Aug 4, 2024):
You are correct. For testing convenience, we randomly generated some FP32 weights in our bench program and let llamafile_sgemm treat them as quantized weights. The output obtained this way is meaningless; we use this bench program solely to test performance. In actual use, the weights are mmap-ed from gguf rather than randomly generated, ensuring that the computation results are meaningful.
The injection of the linear layer is coming soon, and you will then be able to run a linear layer on the CPU using llamafile by modifying a YAML configuration file.
probability tensor contains eitherinf,nanor element < 0failed. #327