MCPcopy Create free account

hub / github.com/csguoh/OBR / functions

Functions645 in github.com/csguoh/OBR

Functionadd_wrapper_after_function_call_in_method
This function adds a wrapper after the output of a function call in the method named `method_name`. Only calls directly in the method are aff
SpinQuant/utils/monkeypatch.py:33
Functionadd_wrapper_after_function_call_in_method
This function adds a wrapper after the output of a function call in the method named `method_name`. Only calls directly in the method are af
QuaRot/monkeypatch.py:16
Functionapply_exact_had_to_linear
(module, had_dim=-1, output=False)
FlatQuant/flatquant/hadamard_utils.py:148
Functionapply_flatquant_to_llama
(args, model)
FlatQuant/flatquant/model_tools/llama_utils.py:327
Functionapply_flatquant_to_llama_31
(args, model)
FlatQuant/flatquant/model_tools/llama31_utils.py:319
Functionapply_flatquant_to_qwen
(args, model)
FlatQuant/flatquant/model_tools/qwen_utils.py:323
Methodbackward
(ctx, grad_output)
SpinQuant/utils/quant_utils.py:69
Methodbackward
(ctx, grad_output)
SpinQuant/utils/quant_utils.py:83
Methodbaseline_with_sparsegpt_gptq_obs
(self,percdamp=.01, sparsity_ratio=0.5,prune_n=0, prune_m = 0, blocksize=128,)
SpinQuant/eval_utils/obr_utils.py:109
Methodbaseline_with_sparsegpt_gptq_obs
(self,percdamp=.01, sparsity_ratio=0.5,prune_n=0, prune_m = 0, blocksize=128,)
QuaRot/obr_utils.py:96
Methodbaseline_with_sparsegpt_gptq_obs
(self,percdamp=.01, sparsity_ratio=0.5,prune_n=0, prune_m = 0, blocksize=128,)
FlatQuant/flatquant/obr_utils.py:102
Functionblock_diag_hadamard_matrix
(size, hadamard_size, device)
FlatQuant/flatquant/hadamard_utils.py:123
Functioncali_flat_quant
(args, model, dataloader, dev, logger)
FlatQuant/flatquant/train_utils.py:14
Functioncapture_layer_io
(layer, layer_input)
SpinQuant/utils/model_utils.py:26
Functioncapture_layer_io
(model_type, layer, layer_input)
QuaRot/model_utils.py:283
Functioncheck_params_grad
(model)
FlatQuant/flatquant/function_utils.py:61
Functioncheck_sparsity
(model)
SpinQuant/utils/utils.py:209
Functioncheck_sparsity
(model)
QuaRot/model_utils.py:19
Functioncheck_sparsity
(model)
FlatQuant/flatquant/model_utils.py:13
Methodclear_trans
(self, )
FlatQuant/flatquant/model_tools/deepseekv3_utils.py:302
Methodclear_trans
(self, )
FlatQuant/flatquant/model_tools/deepseekv3_utils.py:362
Methodclear_trans
(self, )
FlatQuant/flatquant/model_tools/deepseekv3_utils.py:491
Functioncompute_intermediate_size
(n)
SpinQuant/utils/convert_to_executorch.py:25
Functionconfig_logging
(log_file, level=logging.INFO)
SpinQuant/utils/utils.py:85
Functioncreate_dense_gemm_int4
Create INT4 dense GEMM instance (compatible with old interface)
QuaRot/profiling/compare_with_three_baseline.py:115
Methodcreate_optimizer_and_scheduler
Setup the optimizer and the learning rate scheduler. We provide a reasonable default that works well. If you want to use something e
SpinQuant/train_utils/fsdp_trainer.py:570
Functioncreate_sparse_gemm
Create sparse GEMM instance (compatible with old interface)
QuaRot/profiling/compare_with_three_baseline.py:100
Functiondistribute_model
Distribute the model across available GPUs. NB: only implemented for Llama-2.
SpinQuant/utils/utils.py:185
Functiondistribute_model
Distribute the model across available GPUs. NB: only implemented for Llama-2.
QuaRot/utils.py:252
Functiondistribute_model
Distribute the model across available GPUs. NB: only implemented for Llama-2/3/Qwen-2.
FlatQuant/flatquant/utils.py:53
Methodenabled
(self)
SpinQuant/utils/quant_utils.py:495
Methodenabled
(self)
QuaRot/quant_utils.py:371
Methodenabled
(self)
FlatQuant/flatquant/quant_utils.py:240
Functioneval_ppl_wikitext_train
(model, trainloader, bs=1, device=None)
SpinQuant/ppl_utils.py:100
Functioneval_ppl_wikitext_train
(model, trainloader, bs=1, device=None)
QuaRot/ppl_utils.py:103
Functioneval_ppl_wikitext_train
(model, trainloader, bs=1, device=None)
FlatQuant/flatquant/ppl_utils.py:105
Functioneval_zero_shot
(model_name, model, tokenizer, task_list=["boolq","rte","hellaswag","winogrande","arc_challenge","arc_easy","o
SpinQuant/ppl_utils.py:201
Functioneval_zero_shot
(model_name, model, tokenizer, task_list=["boolq","rte","hellaswag","winogrande","arc_challenge","arc_easy","o
QuaRot/ppl_utils.py:204
Functioneval_zero_shot
(model_name, model, tokenizer, task_list=["boolq", "rte", "hellaswag", "winogrande", "arc_c
FlatQuant/flatquant/ppl_utils.py:207
Functionevaluator
(model, testenc, dev, args)
SpinQuant/utils/eval_utils.py:21
Functionevaluator
(model, testenc, dev, args)
QuaRot/eval_utils.py:11
Methodextra_repr
(self)
SpinQuant/utils/quant_utils.py:226
Methodextra_repr
(self)
SpinQuant/eval_utils/modeling_llama.py:139
Methodextra_repr
(self)
SpinQuant/train_utils/modeling_llama_quant.py:141
Methodextra_repr
(self)
QuaRot/quant_utils.py:205
Methodfasterquant
( self, blocksize=128, percdamp=.01, groupsize=-1, actorder=False, static_groups=False )
QuaRot/gptq_utils.py:38
Functionfind_qlayers
( module, layers=[torch.nn.Linear, ActQuantWrapper, QuantizeLinear], name: str = "", )
SpinQuant/utils/quant_utils.py:538
Functionfind_qlayers
(module, layers=[torch.nn.Linear, ActQuantWrapper], name='')
QuaRot/quant_utils.py:407
Methodforward
(self, x, transpose=False)
SpinQuant/optimize_rotation.py:35
Methodforward
(ctx, u)
SpinQuant/utils/utils.py:48
Methodforward
(ctx, x, scale, maxq)
SpinQuant/utils/quant_utils.py:63
Methodforward
(ctx, x, scale, zero, maxq)
SpinQuant/utils/quant_utils.py:76
Methodforward
(self, x)
SpinQuant/utils/quant_utils.py:104
Methodforward
(self, x, R1=None, R2=None, transpose=False)
SpinQuant/utils/quant_utils.py:245
Methodforward
(self, inp, **kwargs)
SpinQuant/utils/eval_utils.py:58
Methodforward
(self, inp, **kwargs)
SpinQuant/eval_utils/obr_utils.py:304
Methodforward
(self, *args, **kwargs)
SpinQuant/eval_utils/rotation_utils.py:179
Methodforward
(self, hidden_states)
SpinQuant/eval_utils/modeling_llama.py:132
Methodforward
(self, x, position_ids)
SpinQuant/eval_utils/modeling_llama.py:219
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
SpinQuant/eval_utils/modeling_llama.py:418
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.LongTensor] = None
SpinQuant/eval_utils/modeling_llama.py:564
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
SpinQuant/eval_utils/modeling_llama.py:689
Methodforward
Args: hidden_states (`torch.FloatTensor`): input to the layer of shape `(batch, seq_len, embed_dim)` attention_mask (
SpinQuant/eval_utils/modeling_llama.py:814
Methodforward
( self, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.Tensor] = N
SpinQuant/eval_utils/modeling_llama.py:1047
Methodforward
r""" Args: labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing
SpinQuant/eval_utils/modeling_llama.py:1297
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the sequence classification/regression
SpinQuant/eval_utils/modeling_llama.py:1528
Methodforward
r""" start_positions (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for position (index) of the start of the la
SpinQuant/eval_utils/modeling_llama.py:1657
Methodforward
(self, inp, **kwargs)
SpinQuant/eval_utils/gptq_utils.py:200
Methodforward
(self, *args, **kwargs)
SpinQuant/train_utils/apply_r3_r4.py:76
Methodforward
(self, hidden_states)
SpinQuant/train_utils/modeling_llama_quant.py:134
Methodforward
(self, x, position_ids)
SpinQuant/train_utils/modeling_llama_quant.py:221
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
SpinQuant/train_utils/modeling_llama_quant.py:414
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.LongTensor] = None
SpinQuant/train_utils/modeling_llama_quant.py:561
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
SpinQuant/train_utils/modeling_llama_quant.py:687
Methodforward
Args: hidden_states (`torch.FloatTensor`): input to the layer of shape `(batch, seq_len, embed_dim)` attention_mask (
SpinQuant/train_utils/modeling_llama_quant.py:813
Methodforward
( self, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.Tensor] = N
SpinQuant/train_utils/modeling_llama_quant.py:1048
Methodforward
r""" Args: labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing
SpinQuant/train_utils/modeling_llama_quant.py:1306
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the sequence classification/regression
SpinQuant/train_utils/modeling_llama_quant.py:1544
Methodforward
r""" start_positions (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for position (index) of the start of the la
SpinQuant/train_utils/modeling_llama_quant.py:1673
Methodforward
( self, input: Tensor, R1=None, R2=None, transpose=False, )
SpinQuant/train_utils/quant_linear.py:14
Methodforward
(self, inp, **kwargs)
QuaRot/obr_utils.py:291
Methodforward
(self, x)
QuaRot/quant_utils.py:98
Methodforward
(self, x)
QuaRot/quant_utils.py:216
Methodforward
(self, *args, **kwargs)
QuaRot/rotation_utils.py:285
Methodforward
(self, inp, **kwargs)
QuaRot/eval_utils.py:63
Methodforward
(self, x: torch.Tensor)
QuaRot/model_utils.py:271
Methodforward
(self, inp, **kwargs)
QuaRot/gptq_utils.py:291
Methodforward
(self, inp, **kwargs)
FlatQuant/gptq_utils.py:179
Methodforward
(self, inp, **kwargs)
FlatQuant/flatquant/obr_utils.py:300
Methodforward
(self, x)
FlatQuant/flatquant/quant_utils.py:71
Methodforward
(self, x)
FlatQuant/flatquant/quant_utils.py:237
Methodforward
(self, inp, inv_t=False)
FlatQuant/flatquant/trans_utils.py:21
Methodforward
(self, inp, inv_t=False)
FlatQuant/flatquant/trans_utils.py:85
Methodforward
(self, inp, inv_t=False)
FlatQuant/flatquant/trans_utils.py:136
Methodforward
(self, inp, inv_t=False)
FlatQuant/flatquant/trans_utils.py:190
Methodforward
(self, inp, **kwargs)
FlatQuant/flatquant/train_utils.py:48
Methodforward
(self, hidden_states, qa_trans=None, out_trans=None)
FlatQuant/flatquant/flat_linear.py:69
Methodforward
(self, x)
FlatQuant/flatquant/model_tools/llama31_utils.py:71
Methodforward
(self, hidden_states, attention_mask, position_ids, past_key_value, output_attentions, use_cache,
FlatQuant/flatquant/model_tools/llama31_utils.py:200
Methodforward
(self, x)
FlatQuant/flatquant/model_tools/qwen_utils.py:75
← previousnext →401–500 of 645, ranked by callers