MCPcopy Create free account

hub / github.com/ZinYY/TreeLoRA / functions

Functions425 in github.com/ZinYY/TreeLoRA

Methodbackward
(ctx, do)
utils/flash_attention/triton_flash_att.py:742
Methodbackward
(ctx, do)
utils/flash_attention/triton_flash_att.py:779
Functionbloom_model_postprocess_past_key_value
(past_key_values)
utils/my_peft/utils/other.py:22
Functioncaculate_first_word_accuracy
(results, data)
metrics.py:90
Methodchat_completion
( model, tokenizer, dialogs: List[Dialog], temperature: float = 0.6, t
utils/data/data_utils.py:126
Functioncollate_function
(batch_prompt,demonstrations, task)
inference/ICL.py:97
Functionconvert_linear_layer_to_lora
(model, part_module_name, lora_dim=0,
utils/module/lora.py:89
Functionconvert_lora_to_linear_layer
(model)
utils/module/lora.py:116
Functioncount_parameter
(model)
model/Regular/OGD.py:13
Methoddisable_adapter
Disables the adapter module.
utils/my_peft/peft_model.py:299
Methoddisable_adapter_layers
Disable adapter layers by swapping out AdaptedAttention modules.
utils/my_peft/tuners/adaption_prompt.py:223
Functiondist_results_gather
(generate_ids, pad_token=-1)
inference/ICL.py:231
Methodenable_adapter_layers
Enable adapter layers by swapping in cached AdaptedAttention modules.
utils/my_peft/tuners/adaption_prompt.py:218
Functioneval
(input_sequences, predicted_sequences, ground_truths)
evaluations/eval_20Minuten.py:5
Functioneval
(predicted_sequences, ground_truths)
evaluations/eval_FOMC.py:5
Functioneval
(predicted_sequences, ground_truths)
evaluations/eval_NumGLUE_cm.py:5
Functioneval
(predicted_sequences, ground_truths)
evaluations/eval_PapyrusF.py:13
Functioneval
(predicted_sequences, ground_truths)
evaluations/eval_CStance.py:5
Functioneval
(predicted_sequences, ground_truths)
evaluations/eval_NumGLUE_ds.py:5
Functioneval
(predicted_sequences, ground_truths)
evaluations/eval_BoolQA.py:4
Functioneval
(predicted_sequences, ground_truths)
evaluations/eval_amazon.py:4
Functioneval
(predicted_sequences, ground_truths)
evaluations/eval_yelp.py:4
Functioneval
(predicted_sequences, ground_truths)
evaluations/eval_yahoo.py:4
Functioneval
(predicted_sequences, ground_truths)
evaluations/eval_agnews.py:4
Functioneval
(predicted_sequences, ground_truths)
evaluations/eval_MeetingBank.py:5
Functioneval
(predicted_sequences, ground_truths)
evaluations/eval_ScienceQA.py:25
Functioneval
(predicted_sequences, ground_truths)
evaluations/eval_Py150.py:15
Functioneval
(predicted_sequences, ground_truths)
evaluations/eval_dbpedia.py:4
Methodevaluate
(self, round, infer_task_id, task)
model/Dynamic_network/DualPrompt.py:244
Functionevaluation
(model, eval_dataloader)
training/main.py:493
Functionforward
( self, hidden_states: torch.Tensor, residual: torch.Tensor, alibi: torch.Tens
utils/flash_attention/bloom_flash_att.py:14
Functionforward
Input shape: Batch x Time x Channel attention_mask: [bsz, q_len]
utils/flash_attention/llama_flash_att.py:20
Methodforward
(self, input)
utils/module/lora.py:78
Methodforward
qkv: (batch, seqlen, 3, nheads, headdim) bias: optional, shape broadcastible to (batch, nheads, seqlen, seqlen).
utils/flash_attention/triton_flash_att.py:723
Methodforward
q: (batch, seqlen_q, nheads, headdim) kv: (batch, seqlen_k, 2, nheads, headdim) bias: optional, shape broadcastib
utils/flash_attention/triton_flash_att.py:761
Methodforward
q: (batch_size, seqlen_q, nheads, headdim) k, v: (batch_size, seqlen_k, nheads, headdim) bias: optional, shape br
utils/flash_attention/triton_flash_att.py:800
Methodforward
Forward pass of the model.
utils/my_peft/peft_model.py:292
Methodforward
( self, input_ids=None, attention_mask=None, inputs_embeds=None, label
utils/my_peft/peft_model.py:491
Methodforward
( self, input_ids=None, attention_mask=None, inputs_embeds=None, label
utils/my_peft/peft_model.py:665
Methodforward
( self, input_ids=None, attention_mask=None, inputs_embeds=None, decod
utils/my_peft/peft_model.py:853
Methodforward
( self, input_ids=None, attention_mask=None, inputs_embeds=None, label
utils/my_peft/peft_model.py:1063
Methodforward
(self, *args, **kwargs)
utils/my_peft/utils/other.py:106
Methodforward
(self, indices)
utils/my_peft/tuners/prompt_tuning.py:127
Methodforward
(self, *args, **kwargs)
utils/my_peft/tuners/adalora.py:216
Methodforward
(self, x: torch.Tensor)
utils/my_peft/tuners/adalora.py:482
Methodforward
(self, prefix: torch.Tensor)
utils/my_peft/tuners/prefix_tuning.py:103
Methodforward
(self, x: torch.Tensor)
utils/my_peft/tuners/lora.py:681
Methodforward
(self, x: torch.Tensor)
utils/my_peft/tuners/lora.py:746
Methodforward
(self, indices)
utils/my_peft/tuners/p_tuning.py:161
Methodforward
Forward pass for the adapter which wraps the original LlamaAttention module. "Official" paper implementation: https://github
utils/my_peft/tuners/adaption_prompt.py:302
Functionfsdp_auto_wrap_policy
(model)
utils/my_peft/utils/other.py:145
Methodgenerate
(self, **kwargs)
utils/my_peft/peft_model.py:944
Methodget_answer
(self, sample)
utils/data/raw_datasets.py:70
Methodget_answer
(self, sample)
utils/data/raw_datasets.py:118
Methodget_eval_data
(self)
utils/data/raw_datasets.py:62
Methodget_eval_data
(self)
utils/data/raw_datasets.py:103
Functionget_eval_ds_config
(offload, stage=0)
utils/ds_utils.py:67
Methodget_mask
(self, class_mask, task_id, args, logits)
utils/kd_lora_tree.py:183
Functionget_peft_config
Returns a Peft config object from a dictionary. Args: config_dict (`Dict[str, Any]`): Dictionary containing the configuration parame
utils/my_peft/mapping.py:51
Methodget_peft_config_as_dict
(self, inference: bool = False)
utils/my_peft/tuners/lora.py:299
Methodget_prompt
(self, sample)
utils/data/raw_datasets.py:65
Methodget_prompt
(self, sample)
utils/data/raw_datasets.py:113
Methodget_prompt_and_answer
(self, sample)
utils/data/raw_datasets.py:37
Methodget_prompt_and_answer
(self, sample)
utils/data/raw_datasets.py:75
Methodget_prompt_and_answer
(self, sample)
utils/data/raw_datasets.py:123
Methodget_train_data
(self)
utils/data/raw_datasets.py:59
Methodget_train_data
(self)
utils/data/raw_datasets.py:98
Methodhook
(grad)
model/Regular/EWC.py:91
Functioninit_to_zero
(name)
utils/flash_attention/triton_flash_att.py:482
Functionis_bnb_available
()
utils/my_peft/import_utils.py:18
Functionlambda_policy_fn
(module)
utils/my_peft/utils/other.py:154
Functionlist_of_strings
(arg)
inference/ICL.py:128
Functionlist_of_strings
(arg)
inference/infer_single.py:54
Functionlist_of_strings
(arg)
inference/infer_part.py:70
Functionlist_of_strings
(arg)
training/replay.py:58
Functionlist_of_strings
(arg)
training/main.py:65
Functionllama_compute_query_states
Compute query states for Llama models specifically. They need to be recomputed as the forward() method of the original LlamaModel in the tra
utils/my_peft/tuners/adaption_prompt.py:61
Methodlora_dropout_layer
(x)
utils/my_peft/tuners/adalora.py:338
Functionmake_inputs_require_grad
(module, input, output)
utils/my_peft/utils/other.py:62
Methodmerge
(self)
utils/my_peft/tuners/adalora.py:392
Methodmerge
(self)
utils/my_peft/tuners/lora.py:668
Methodmerge_adapter
(self)
utils/my_peft/tuners/lora.py:327
Methodmerge_and_unload
r""" This method merges the LoRa layers into the base model. This is needed if someone wants to use the base model as a standalone mod
utils/my_peft/tuners/lora.py:347
Functionmoving_average
(model, model_ema, beta=0.992, device=None, zero_stage=0)
utils/utils.py:155
Functiononly_optimize_lora_parameters
(model)
utils/module/lora.py:134
Functionperform_tasl_consolidation
Perform TaSL consolidation for a specific task Args: task_id: ID of the current task output_dir: Directory where models and
utils/TaSL/consolidation.py:158
Methodperplexity_evaluation
(self, eval_dataloader, device)
model/base_model.py:40
Methodprediction
(model, infer_dataloader)
model/Replay/MbPAplusplus.py:242
Methodprediction
(model, infer_dataloader)
model/Dynamic_network/DualPrompt.py:137
Methodprepare_inputs_for_generation
(self, *args, **kwargs)
utils/my_peft/peft_model.py:767
Methodprepare_inputs_for_generation
(self, *args, **kwargs)
utils/my_peft/peft_model.py:984
Functionprepare_model_for_int8_training
r""" This method wraps the entire protocol for preparing a model before running a training. This includes: 1- Cast the layernorm in fp32 2
utils/my_peft/utils/other.py:35
Methodprint_trainable_parameters
Prints the number of trainable parameters in the model.
utils/my_peft/peft_model.py:266
Functionreplace_silu_with_relu
Recursively replace all SiLU activation functions with ReLU in the model.
utils/model/model_utils.py:48
Functionrun_inference
(current_rank, args)
inference/infer_multi_command.py:288
Functionsample_top_p
(probs, p)
utils/data/data_utils.py:88
Methodsave_importance_scores
Save importance scores to a CSV file
utils/TaSL/importance_scorer.py:115
Methodsave_inference_results
(evaluation_result: dict, sources_sequences: list, predicted_sequences: list,
model/Replay/MbPAplusplus.py:313
Methodsave_model
(self, round)
model/lora.py:15
Methodsave_model
(self, round)
model/Regular/O_LoRA.py:178
← previousnext →301–400 of 425, ranked by callers