Johannes Gäßler and GitHub
8e558309dc
CUDA: MMQ support for iq4_nl, iq4_xs ( #8278 )
2024-07-05 09:06:31 +02:00
Johannes Gäßler and GitHub
bcefa03bc0
CUDA: fix MMQ stream-k rounding if ne00 % 128 != 0 ( #8311 )
2024-07-05 09:05:34 +02:00
Johannes Gäßler and GitHub
cb5fad4c6c
CUDA: refactor and optimize IQ MMVQ ( #8215 )
...
* CUDA: refactor and optimize IQ MMVQ
* uint -> uint32_t
* __dp4a -> ggml_cuda_dp4a
* remove MIN_CC_DP4A checks
* change default
* try CI fix
2024-07-01 20:39:06 +02:00
Johannes Gäßler and GitHub
85a267daaa
CUDA: fix MMQ stream-k for --split-mode row ( #8167 )
2024-06-27 16:26:05 +02:00
Johannes Gäßler and GitHub
c8771ab5f8
CUDA: fix misaligned shared memory read ( #8123 )
2024-06-26 08:28:02 +02:00
Johannes Gäßler and GitHub
2df373ac40
CUDA: fix matrix multiplication algorithm choice ( #8102 )
2024-06-25 01:22:33 +02:00
Johannes Gäßler and GitHub
3b099bcd9c
CUDA: fix MMQ writeback for int8 tensor cores ( #8100 )
2024-06-24 22:15:33 +02:00
Johannes Gäßler and GitHub
a818f3028d
CUDA: use MMQ instead of cuBLAS by default ( #8075 )
2024-06-24 17:43:42 +02:00
Johannes Gäßler and GitHub
9a590c8226
CUDA: optimize MMQ int8 tensor core performance ( #8062 )
...
* CUDA: optimize MMQ int8 tensor core performance
* only a single get_mma_tile_x_k function
* simplify code, make functions constexpr
2024-06-24 12:41:23 +02:00
abd894ad96
common: fix warning ( #8036 )
...
* common: fix warning
* Update common/common.cpp
Co-authored-by: slaren <slarengh@gmail.com >
---------
Co-authored-by: slaren <slarengh@gmail.com >
2024-06-20 16:40:13 +02:00
Johannes Gäßler and GitHub
d50f8897a7
CUDA: stream-k decomposition for MMQ ( #8018 )
...
* CUDA: stream-k decomposition for MMQ
* fix undefined memory reads for small matrices
2024-06-20 14:39:21 +02:00
Johannes Gäßler and GitHub
76d66ee0be
CUDA: faster q2_K, q3_K MMQ + int8 tensor cores ( #7921 )
...
* CUDA: faster q2_K, q3_K MMQ + int8 tensor cores
* try CI fix
* try CI fix
* try CI fix
* fix data race
* rever q2_K precision related changes
2024-06-14 18:41:49 +02:00
Johannes Gäßler and GitHub
963552903f
CUDA: fix broken oob check for FA vec f32 kernel ( #7904 )
2024-06-12 17:41:51 +02:00
Johannes Gäßler and GitHub
148995e5e5
llama-bench: more compact markdown tables ( #7879 )
2024-06-11 14:45:40 +02:00
Johannes Gäßler and GitHub
bdcb8f4222
CUDA: int8 tensor cores for MMQ (q4_K, q5_K, q6_K) ( #7860 )
2024-06-11 08:26:07 +02:00
Johannes Gäßler and GitHub
1f0dabda8d
CUDA: use tensor cores for MMQ ( #7676 )
...
* CUDA: int8 tensor cores for MMQ (legacy quants)
* fix out-of-bounds writes
* __builtin_assume -> GGML_CUDA_ASSUME
* fix writeback returning too early
2024-06-10 11:45:13 +02:00
Johannes Gäßler and GitHub
42b53d192f
CUDA: revise q8_1 data layout for mul_mat_q ( #7824 )
2024-06-09 09:42:25 +02:00
Johannes Gäßler and GitHub
7027b27d76
server: update cache_prompt documentation [no ci] ( #7745 )
2024-06-07 11:15:49 +02:00
Johannes Gäßler and GitHub
7d1a378b8f
CUDA: refactor mmq, dmmv, mmvq ( #7716 )
...
* CUDA: refactor mmq, dmmv, mmvq
* fix out-of-bounds write
* struct for qk, qr, qi
* fix cmake build
* mmq_type_traits
2024-06-05 16:53:00 +02:00
Johannes Gäßler and GitHub
0b832d53ba
make: fix debug options not being applied to NVCC ( #7714 )
2024-06-03 16:28:58 +02:00
Johannes Gäßler and GitHub
e141ce624a
Fix FlashAttention debug test, FP32 assert ( #7684 )
2024-06-01 23:26:10 +02:00
Johannes Gäßler and GitHub
750f60c03e
CUDA: fix Pascal FA, deq. KV to FP16 for batch > 8 ( #7681 )
2024-06-01 15:47:04 +02:00
Johannes Gäßler and GitHub
9b596417af
CUDA: quantized KV support for FA vec ( #7527 )
...
* CUDA: quantized KV support for FA vec
* try CI fix
* fix commented-out kernel variants
* add q8_0 q4_0 tests
* fix nwarps > batch size
* split fattn compile via extern templates
* fix flake8
* fix metal tests
* fix cmake
* make generate_cu_files.py executable
* add autogenerated .cu files
* fix AMD
* error if type_v != FP16 and not flash_attn
* remove obsolete code
2024-06-01 08:44:14 +02:00
Johannes Gäßler and GitHub
c8047d538f
scripts: update compare_llama_bench.py [no ci] ( #7673 )
2024-05-31 16:26:21 +02:00
Johannes Gäßler and GitHub
972b555ab9
README: explain parallel build [no ci] ( #7618 )
2024-05-30 09:52:39 +02:00
Johannes Gäßler and GitHub
10b1e45876
make: add --device-debug to NVCC debug flags ( #7542 )
2024-05-27 19:34:40 +02:00
Johannes Gäßler and GitHub
cd93a28cb1
CUDA: fix FA out-of-bounds reads ( #7479 )
2024-05-23 00:31:20 +02:00
Johannes Gäßler and GitHub
38c03478a3
CUDA: fix FA out-of-bounds writes ( #7465 )
2024-05-22 17:58:25 +02:00
Johannes Gäßler and GitHub
95fb0aefab
CUDA: remove incorrect precision check ( #7454 )
2024-05-22 10:24:29 +02:00
Johannes Gäßler and GitHub
fcf6538ba6
CUDA: fix unused warning in mmq.cu ( #7442 )
2024-05-21 20:27:12 +03:00
Johannes Gäßler and GitHub
d8ee902227
CUDA: deduplicate mmq code ( #7397 )
2024-05-21 16:02:12 +02:00
Johannes Gäßler and GitHub
20385cebcc
perplexity: update README FP16 results [no ci] ( #7413 )
2024-05-20 18:15:38 +02:00
Johannes Gäßler and GitHub
5ca49cbecd
ggml: implement quantized KV cache for FA ( #7372 )
2024-05-19 16:46:13 +02:00
Johannes Gäßler and GitHub
1b01f06db0
server: add test for token probs ( #7347 )
2024-05-19 16:26:02 +02:00
Johannes Gäßler and GitHub
41858392e1
server: fix seed being reported back ( #7382 )
2024-05-19 17:06:33 +03:00
Johannes Gäßler and GitHub
133d99c599
CUDA: deduplicate FlashAttention code ( #7352 )
2024-05-18 12:36:25 +02:00
Johannes Gäßler and GitHub
cb42c29427
server: correct --threads documentation [no ci] ( #7362 )
2024-05-18 11:10:47 +02:00
Johannes Gäßler and GitHub
0fc1e820a9
CUDA: faster large batch FA without tensor cores ( #7314 )
2024-05-17 18:54:52 +02:00
Johannes Gäßler and GitHub
29c60d8cdd
tokenization: add warning for double BOS ( #7332 )
2024-05-17 09:59:57 +02:00
Johannes Gäßler and GitHub
583fd6b000
server bench: fix bench not waiting for model load ( #7284 )
2024-05-15 08:44:16 +02:00
Johannes Gäßler and GitHub
1c570d8bee
perplexity: add BF16 vs. FP16 results ( #7150 )
2024-05-13 13:03:27 +02:00
Johannes Gäßler and GitHub
dc685be466
CUDA: add FP32 FlashAttention vector kernel ( #7188 )
...
* CUDA: add FP32 FlashAttention vector kernel
* fixup! CUDA: add FP32 FlashAttention vector kernel
* fixup! fixup! CUDA: add FP32 FlashAttention vector kernel
* fixup! fixup! fixup! CUDA: add FP32 FlashAttention vector kernel
2024-05-12 19:40:45 +02:00
Johannes Gäßler and GitHub
5ae3426b0b
server: fix reported top tokens for temperature 0 ( #7203 )
2024-05-11 10:11:28 +02:00
Johannes Gäßler and GitHub
a743d76a01
CUDA: generalize FP16 fattn vec kernel ( #7061 )
...
* CUDA: generalize FP16 fattn vec kernel
* disable unsupported head sizes for AMD in test
* try AMD fix
* fix batch size 2-8
* partially revert changes
2024-05-09 14:32:02 +02:00
Johannes Gäßler and GitHub
c12452c7ae
JSON: [key] -> .at(key), assert() -> GGML_ASSERT ( #7143 )
2024-05-08 21:53:08 +02:00
Johannes Gäßler and GitHub
af0a5b6163
server: fix incorrectly reported token probabilities ( #7125 )
...
* server: normalize token probabilities
* fix temperature == 0.0f
2024-05-07 23:07:58 +02:00
Johannes Gäßler and GitHub
3ea0d36000
Server: add tests for batch size, different seeds ( #6950 )
2024-05-01 17:52:55 +02:00
Johannes Gäßler and GitHub
1613ef8d8e
CUDA: CUDART < 11.7 workaround for __hmax, __hmax2 ( #7019 )
2024-05-01 14:46:37 +02:00
Johannes Gäßler and GitHub
a8f9b07631
perplexity: more statistics, added documentation ( #6936 )
...
* perplexity: more statistics, added documentation
* add LLaMA 3 8b scoreboard
2024-04-30 23:36:27 +02:00
Johannes Gäßler and GitHub
c4f708a93f
llama : fix typo LAMMAFILE -> LLAMAFILE ( #6974 )
2024-04-29 15:36:22 +03:00
Johannes Gäßler and GitHub
784e11dea1
README: add graphic for matrix multiplication ( #6881 )
2024-04-24 21:29:13 +02:00
Johannes Gäßler and GitHub
28103f4832
Server: fix seed for multiple slots ( #6835 )
...
* Server: add tests for consistent results
* sampling: separate rng per sampling context
2024-04-24 11:08:36 +02:00
Johannes Gäßler and GitHub
b5e7285baf
CUDA: fix matrix multiplication logic for tests ( #6667 )
2024-04-14 00:21:55 +02:00
Johannes Gäßler and GitHub
33a5244806
compare-llama-bench.py: fix long hexsha args ( #6424 )
2024-04-01 13:30:43 +02:00
Johannes Gäßler and GitHub
7aed0ffe68
Fixed lookup compilation issues on Windows ( #6273 )
2024-03-24 14:21:17 +01:00
Johannes Gäßler and GitHub
50ccaf5eac
lookup: complement data from context with general text statistics ( #5479 )
...
* lookup: evaluation tools, use corpus/previous gens
* fixup! lookup: evaluation tools, use corpus/previous gens
* fixup! lookup: evaluation tools, use corpus/previous gens
* fixup! lookup: evaluation tools, use corpus/previous gens
* fixup! lookup: evaluation tools, use corpus/previous gens
2024-03-23 01:24:36 +01:00
Johannes Gäßler and GitHub
47bb7b48c7
CUDA: fix DEBUG_CUDA_MALLOC ( #5729 )
2024-02-26 15:36:38 +01:00
ad014bba97
make: add error message for bad CUDA version ( #5444 )
...
* make: add error message for bad CUDA version
* Update Makefile
Co-authored-by: Jared Van Bortel <cebtenzzre@gmail.com >
---------
Co-authored-by: Jared Van Bortel <cebtenzzre@gmail.com >
2024-02-13 12:38:37 +01:00
3bdc4cd0f5
CUDA: mul_mat_vec_q tiling, refactor mul mat logic ( #5434 )
...
* CUDA: mul_mat_vec_q tiling, refactor mul mat logic
Co-authored-by: slaren <slarengh@gmail.com >
---------
Co-authored-by: slaren <slarengh@gmail.com >
2024-02-11 19:08:39 +01:00
Johannes Gäßler and GitHub
e4640d8fdf
lookup: add print for drafting performance ( #5450 )
2024-02-11 12:44:51 +01:00
Johannes Gäßler and GitHub
8e6a9d2de0
CUDA: more warps for mmvq on NVIDIA ( #5394 )
2024-02-08 21:56:40 +01:00
Johannes Gäßler and GitHub
b7b74cef36
fix trailing whitespace ( #5407 )
2024-02-08 11:36:54 +01:00
26d4efd11e
sampling: fix top_k <= 0 ( #5388 )
...
* sampling: fix top_k <= 0
* Update llama.cpp
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com >
---------
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com >
2024-02-08 09:46:30 +01:00
Johannes Gäßler and GitHub
aa7ab99be2
CUDA: fixed mmvq kernel for bs 2,3,4 and -sm row ( #5386 )
2024-02-07 12:40:26 +01:00
Johannes Gäßler and GitHub
17c97fb062
CUDA: mul_mat_vec_q max. batch size 8 -> 4 ( #5370 )
2024-02-06 19:43:06 +02:00
Johannes Gäßler and GitHub
2c516611f1
CUDA: mul_mat_vec_q for batch sizes > 1 ( #5351 )
2024-02-06 14:44:06 +01:00
Johannes Gäßler and GitHub
098f6d737b
make: Use ccache for faster compilation ( #5318 )
...
* make: Use ccache for faster compilation
2024-02-05 19:33:00 +01:00
78b00dda6c
README: updated introduction ( #5343 )
...
* README: updated introduction
* readme : update
---------
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com >
2024-02-05 15:55:10 +01:00
Johannes Gäßler and GitHub
3c0d25c475
make: add nvcc info print ( #5310 )
2024-02-03 20:15:13 +01:00
Johannes Gäßler and GitHub
3cc5ed353c
make: fix nvcc optimization flags for host code ( #5309 )
2024-02-03 20:14:59 +01:00
Johannes Gäßler and GitHub
9241c3a2ac
Apply min_p to unsorted tokens ( #5115 )
2024-01-28 09:59:49 +01:00
Johannes Gäßler and GitHub
b2b2bf988c
Tests for min_p, sampling queue ( #5147 )
2024-01-28 09:35:14 +01:00
Johannes Gäßler and GitHub
9ecdd12e95
CUDA: more info when no device code ( #5088 )
2024-01-23 13:31:56 +01:00
Johannes Gäßler and GitHub
c71d608ce7
ggml: cache sin/cos for RoPE ( #4908 )
2024-01-13 21:41:37 +01:00
Johannes Gäßler and GitHub
7dc78764e2
compare-llama-bench: tweak output format ( #4910 )
2024-01-13 15:52:53 +01:00
Johannes Gäßler and GitHub
3fe81781e3
CUDA: faster q8_0 -> f16 dequantization ( #4895 )
2024-01-12 20:38:54 +01:00
Johannes Gäßler and GitHub
1b280c9fff
CUDA: fix softmax compile for old CUDA versions ( #4862 )
2024-01-12 12:30:41 +01:00
Johannes Gäßler and GitHub
4f56458d34
Python script to compare commits with llama-bench ( #4844 )
2024-01-10 01:04:33 +01:00
Johannes Gäßler and GitHub
8f900abfc0
CUDA: faster softmax via shared memory + fp16 math ( #4742 )
2024-01-09 08:58:55 +01:00
Johannes Gäßler and GitHub
d5a410e855
CUDA: fixed redundant value dequantization ( #4809 )
2024-01-07 17:24:08 +01:00
Johannes Gäßler and GitHub
a91928014f
Print backend name on test-backend-ops failure ( #4751 )
2024-01-04 09:43:23 +01:00
Johannes Gäßler and GitHub
39d8bc71ed
CUDA: fixed tensor cores not being used on RDNA3 ( #4697 )
2023-12-30 13:52:01 +01:00
Johannes Gäßler and GitHub
a20f3c7465
CUDA: fix tensor core logic for Pascal and HIP ( #4682 )
2023-12-29 23:12:53 +01:00
Johannes Gäßler and GitHub
e0a4002273
CUDA: fixed row rounding for 0 tensor splits ( #4594 )
2023-12-23 09:16:33 +01:00
Johannes Gäßler and GitHub
9154494808
CUDA: mul_mat_id always on GPU for batches >= 32 ( #4553 )
2023-12-21 18:42:59 +01:00
Johannes Gäßler and GitHub
d3223afdad
llama : disable per-tensor info prints on model load ( #4562 )
2023-12-21 18:34:17 +02:00
799fc22689
CUDA: Faster Mixtral prompt processing ( #4538 )
...
* CUDA: make MoE tensors contiguous for batch size>1
* Update ggml-cuda.cu
Co-authored-by: slaren <slarengh@gmail.com >
---------
Co-authored-by: slaren <slarengh@gmail.com >
2023-12-20 15:41:22 +01:00
Johannes Gäßler and GitHub
8185710a80
CUDA: use only 1 thread if fully offloaded ( #2915 )
2023-09-21 11:43:53 +03:00
Johannes Gäßler and GitHub
ee66942d7e
CUDA: fix peer access logic ( #3231 )
2023-09-17 23:35:20 +02:00
Johannes Gäßler and GitHub
111163e246
CUDA: enable peer access between devices ( #2470 )
2023-09-17 16:37:53 +02:00
Johannes Gäßler and GitHub
578d8c8f5c
CUDA: fix scratch malloced on non-main device ( #3220 )
2023-09-17 14:16:22 +02:00
0a5eebb45d
CUDA: mul_mat_q RDNA2 tunings ( #2910 )
...
* CUDA: mul_mat_q RDNA2 tunings
* Update ggml-cuda.cu
Co-authored-by: Henri Vasserman <henv@hot.ee >
---------
Co-authored-by: Henri Vasserman <henv@hot.ee >
2023-09-13 11:20:24 +02:00
Johannes Gäßler and GitHub
4f7cd6ba9c
CUDA: fix LoRAs ( #3130 )
2023-09-13 00:15:33 +02:00
Johannes Gäßler and GitHub
89e89599fd
CUDA: fix mul_mat_q not used for output tensor ( #3127 )
2023-09-11 22:58:41 +02:00
Johannes Gäßler and GitHub
d54a4027a6
CUDA: lower GPU latency + fix Windows performance ( #3110 )
2023-09-11 19:55:51 +02:00
Johannes Gäßler and GitHub
8a4ca9af56
CUDA: add device number to error messages ( #3112 )
2023-09-11 13:00:24 +02:00
Johannes Gäßler and GitHub
8afe228000
CUDA: mul_mat_q=true llama_context_params default ( #2912 )
2023-08-30 21:46:19 +02:00
Johannes Gäßler and GitHub
6b73ef1201
YAML result logging + preset script ( #2657 )
2023-08-28 17:59:39 +02:00
Johannes Gäßler and GitHub
92b1bbd2ec
CUDA: fix RoPE asserts, block sizes ( #2833 )
2023-08-28 14:23:55 +03:00
Johannes Gäßler and GitHub
c63bb1d16a
CUDA: use mul_mat_q kernels by default ( #2683 )
2023-08-22 22:47:05 +02:00