Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/andrewkchan/deepseek.cpp
/ functions
Functions
195 in github.com/andrewkchan/deepseek.cpp
⨍
Functions
195
◇
Types & classes
36
↓ 56 callers
Function
cdiv
src/model.cpp:18
↓ 55 callers
Function
check_tensor
src/model.cpp:129
↓ 41 callers
Function
get_tensor
src/model.cpp:138
↓ 23 callers
Function
half_to_float
src/codec.h:23
↓ 23 callers
Function
save_weight_and_scale
(weight_name: str, scale_name: str, weight_and_scale: Tuple[torch.Tensor, torch.Tensor])
convert.py:364
↓ 22 callers
Method
aqb
activation quantization buffer
src/model.h:140
↓ 21 callers
Method
hb
src/model.h:112
↓ 19 callers
Function
matmul
src/infer.cpp:381
↓ 17 callers
Function
conv
(weight_name: str, scale_name: str)
convert.py:337
↓ 17 callers
Function
get_timestamp_ms
src/time_utils.cpp:5
↓ 16 callers
Method
xb
src/model.h:107
↓ 15 callers
Function
float_to_half
src/codec.h:26
↓ 15 callers
Method
x
current activations
src/model.h:106
↓ 11 callers
Function
nearest_int
src/quant.cpp:34
↓ 10 callers
Function
_matmul
src/infer.cpp:121
↓ 10 callers
Method
kv_a
src/model.h:117
↓ 10 callers
Method
xb2
TODO: do we need xb2?
src/model.h:110
↓ 9 callers
Function
error_usage
src/main.cpp:18
↓ 9 callers
Method
hb2
src/model.h:113
↓ 9 callers
Function
matmul_unscaled
src/infer.cpp:419
↓ 9 callers
Method
q_a
src/model.h:114
↓ 8 callers
Function
assertArrayEquals
src/test.cpp:29
↓ 8 callers
Function
get_scale_shuffle_q3k
shuffles to pick the required scales in dot products
src/quant.cpp:55
↓ 7 callers
Method
active_bytes
src/model.cpp:324
↓ 7 callers
Method
forward
src/model.cpp:874
↓ 7 callers
Method
parse_args
Returns true if args are valid, false otherwise
src/main.cpp:162
↓ 7 callers
Method
q
src/model.h:115
↓ 7 callers
Function
rmsnorm
src/infer.cpp:601
↓ 6 callers
Function
codec_dtype_to_string
src/codec.cpp:70
↓ 6 callers
Function
float8e5m2_to_float
src/codec.h:40
↓ 6 callers
Function
rope
src/infer.cpp:648
↓ 6 callers
Function
rope_v3
src/infer.cpp:670
↓ 6 callers
Method
ropebuf
src/model.h:120
↓ 5 callers
Method
att
src/model.h:125
↓ 5 callers
Function
float_to_float8e5m2
src/codec.h:49
↓ 5 callers
Function
help_usage_interactive
src/main.cpp:45
↓ 5 callers
Method
kv_b
src/model.h:118
↓ 5 callers
Method
logits
LM head
src/model.h:137
↓ 4 callers
Function
gelu
src/infer.cpp:636
↓ 4 callers
Function
matmul_expert
src/infer.cpp:423
↓ 4 callers
Method
q_rope
src/model.h:130
↓ 4 callers
Function
quantize
(t: torch.Tensor)
convert.py:326
↓ 4 callers
Function
silu
src/infer.cpp:640
↓ 3 callers
Function
attn
Compute next value in a sequence for a single causal self-attention head.
src/infer.cpp:728
↓ 3 callers
Function
conv_experts
(weight_and_scale_names: List[Tuple[str, str]])
convert.py:344
↓ 3 callers
Method
device
src/model.h:142
↓ 3 callers
Method
encode
src/tokenizer.cpp:57
↓ 3 callers
Function
encode_prompt
src/main.cpp:257
↓ 3 callers
Function
float_array_to_half
src/test.cpp:54
↓ 3 callers
Method
k
src/model.h:121
↓ 3 callers
Method
kv_rope_cache
src/model.h:413
↓ 3 callers
Method
load
src/debug.cpp:21
↓ 3 callers
Function
load_and_dequantize
(weight_name: str, scale_name: str)
convert.py:319
↓ 3 callers
Function
per_tensor_quantize
Quantize a tensor using per-tensor static scaling factor. Args: tensor: The input tensor. dtype: The data type to quantize to.
convert.py:216
↓ 3 callers
Function
softmax
Compute the softmax of an input vector `x` of length `size` and store it in `o`.
src/infer.cpp:472
↓ 2 callers
Method
active_experts
src/model.h:135
↓ 2 callers
Method
active_experts_weights
src/model.h:134
↓ 2 callers
Function
bits_per_weight
src/codec.cpp:40
↓ 2 callers
Function
blockwise_dequantize
(qweight: torch.Tensor, scale: torch.Tensor, block_size: torch.Tensor)
convert.py:250
↓ 2 callers
Function
blockwise_quantize
(weight: torch.Tensor, block_size: torch.Tensor, dtype: torch.dtype)
convert.py:262
↓ 2 callers
Method
decode_one
src/tokenizer.cpp:44
↓ 2 callers
Function
hsum_float_8
horizontally add 8 floats
src/quant.cpp:46
↓ 2 callers
Function
is_k_quant
src/codec.cpp:66
↓ 2 callers
Function
k_quantize
Quantize a 2D float32 tensor to Q2_K or Q3_K format. Args: tensor: Input tensor of shape (M, N) where N must be a multiple of 256 Ret
quantizer.py:5
↓ 2 callers
Method
key_cache
src/model.h:321
↓ 2 callers
Method
kv_nope_cache
src/model.h:411
↓ 2 callers
Method
moe_weights
mixture of experts
src/model.h:133
↓ 2 callers
Method
q_c
MLA only
src/model.h:128
↓ 2 callers
Function
quant_to_string
src/codec.cpp:13
↓ 2 callers
Function
quantize_row_q8_K_ref
src/quant.cpp:616
↓ 2 callers
Function
run_completion
src/main.cpp:277
↓ 2 callers
Function
run_passkey
src/main.cpp:433
↓ 2 callers
Function
run_perplexity
src/main.cpp:371
↓ 2 callers
Method
sample
src/sampler.cpp:41
↓ 2 callers
Function
set_profile_enabled
src/profile.cpp:9
↓ 2 callers
Method
v
src/model.h:123
↓ 2 callers
Method
value_cache
src/model.h:323
↓ 1 callers
Function
allocateAlignedArray
Helper function to allocate aligned memory
src/test.cpp:209
↓ 1 callers
Function
arrayEquals
src/test.cpp:17
↓ 1 callers
Function
attn_mla
Compute next value in a sequence for a single causal self-attention head. MLA variant: uses combined latent-KV cache and PE-KV cache.
src/infer.cpp:766
↓ 1 callers
Method
block
src/model.cpp:290
↓ 1 callers
Function
codec_dtype_size
src/codec.cpp:109
↓ 1 callers
Function
dequantize_row_q2_K
src/quant.cpp:217
↓ 1 callers
Function
dequantize_row_q3_K
src/quant.cpp:384
↓ 1 callers
Method
encoding_to_debug_string
src/tokenizer.cpp:96
↓ 1 callers
Function
fill_random
src/test.cpp:188
↓ 1 callers
Function
floatEquals
src/test.cpp:13
↓ 1 callers
Function
float_array_to_float8e5m2
src/test.cpp:62
↓ 1 callers
Method
from_json
src/codec.cpp:124
↓ 1 callers
Method
from_yalm
src/model.cpp:22
↓ 1 callers
Function
get_profile_enabled
src/profile.cpp:13
↓ 1 callers
Function
ggml_vec_dot_q2_K_q8_K
src/quant.cpp:666
↓ 1 callers
Function
ggml_vec_dot_q3_K_q8_K
src/quant.cpp:434
↓ 1 callers
Function
gpt2_bytes_to_unicode
()
convert.py:175
↓ 1 callers
Function
load_tokens
(tokenizer_path, vocab_size)
convert.py:187
↓ 1 callers
Function
load_weights
Generator that yields shards of weights loaded from the model files in huggingface format. Each shard contains a dictionary of tensors, with weig
convert.py:296
↓ 1 callers
Method
logit_indices
src/model.h:138
↓ 1 callers
Function
make_q3_quants
src/quant.cpp:249
↓ 1 callers
Function
mem_bench
src/test.cpp:218
↓ 1 callers
Function
mem_bench2
src/test.cpp:264
next →
1–100 of 195, ranked by callers