MCPcopy Create free account

hub / github.com/csguoh/OBR / functions

Functions645 in github.com/csguoh/OBR

↓ 52 callersMethodto_eval_mode
(self)
FlatQuant/flatquant/trans_utils.py:39
↓ 19 callersMethodget_matrix
(self, inv_t=False)
FlatQuant/flatquant/trans_utils.py:27
↓ 18 callersFunctionshard_tensor
(tensor: Tensor, dim: int, num_shards: int)
SpinQuant/utils/convert_to_executorch.py:29
↓ 17 callersFunctionget_decompose_dim
(n)
FlatQuant/flatquant/function_utils.py:11
↓ 17 callersFunctionis_pow2
(n)
QuaRot/hadamard_utils.py:149
↓ 15 callersFunctionis_pow2
(n)
FlatQuant/flatquant/hadamard_utils.py:187
↓ 12 callersMethodfind_params
(self, x)
SpinQuant/utils/quant_utils.py:155
↓ 11 callersMethod__init__
(self, config)
SpinQuant/eval_utils/modeling_llama.py:310
↓ 11 callersMethod__init__
(self, config)
SpinQuant/train_utils/modeling_llama_quant.py:312
↓ 11 callersMethod_ori_forward
origin implement: down_proj = self.down_proj(self.act_fn(self.gate_proj(x)) * self.up_proj(x))
FlatQuant/flatquant/model_tools/deepseekv3_utils.py:333
↓ 11 callersMethodfind_params
(self, x)
QuaRot/quant_utils.py:143
↓ 10 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
SpinQuant/eval_utils/modeling_llama.py:360
↓ 9 callersFunctionget_init_scale
(w_smax, x_smax, alpha=0.5)
FlatQuant/flatquant/function_utils.py:7
↓ 9 callersFunctionget_init_weight
(dim, )
FlatQuant/flatquant/function_utils.py:31
↓ 8 callersMethodconfigure
( self, bits: int, groupsize: int = -1, sym: bool = False, clip_ratio: float = 1.0 )
SpinQuant/utils/quant_utils.py:119
↓ 8 callersMethodfind_params
(self, x)
FlatQuant/flatquant/quant_utils.py:150
↓ 7 callersFunctionapply_exact_had_to_linear
(module, had_dim=-1, output=False)
QuaRot/hadamard_utils.py:112
↓ 7 callersMethodquantize
(self, x)
FlatQuant/flatquant/quant_utils.py:214
↓ 6 callersFunctionapply_rotary_pos_emb
Applies Rotary Position Embedding to the query and key tensors. Args: q (`torch.Tensor`): The query tensor. k (`torch.Tensor`): T
SpinQuant/eval_utils/modeling_llama.py:282
↓ 6 callersFunctioncleanup_memory
Clear GPU memory by running garbage collection and emptying cache.
FlatQuant/flatquant/utils.py:26
↓ 6 callersMethodformat
(self, record)
QuaRot/utils.py:57
↓ 6 callersFunctionget_inverse
(matrix)
FlatQuant/flatquant/function_utils.py:35
↓ 6 callersMethodquantize
(self, x)
QuaRot/quant_utils.py:107
↓ 6 callersMethodready
(self)
SpinQuant/utils/quant_utils.py:498
↓ 6 callersMethodready
(self)
QuaRot/quant_utils.py:374
↓ 5 callersMethod_ori_forward
origin implement: down_proj = self.down_proj(self.act_fn(self.gate_proj(x)) * self.up_proj(x))
FlatQuant/flatquant/model_tools/llama31_utils.py:61
↓ 5 callersMethod_ori_forward
origin implement: down_proj = self.down_proj(self.act_fn(self.gate_proj(x)) * self.up_proj(x))
FlatQuant/flatquant/model_tools/qwen_utils.py:65
↓ 5 callersMethod_ori_forward
origin implement: down_proj = self.down_proj(self.act_fn(self.gate_proj(x)) * self.up_proj(x))
FlatQuant/flatquant/model_tools/llama_utils.py:61
↓ 5 callersMethodconfigure
(self, bits, groupsize=-1, sym=False, clip_ratio=1.0)
QuaRot/quant_utils.py:113
↓ 5 callersMethodconfigure
( self, bits, perchannel=False, sym=True, mse=False, norm=2.4, grid=100, maxshrink=
FlatQuant/flatquant/quant_utils.py:133
↓ 5 callersMethodfake_quantize
(self, x)
SpinQuant/utils/quant_utils.py:473
↓ 5 callersFunctionfuse_ln_linear
fuse the linear operations in Layernorm into the adjacent linear blocks.
QuaRot/rotation_utils.py:13
↓ 5 callersFunctionkronecker_matmul
equivalent to had = torch.kron(hadL, hadR) x = x.reshape(-1, had.shape[0]) x = x.matmul(had).reshape(init_shape)
FlatQuant/flatquant/flat_utils.py:6
↓ 5 callersFunctionload_cutlass_ops
Load CUTLASS operations
QuaRot/profiling/compare_with_three_baseline.py:55
↓ 5 callersMethodready
(self)
FlatQuant/flatquant/quant_utils.py:243
↓ 5 callersMethodreparameterize
(self, )
FlatQuant/flatquant/model_tools/llama31_utils.py:76
↓ 5 callersMethodreparameterize
(self, )
FlatQuant/flatquant/model_tools/qwen_utils.py:80
↓ 5 callersMethodreparameterize
(self, )
FlatQuant/flatquant/model_tools/llama_utils.py:76
↓ 4 callersMethod__init__
(self, flat_args, module: MLA)
FlatQuant/flatquant/model_tools/deepseekv3_utils.py:140
↓ 4 callersFunctionget_hadK
(n, transpose=False)
FlatQuant/flatquant/hadamard_utils.py:5
↓ 4 callersFunctionget_had_pow2
(n, norm=True)
FlatQuant/flatquant/hadamard_utils.py:58
↓ 4 callersFunctionget_n_set_parameters_byname
(model, required_names)
FlatQuant/flatquant/function_utils.py:40
↓ 4 callersFunctionhook_factory
(module_name, captured_vals, is_input)
QuaRot/model_utils.py:284
↓ 4 callersFunctionrandom_hadamard_matrix
(size, device)
QuaRot/hadamard_utils.py:89
↓ 4 callersMethodrep_matrix_only
(self, )
FlatQuant/flatquant/model_tools/qwen_utils.py:108
↓ 4 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
SpinQuant/train_utils/modeling_llama_quant.py:355
↓ 4 callersFunctionskip_initialization
()
FlatQuant/flatquant/model_utils.py:77
↓ 4 callersFunctionun_permute
(w, is_query=True)
SpinQuant/utils/convert_to_executorch.py:49
↓ 3 callersMethod__init__
(self, size)
FlatQuant/flatquant/trans_utils.py:9
↓ 3 callersFunctionapply_rotary_pos_emb
Applies Rotary Position Embedding to the query and key tensors. Args: q (`torch.Tensor`): The query tensor. k (`torch.Tensor`): T
SpinQuant/train_utils/modeling_llama_quant.py:284
↓ 3 callersFunctionasym_quant_dequant
(x, scale, zero, maxq)
QuaRot/quant_utils.py:27
↓ 3 callersFunctionasym_quant_dequant
(x, scale, zero, maxq)
FlatQuant/flatquant/quant_utils.py:44
↓ 3 callersFunctioncalculate_memory_usage
Calculate theoretical GPU memory usage
QuaRot/profiling/compare_with_three_baseline.py:15
↓ 3 callersFunctioncheck_gpu
Check GPU compatibility
QuaRot/profiling/compare_with_three_baseline.py:85
↓ 3 callersMethodfree
(self)
SpinQuant/eval_utils/gptq_utils.py:165
↓ 3 callersFunctionfuse_ln_linear
fuse the linear operations in Layernorm into the adjacent linear blocks.
SpinQuant/utils/fuse_norm_utils.py:15
↓ 3 callersFunctionget_hadK
(n, transpose=False)
QuaRot/hadamard_utils.py:5
↓ 3 callersFunctionmatmul_hadU
(X, transpose=False)
FlatQuant/flatquant/hadamard_utils.py:89
↓ 3 callersFunctionmatmul_hadU_cuda
(X, hadK, K)
QuaRot/hadamard_utils.py:96
↓ 3 callersFunctionmatmul_hadU_cuda
(X, hadK, K)
FlatQuant/flatquant/hadamard_utils.py:132
↓ 3 callersFunctionskip_initialization
()
FlatQuant/flatquant/utils.py:21
↓ 3 callersFunctionsym_quant_dequant
(x, scale, maxq)
QuaRot/quant_utils.py:37
↓ 3 callersFunctionsym_quant_dequant
(x, scale, maxq)
FlatQuant/flatquant/quant_utils.py:29
↓ 2 callersMethod__init__
(self)
SpinQuant/utils/quant_utils.py:93
↓ 2 callersMethod__init__
(self)
QuaRot/quant_utils.py:87
↓ 2 callersFunction_prepare_4d_causal_attention_mask_with_cache_position
Creates a causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape `(batch_size, key_value_length)`,
SpinQuant/eval_utils/modeling_llama.py:59
↓ 2 callersFunction_prepare_4d_causal_attention_mask_with_cache_position
Creates a causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape `(batch_size, key_value_length)`,
SpinQuant/train_utils/modeling_llama_quant.py:61
↓ 2 callersMethodapply_trans
(self, weight, qa_trans)
FlatQuant/flatquant/flat_linear.py:35
↓ 2 callersMethodapply_trans
(self, weight, qa_trans)
FlatQuant/flatquant/model_tools/deepseekv3_utils.py:52
↓ 2 callersMethodapply_wclip
(self, weight)
FlatQuant/flatquant/flat_linear.py:28
↓ 2 callersMethodapply_wclip
(self, weight)
FlatQuant/flatquant/model_tools/deepseekv3_utils.py:45
↓ 2 callersFunctionasym_quant
(x, scale, zero, maxq)
SpinQuant/utils/quant_utils.py:32
↓ 2 callersFunctionasym_quant
(x, scale, zero, maxq)
QuaRot/quant_utils.py:18
↓ 2 callersFunctionasym_quant_dequant
(x, scale, zero, maxq)
SpinQuant/utils/quant_utils.py:43
↓ 2 callersFunctionbake_mean_into_linear
This function takes a linear layer and subtracts the means from the weights and biases. This will result in the linear layer performing t
QuaRot/rotation_utils.py:30
↓ 2 callersFunctionbenchmark_dense_gemm_fp16_batch
Benchmark batch FP16 dense GEMM (using PyTorch)
QuaRot/profiling/compare_with_three_baseline.py:254
↓ 2 callersFunctionbenchmark_dense_gemm_int4_batch
Benchmark batch INT4 dense GEMM
QuaRot/profiling/compare_with_three_baseline.py:189
↓ 2 callersFunctionbenchmark_sparse_gemm_batch
Benchmark batch sparse GEMM
QuaRot/profiling/compare_with_three_baseline.py:122
↓ 2 callersMethodconfigure
( self, bits, perchannel: bool = False, sym: bool = True, mse: bool =
SpinQuant/utils/quant_utils.py:309
↓ 2 callersFunctionfind_qlayers
(module, layers=[torch.nn.Linear, ], name='')
FlatQuant/gptq_utils.py:15
↓ 2 callersMethodformat
(self, record)
SpinQuant/utils/utils.py:87
↓ 2 callersMethodfree
(self)
SpinQuant/utils/quant_utils.py:100
↓ 2 callersMethodfree
(self)
QuaRot/quant_utils.py:94
↓ 2 callersMethodfree
(self)
QuaRot/gptq_utils.py:257
↓ 2 callersFunctionget_had108
()
QuaRot/hadamard_utils.py:767
↓ 2 callersFunctionget_had108
()
FlatQuant/flatquant/hadamard_utils.py:805
↓ 2 callersFunctionget_had12
()
QuaRot/hadamard_utils.py:156
↓ 2 callersFunctionget_had12
()
FlatQuant/flatquant/hadamard_utils.py:194
↓ 2 callersFunctionget_had140
()
QuaRot/hadamard_utils.py:1204
↓ 2 callersFunctionget_had140
()
FlatQuant/flatquant/hadamard_utils.py:1242
↓ 2 callersFunctionget_had148
()
QuaRot/hadamard_utils.py:2049
↓ 2 callersFunctionget_had156
()
QuaRot/hadamard_utils.py:2054
↓ 2 callersFunctionget_had156
()
FlatQuant/flatquant/hadamard_utils.py:2087
↓ 2 callersFunctionget_had172
()
QuaRot/hadamard_utils.py:2995
↓ 2 callersFunctionget_had172
()
FlatQuant/flatquant/hadamard_utils.py:3028
↓ 2 callersFunctionget_had20
()
QuaRot/hadamard_utils.py:256
↓ 2 callersFunctionget_had20
()
FlatQuant/flatquant/hadamard_utils.py:294
↓ 2 callersFunctionget_had28
()
QuaRot/hadamard_utils.py:281
↓ 2 callersFunctionget_had28
()
FlatQuant/flatquant/hadamard_utils.py:319
↓ 2 callersFunctionget_had36
()
QuaRot/hadamard_utils.py:396
next →1–100 of 645, ranked by callers