MCPcopy Create free account

hub / github.com/ZinYY/TreeLoRA / functions

Functions425 in github.com/ZinYY/TreeLoRA

↓ 1 callersFunction_prepare_prompt_learning_config
(peft_config, model_config)
utils/my_peft/mapping.py:62
↓ 1 callersFunction_set_adapter
(model, adapter_name)
utils/my_peft/utils/other.py:139
↓ 1 callersMethod_set_budget_scheduler
(self, model)
utils/my_peft/tuners/adalora.py:545
↓ 1 callersMethod_setup_prompt_encoder
(self, adapter_name)
utils/my_peft/peft_model.py:184
↓ 1 callersMethod_update_fisher
(self)
model/Regular/EWC.py:38
↓ 1 callersMethod_update_previous_params
(self)
model/Regular/EWC.py:49
↓ 1 callersFunction_z3_params_to_fetch
(param_list)
utils/module/lora.py:107
↓ 1 callersMethodadd_adapter
(self, adapter_name, config=None)
utils/my_peft/tuners/adalora.py:100
↓ 1 callersMethodadd_adapter
(self, adapter_name, config=None)
utils/my_peft/tuners/lora.py:158
↓ 1 callersMethodadd_adapter
Add an adapter with the given name and config.
utils/my_peft/tuners/adaption_prompt.py:169
↓ 1 callersFunctionadd_task_prompt
Add task prompt and end prompt to each item in the data
assist_scripts/extract_down_sample_datasets.py:88
↓ 1 callersFunctionbleu_score
(reference, hypothesis, gram)
metrics.py:20
↓ 1 callersMethodbudget_schedule
(self, step: int)
utils/my_peft/tuners/adalora.py:556
↓ 1 callersMethodbuild_node
(self, grads_tensor)
utils/kd_lora_tree.py:27
↓ 1 callersFunctioncaculate_f1
(results, data)
metrics.py:131
↓ 1 callersFunctioncaculate_fuzz
(results, data)
metrics.py:147
↓ 1 callersFunctioncaculate_sari
(inputs, results, data)
metrics.py:162
↓ 1 callersMethodcalculate_importance_scores
Calculate and return importance scores
utils/TaSL/importance_scorer.py:92
↓ 1 callersFunctionconsolidate_parameters
Consolidate parameters from current and previous tasks based on importance scores Args: current_weights: Dictionary of current task
utils/TaSL/consolidation.py:58
↓ 1 callersFunctioncreate_dataset
(local_rank, dataset_name, output_path, seed, add_sys_prefix=False, for_backbone=False, sam
utils/data/data_utils.py:265
↓ 1 callersMethoddecoder_call
(self, batch, return_tensors)
utils/data/data_collator.py:62
↓ 1 callersMethoddecoder_call
(self, batch, return_tensors)
inference/HHH/HHH_data_collator.py:55
↓ 1 callersMethoddisable_adapter_layers
(self)
utils/my_peft/tuners/lora.py:316
↓ 1 callersMethodenable_adapter_layers
(self)
utils/my_peft/tuners/lora.py:313
↓ 1 callersMethodend_task
(self, task_id)
utils/kd_lora_tree.py:126
↓ 1 callersMethodevaluate
(self, round)
model/Replay/MbPAplusplus.py:240
↓ 1 callersMethodevaluate_one_task
(self, round, infer_task_id, task)
model/Dynamic_network/DualPrompt.py:127
↓ 1 callersFunctionf1_score
(list1, list2)
metrics.py:113
↓ 1 callersMethodfrom_json_file
r""" Loads a configuration file from a json file. Args: path_json_file (`str`): The path to the json file
utils/my_peft/utils/config.py:121
↓ 1 callersMethodfrom_pretrained
r""" This method loads the configuration of your adapter model from a directory. Args: pretrained_model_name_or_path (`st
utils/my_peft/utils/config.py:87
↓ 1 callersMethodfuse_lora_weight
(self)
utils/module/lora.py:66
↓ 1 callersMethodgenerate_pseudo_data
(self, dataloader, task_name)
model/Replay/LFPT5.py:93
↓ 1 callersFunctiongetInitialPrompt
(tokenizer, prompt_token_number)
model/Replay/LFPT5.py:15
↓ 1 callersMethodget_answer
(self, sample)
utils/data/raw_datasets.py:34
↓ 1 callersFunctionget_cmd
(args, step_num)
train.py:151
↓ 1 callersMethodget_dataloader
(self, task, pseudo_prompts, pseudo_answers)
model/Replay/LFPT5.py:60
↓ 1 callersMethodget_eval_data
(self)
utils/data/raw_datasets.py:26
↓ 1 callersFunctionget_generator
(path)
inference/chatbot.py:32
↓ 1 callersMethodget_keys
(self,batch)
model/Replay/MbPAplusplus.py:126
↓ 1 callersMethodget_lora_param_names
Identify all LoRA parameters in the model
utils/TaSL/importance_scorer.py:54
↓ 1 callersMethodget_loss
(self, _grad_current, loss, task_id, prev_id_matrix)
utils/kd_lora_tree.py:264
↓ 1 callersFunctionget_model_response
(generator, user_input, max_new_tokens)
inference/chatbot.py:68
↓ 1 callersMethodget_neighbours
Returns samples from buffer using nearest neighbour approach
model/Replay/MbPAplusplus.py:75
↓ 1 callersFunctionget_optimizer
(model)
training/replay.py:335
↓ 1 callersFunctionget_optimizer
(model)
training/main.py:517
↓ 1 callersFunctionget_peft_model_state_dict
Get the state dict of the Peft model. Args: model ([`PeftModel`]): The Peft model. When using torch.nn.DistributedDataParallel, Deep
utils/my_peft/utils/save_and_load.py:22
↓ 1 callersMethodget_prompt
(self, sample)
utils/data/raw_datasets.py:30
↓ 1 callersMethodget_prompt_embedding_to_save
Returns the prompt embedding to save when saving the model. Only applicable when `peft_config.peft_type != PeftType.LORA`.
utils/my_peft/peft_model.py:219
↓ 1 callersFunctionget_random_demonstrations
(dem_num, infer_dataset, length_limit, task)
inference/ICL.py:324
↓ 1 callersFunctionget_random_demonstrations
(dem_num, infer_dataset, length_limit, task, tokenizer)
inference/infer_part.py:173
↓ 1 callersFunctionget_raw_dataset
(dataset_name, output_path, seed, local_rank, for_backbone=False)
utils/data/data_utils.py:213
↓ 1 callersFunctionget_task_name
Extract task name from file path
assist_scripts/extract_down_sample_datasets.py:79
↓ 1 callersMethodget_test_data
(self)
utils/data/raw_datasets.py:108
↓ 1 callersMethodget_train_data
(self)
utils/data/raw_datasets.py:23
↓ 1 callersFunctionget_user_input
(user_input)
inference/chatbot.py:61
↓ 1 callersMethodinit_fisher
(self)
model/Regular/EWC.py:32
↓ 1 callersMethodinsert_grad
(self, _grad_current)
utils/kd_lora_tree.py:173
↓ 1 callersFunctionis_adaption_prompt_trainable
Return True if module is trainable under adaption prompt fine-tuning.
utils/my_peft/tuners/adaption_prompt.py:99
↓ 1 callersFunctionis_serializable
(obj)
training/main.py:608
↓ 1 callersFunctionlaunch_cmd
(args, step_num, cmd)
train.py:168
↓ 1 callersFunctionllama_apply_rotary_pos_emb
Apply rotary position embedding to query states in the Llama model. This function was adapted from: https://github.com/huggingface/trans
utils/my_peft/tuners/adaption_prompt.py:44
↓ 1 callersFunctionllama_rotate_half
Rotate half the hidden dims of the input. This function was duplicated verbatim from: https://github.com/huggingface/transformers/blob/1
utils/my_peft/tuners/adaption_prompt.py:29
↓ 1 callersMethodload_adapter
(self, model_id, adapter_name, is_trainable=False, **kwargs)
utils/my_peft/peft_model.py:344
↓ 1 callersFunctionload_json
(file_path)
assist_scripts/extract_down_sample_datasets.py:61
↓ 1 callersFunctionmain
(args)
train.py:186
↓ 1 callersFunctionmain
()
inference/ICL.py:209
↓ 1 callersFunctionmain
(args)
inference/chatbot.py:85
↓ 1 callersFunctionmain
()
inference/infer_single.py:146
↓ 1 callersFunctionmain
()
inference/infer_multi_command.py:146
↓ 1 callersFunctionmain
()
inference/infer_part.py:207
↓ 1 callersFunctionmain
()
training/replay.py:202
↓ 1 callersFunctionmain
()
training/main.py:246
↓ 1 callersMethodmask_to_budget
(self, model, budget)
utils/my_peft/tuners/adalora.py:600
↓ 1 callersMethodmask_using_rank_pattern
(self, model, rank_pattern)
utils/my_peft/tuners/adalora.py:664
↓ 1 callersMethodnew_epoch_init
(self, train_dataloader_len)
utils/kd_lora_tree.py:117
↓ 1 callersMethodnew_input_old_model_logits
(self, i_task)
model/Regular/LwF.py:38
↓ 1 callersFunctionorthonormalize
(vectors, normalize=True, start_idx=0)
model/Regular/OGD.py:16
↓ 1 callersFunctionparse_args
()
train.py:45
↓ 1 callersFunctionparse_args
()
inference/ICL.py:127
↓ 1 callersFunctionparse_args
()
inference/chatbot.py:17
↓ 1 callersFunctionparse_args
()
inference/infer_single.py:53
↓ 1 callersFunctionparse_args
()
inference/infer_multi_command.py:32
↓ 1 callersFunctionparse_args
()
inference/infer_part.py:69
↓ 1 callersFunctionparse_args
()
training/replay.py:57
↓ 1 callersFunctionparse_args
()
training/main.py:64
↓ 1 callersFunctionparse_results_dir
(dir_path, inference_tasks)
inference/collect_results.py:49
↓ 1 callersMethodpenalty
(self)
model/Regular/EWC.py:54
↓ 1 callersFunctionprediction
(model, infer_dataloader)
inference/infer_single.py:152
↓ 1 callersFunctionprediction
(model, infer_dataloader)
inference/infer_part.py:213
↓ 1 callersFunctionprepare_config
Prepare the config based on the llama model type.
utils/my_peft/tuners/adaption_prompt.py:118
↓ 1 callersFunctionprocess_dataset
(root_dir)
assist_scripts/extract_down_sample_datasets.py:110
↓ 1 callersFunctionprocess_directory
(directory_path)
assist_scripts/format_json.py:53
↓ 1 callersFunctionprocess_response
(response, num_rounds)
inference/chatbot.py:73
↓ 1 callersMethodproject2cone2
Solves the GEM dual QP described in the paper given a proposed gradient "gradient", and a memory of task gradients "memories"
model/Regular/GEM.py:43
↓ 1 callersMethodproject_vec
(self,gradient)
model/Regular/OGD.py:56
↓ 1 callersMethodpush
Add the examples as key-value pairs to the memory dictionary with content,attention_mask,label tuple as value and key determined by k
model/Replay/MbPAplusplus.py:42
↓ 1 callersFunctionrandom_sample
Randomly sample n items from data. If data has fewer items than n, return all data
assist_scripts/extract_down_sample_datasets.py:72
↓ 1 callersFunctionreplay
(i_task, epochs)
training/replay.py:404
↓ 1 callersMethodreplay_with_neighbors
(self, R_input_ids, R_attn_masks, R_labels, base_weights)
model/Replay/MbPAplusplus.py:203
↓ 1 callersMethodreset_lora_parameters
(self, adapter_name)
utils/my_peft/tuners/adalora.py:358
← previousnext →101–200 of 425, ranked by callers