MCPcopy Create free account

hub / github.com/ZinYY/TreeLoRA / functions

Functions425 in github.com/ZinYY/TreeLoRA

↓ 1 callersMethodresize_modules_by_rank_pattern
(self, rank_pattern, adapter_name)
utils/my_peft/tuners/adalora.py:237
↓ 1 callersMethodresize_state_dict_by_rank_pattern
(self, rank_pattern, state_dict, adapter_name)
utils/my_peft/tuners/adalora.py:268
↓ 1 callersMethodretain_grad
(self)
model/Regular/EWC.py:97
↓ 1 callersFunctionsave_consolidated_weights
Save consolidated weights and copy configuration file Args: consolidated_weights: Dictionary of consolidated parameters conf
utils/TaSL/consolidation.py:121
↓ 1 callersMethodsave_grad
(self,name)
model/Regular/EWC.py:90
↓ 1 callersFunctionsave_inference_results
(evaluation_result: dict, sources_sequences: list, predicted_sequences: list, g
inference/infer_multi_command.py:156
↓ 1 callersMethodsave_inference_results
(self, evaluation_result, sources_sequences, predicted_sequences, ground_truths, round, i_task, task)
model/Dynamic_network/DualPrompt.py:230
↓ 1 callersFunctionsave_model
(round)
training/replay.py:455
↓ 1 callersMethodsave_model
(self, round)
model/base_model.py:113
↓ 1 callersMethodsave_model
(self, i_task)
model/Replay/LFPT5.py:171
↓ 1 callersFunctionscore_rouge
(str1, str2)
metrics.py:52
↓ 1 callersFunctionset_peft_model_state_dict
Set the state dict of the Peft model. Args: model ([`PeftModel`]): The Peft model. peft_model_state_dict (`dict`): The state
utils/my_peft/utils/save_and_load.py:113
↓ 1 callersFunctionshift_tokens_right
Shift input ids one token to the right. Args: input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`): input ids
utils/my_peft/utils/other.py:74
↓ 1 callersMethodstore_grads
This stores parameter gradients of past tasks. pp: parameters grads: gradients grad_dims: list with n
model/Regular/GEM.py:25
↓ 1 callersMethodtokenize
(self, sentence, cutoff_len, add_bos_token=True, add_eos_token=True)
inference/HHH/HHH_data_collator.py:26
↓ 1 callersMethodtrain_continual
(self)
model/Regular/EWC.py:142
↓ 1 callersFunctiontrain_one_task
(task, i_task, epochs)
training/replay.py:376
↓ 1 callersMethodtrain_one_task
(self, task, i_task, epochs)
model/base_model.py:63
↓ 1 callersMethodtrain_one_task
(self, task, i_task, epochs)
model/Replay/MbPAplusplus.py:134
↓ 1 callersMethodtrain_one_task
(self, task, i_task, epochs=40)
model/Regular/EWC.py:103
↓ 1 callersMethodtrain_one_task
(self, task, i_task, epochs,
model/Regular/OGD.py:103
↓ 1 callersMethodtrain_step
(self, batch, task)
model/Dynamic_network/DualPrompt.py:69
↓ 1 callersMethodtrain_step
(self, batch)
model/Regular/EWC.py:63
↓ 1 callersMethodtrain_step
(self, batch)
model/Regular/GEM.py:103
↓ 1 callersMethodtrain_step
(self, batch)
model/Regular/OGD.py:93
↓ 1 callersFunctiontransform_json
(input_path, output_path)
assist_scripts/format_json.py:34
↓ 1 callersFunctiontree_lora_loss
(current_grad, all_grad, task_id, prev_id_matrix, multiple_module=True)
utils/kd_lora_tree.py:76
↓ 1 callersMethodtree_search
(self, task_id, device)
utils/kd_lora_tree.py:192
↓ 1 callersMethodunmerge
(self)
utils/my_peft/tuners/adalora.py:410
↓ 1 callersMethodupdate_ipt
(self, model)
utils/my_peft/tuners/adalora.py:575
↓ 1 callersMethodupdate_layer_embedding
(self, adapter_name, r, lora_alpha, lora_dropout, init_lora_weights)
utils/my_peft/tuners/lora.py:487
↓ 1 callersMethodupdate_similarity
Update similarity tensor for selected task indices
utils/kd_lora_tree.py:273
Method__call__
(self, batch, return_tensors=None)
utils/data/data_collator.py:23
Method__call__
(self, batch, return_tensors=None)
inference/HHH/HHH_data_collator.py:18
Method__dict__
(self)
utils/my_peft/utils/config.py:57
Method__getattr__
Forward missing attributes to the wrapped module.
utils/my_peft/peft_model.py:285
Method__getattr__
Forward missing attributes to the wrapped module.
utils/my_peft/tuners/adalora.py:209
Method__getattr__
Forward missing attributes to the wrapped module.
utils/my_peft/tuners/lora.py:292
Method__getattr__
Forward missing attributes to the wrapped module.
utils/my_peft/tuners/adaption_prompt.py:262
Method__getitem__
(self, idx)
utils/data/data_utils.py:234
Method__init__
:param depth: current depth :param grads_tensor: (num_tasks, lora_depth, feature_dim)
utils/kd_lora_tree.py:11
Method__init__
Initialize the KD-tree. Args: points (Tensor): A tensor of shape (N, D) where N is the number of points and D is the dim
utils/kd_lora_tree.py:94
Method__init__
(self)
utils/utils.py:32
Method__init__
( self, model, init_warmup=50, beta1=0.85, beta2=0
utils/TaSL/importance_scorer.py:22
Method__init__
(self, weight, lora_dim=0, lora_scaling=1,
utils/module/lora.py:16
Method__init__
(self, args)
utils/model/model_utils.py:23
Method__init__
(self, prompt_dataset, answer_dataset)
utils/data/data_utils.py:225
Method__init__
(self, output_path, seed, local_rank, dataset_name)
utils/data/raw_datasets.py:53
Method__init__
(self, output_path, seed, local_rank, dataset_name, for_backbone=False)
utils/data/raw_datasets.py:82
Method__init__
(self, model, peft_config: PeftConfig, adapter_name="default")
utils/my_peft/peft_model.py:476
Method__init__
(self, model, peft_config: PeftConfig, adapter_name="default")
utils/my_peft/peft_model.py:661
Method__init__
(self, model, peft_config: PeftConfig, adapter_name="default")
utils/my_peft/peft_model.py:846
Method__init__
(self, model, peft_config: PeftConfig = None, adapter_name="default")
utils/my_peft/peft_model.py:1048
Method__init__
(self, module_to_save, adapter_name)
utils/my_peft/utils/other.py:96
Method__init__
(self, config, word_embeddings)
utils/my_peft/tuners/prompt_tuning.py:103
Method__init__
(self, model, config, adapter_name)
utils/my_peft/tuners/adalora.py:94
Method__init__
( self, in_features: int, out_features: int, )
utils/my_peft/tuners/adalora.py:320
Method__init__
( self, adapter_name, in_features, out_features, r
utils/my_peft/tuners/adalora.py:454
Method__init__
(self, model, peft_config, adapter_name)
utils/my_peft/tuners/adalora.py:526
Method__init__
(self, config)
utils/my_peft/tuners/prefix_tuning.py:85
Method__init__
(self, model, config, adapter_name)
utils/my_peft/tuners/lora.py:151
Method__init__
( self, in_features: int, out_features: int, )
utils/my_peft/tuners/lora.py:441
Method__init__
( self, adapter_name: str, num_embeddings: int, embedding_dim: int, r:
utils/my_peft/tuners/lora.py:634
Method__init__
( self, adapter_name, in_features, out_features, r
utils/my_peft/tuners/lora.py:717
Method__init__
(self, config)
utils/my_peft/tuners/p_tuning.py:114
Method__init__
(self, model, configs: Dict, adapter_name: str)
utils/my_peft/tuners/adaption_prompt.py:151
Method__init__
(self, model, tokenizer, optimizer, train_
model/base_model.py:23
Method__init__
(self, model, tokenizer, optimizer, train_task_list, eval_task_list, test_task_list, args,
model/lora.py:10
Method__init__
(self, model, tokenizer, optimizer, train_task_list, eval_task_list, test_task_list, args, L=10, K_neightbors=
model/Replay/MbPAplusplus.py:114
Method__init__
(self, model, tokenizer, optimizer, train_task_list, eval_task_list, test_task_list, args,
model/Replay/LFPT5.py:45
Method__init__
(self, model, tokenizer, optimizer, train_task_list, eval_task_list, test_task_list, args)
model/Dynamic_network/DualPrompt.py:59
Method__init__
(self,model, tokenizer, optimizer, train_task_list, eval_task_list, test_task_list, args, lambda_ewc=400)
model/Regular/EWC.py:13
Method__init__
(self,model, tokenizer, optimizer, train_task_list, eval_task_list, test_task_list, args)
model/Regular/GEM.py:13
Method__init__
(self, model, tokenizer, optimizer, train_task_list, eval_task_list, test_task_list, args,max_memories=150)
model/Regular/OGD.py:39
Method__init__
(self, model, tokenizer, optimizer, train_task_list, eval_task_list, test_task_list, args,
model/Regular/O_LoRA.py:14
Method__init__
(self, model, tokenizer, optimizer, train_task_list, eval_task_list, test_task_list, args,
model/Regular/HideLoRA.py:14
Method__init__
(self, model, tokenizer, optimizer, train_task_list, eval_task_list, test_task_list, args,
model/Regular/Tree_LoRA.py:17
Method__init__
(self,model, tokenizer, optimizer, train_task_list, eval_task_list, test_task_list, args )
model/Regular/LwF.py:12
Method__init__
(self, model_path)
inference/ICL.py:114
Method__init__
(self, *args, data_file=None, **kwargs)
inference/HHH/data_process.py:7
Method__len__
(self)
utils/data/data_utils.py:231
Method__post_init__
(self)
utils/my_peft/tuners/prompt_tuning.py:61
Method__post_init__
(self)
utils/my_peft/tuners/adalora.py:64
Method__post_init__
(self)
utils/my_peft/tuners/prefix_tuning.py:43
Method__post_init__
(self)
utils/my_peft/tuners/lora.py:90
Method__post_init__
(self)
utils/my_peft/tuners/p_tuning.py:61
Method__post_init__
(self)
utils/my_peft/tuners/adaption_prompt.py:114
Method__str__
(self, level=0)
utils/kd_lora_tree.py:59
Function_bwd_kernel
( Q, K, V, Bias, DO, DQ, DK, DV, LSE, D, softmax_scale, stride_qb, stride_qh, stride_qm,
utils/flash_attention/triton_flash_att.py:507
Function_bwd_preprocess_do_o_dot
( Out, DO, Delta, stride_ob, stride_oh, stride_om, stride_dob, stride_doh, stride_dom, nheads,
utils/flash_attention/triton_flash_att.py:234
Function_fwd_kernel
( Q, K, V, Bias, Out, Lse, TMP, # NOTE: TMP is a scratchpad buffer to workaround a compiler bug s
utils/flash_attention/triton_flash_att.py:67
Method_generate_examples
Yields examples.
inference/HHH/data_process.py:53
Method_info
(self)
inference/HHH/data_process.py:22
Function_prepare_attn_mask
( self, attention_mask: torch.Tensor, input_shape: Tuple[int, int], past_key_values_length: int )
utils/flash_attention/bloom_flash_att.py:92
Function_prepare_decoder_attention_mask
( self, attention_mask, input_shape, inputs_embeds, past_key_values_length )
utils/flash_attention/llama_flash_att.py:108
Method_regular_fisher
(self)
model/Regular/EWC.py:43
Method_split_generators
Returns SplitGenerators.
inference/HHH/data_process.py:32
Methodactive_peft_config
(self)
utils/my_peft/peft_model.py:432
Methodadd_weighted_adapter
(self, adapters, weights, adapter_name)
utils/my_peft/tuners/lora.py:376
Methodapi
(self,prompt)
inference/ICL.py:120
← previousnext →201–300 of 425, ranked by callers