MCPcopy Create free account

hub / github.com/JIA-Lab-research/LongLoRA / functions

Functions157 in github.com/JIA-Lab-research/LongLoRA

↓ 7 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
pdf2txt/beit.py:59
↓ 7 callersFunctionapply_rotary_pos_emb
(q, k, cos, sin, position_ids)
gptneox_attn_replace.py:21
↓ 7 callersFunctionreplace_llama_attn
(use_flash_attn=True, use_full=False, inference=False)
llama_attn_replace.py:460
↓ 6 callersFunctionrotate_half
Rotates half the hidden dims of the input.
gptneox_attn_replace.py:15
↓ 4 callersFunction_cfg
(url='', **kwargs)
pdf2txt/beit.py:33
↓ 4 callersFunctionapply_rotary_pos_emb_single
(x, cos, sin, position_ids)
streaming_llm/pos_shift/modify_llama.py:26
↓ 4 callersMethodis_first_device
(self)
eval_distributed.py:115
↓ 3 callersMethodcompute
(self)
eval_distributed.py:82
↓ 3 callersFunctionreplace_gpt_neox_attn
(use_flash_attn=True, use_full=False)
gptneox_attn_replace.py:191
↓ 3 callersFunctionshift
(qkv, bsz, q_len, group_size, num_heads, head_dim)
llama_attn_replace.py:287
↓ 3 callersFunctionshift
(qkv, num_heads, head_dim)
gptneox_attn_replace.py:145
↓ 3 callersFunctionshift
(qkv, bsz, q_len, group_size, num_heads, head_dim)
llama_attn_replace_sft.py:293
↓ 2 callersFunctionapply_rotary_pos_emb_single
(x, cos, sin, position_ids)
streaming_llm/pos_shift/modify_gpt_neox.py:20
↓ 2 callersMethodforward
(self, x)
pdf2txt/beit.py:68
↓ 2 callersMethodforward_features
(self, x)
pdf2txt/beit.py:564
↓ 2 callersFunctioniceildiv
(x, y)
eval.py:53
↓ 2 callersFunctionreplace_llama_attn
(use_flash_attn=True, use_full=False, inference=False)
llama_attn_replace_sft.py:466
↓ 1 callersFunction_make_r_io_base
(f, mode: str)
supervised-fine-tune-qlora.py:41
↓ 1 callersFunction_make_r_io_base
(f, mode: str)
supervised-fine-tune.py:40
↓ 1 callersMethod_prepare_dataloader
(self, dataset: Dataset)
eval_distributed.py:118
↓ 1 callersFunction_tokenize_fn
Tokenize a list of strings.
supervised-fine-tune-qlora.py:139
↓ 1 callersFunction_tokenize_fn
Tokenize a list of strings.
supervised-fine-tune.py:138
↓ 1 callersMethodadd
(self, logits: torch.FloatTensor, labels: torch.LongTensor, model_output: object)
eval_distributed.py:78
↓ 1 callersFunctionadd_vit_config
Add config for VIT.
pdf2txt/config.py:4
↓ 1 callersFunctionapply_rotary_pos_emb_inference
(q, k, cos_sin, position_ids)
llama_attn_replace.py:350
↓ 1 callersFunctionapply_rotary_pos_emb_inference
(q, k, cos_sin, position_ids)
llama_attn_replace_sft.py:356
↓ 1 callersFunctionbuild_VIT_backbone
Create a VIT instance from config. Args: cfg: a detectron2 CfgNode Returns: A VIT backbone instance.
pdf2txt/backbone.py:111
↓ 1 callersFunctionbuild_generator
( model, tokenizer, temperature=0.6, top_p=0.9, max_gen_len=4096, use_cache=True )
inference-qlora.py:50
↓ 1 callersFunctionbuild_generator
( model, tokenizer, temperature=0.6, top_p=0.9, max_gen_len=4096, use_cache=True )
inference.py:50
↓ 1 callersFunctionbuild_generator
( model, tokenizer, temperature=0.6, top_p=0.9, max_gen_len=4096, use_cache=True )
demo.py:84
↓ 1 callersFunctionddp_setup
()
eval_distributed.py:262
↓ 1 callersFunctiondetect_objects
(image_path, predictor, cfg)
pdf2txt/pdf2txt.py:48
↓ 1 callersFunctionenable_falcon_pos_shift_attention
(model)
streaming_llm/pos_shift/modify_falcon.py:152
↓ 1 callersFunctionenable_gpt_neox_pos_shift_attention
(model)
streaming_llm/pos_shift/modify_gpt_neox.py:99
↓ 1 callersFunctionenable_llama_pos_shift_attention
(model, use_flash_attn=True)
streaming_llm/pos_shift/modify_llama.py:301
↓ 1 callersFunctionenable_streaming_llm
(model, start_size, recent_size, use_flash_attn=True)
streaming_llm/enable_streaming_llm.py:4
↓ 1 callersFunctionevaluate
(model, data, batch_size, device, seq_length, sliding_window=256, use_cache=False)
eval.py:56
↓ 1 callersMethodevaluate
(self, dataset: Dataset, metric: EvalMetric)
eval_distributed.py:98
↓ 1 callersMethodevict_for_space
(self, past_key_values, num_coming)
streaming_llm/kv_cache.py:66
↓ 1 callersMethodfix_init_weight
(self)
pdf2txt/beit.py:506
↓ 1 callersFunctiongenerate_prompt_landmark
Generates a text file and inserts an passkey at a random position.
passkey_retrivial.py:43
↓ 1 callersFunctionget_as_batch
(data, seq_length, batch_size, device='cpu', sliding_window=256)
eval.py:40
↓ 1 callersFunctionget_forward_function
(use_flash_attn=True, use_full=False)
gptneox_attn_replace.py:83
↓ 1 callersFunctiongreedy_generate
(model, tokenizer, input_ids, past_key_values, max_gen_len)
run_streaming_llama_longalpaca.py:19
↓ 1 callersFunctionjload
Load a .json file into a dictionary.
supervised-fine-tune-qlora.py:46
↓ 1 callersFunctionjload
Load a .json file into a dictionary.
supervised-fine-tune.py:45
↓ 1 callersFunctionload
(model_name_or_path)
streaming_llm/utils.py:51
↓ 1 callersFunctionmain
(args)
eval.py:113
↓ 1 callersFunctionmain
(args)
passkey_retrivial.py:89
↓ 1 callersFunctionmain
(cmd_args: list[str] = None)
eval_distributed.py:266
↓ 1 callersFunctionmain
(args)
run_streaming_llama_longalpaca.py:78
↓ 1 callersFunctionmain
(args)
get_trainable_weights.py:27
↓ 1 callersFunctionmain
(args)
inference-qlora.py:74
↓ 1 callersFunctionmain
(args)
inference.py:74
↓ 1 callersFunctionmain
(args)
merge_lora_weights_and_save_hf_model.py:60
↓ 1 callersFunctionmain
(args)
demo.py:124
↓ 1 callersFunctionmake_supervised_data_module
Make dataset and collator for supervised fine-tuning.
supervised-fine-tune-qlora.py:228
↓ 1 callersFunctionmake_supervised_data_module
Make dataset and collator for supervised fine-tuning.
supervised-fine-tune.py:227
↓ 1 callersMethodnum_tokens
(self)
eval_distributed.py:72
↓ 1 callersFunctionparse_config
()
eval.py:27
↓ 1 callersFunctionparse_config
()
passkey_retrivial.py:29
↓ 1 callersFunctionparse_config
()
get_trainable_weights.py:19
↓ 1 callersFunctionparse_config
()
inference-qlora.py:27
↓ 1 callersFunctionparse_config
()
inference.py:27
↓ 1 callersFunctionparse_config
()
merge_lora_weights_and_save_hf_model.py:28
↓ 1 callersFunctionparse_config
()
demo.py:15
↓ 1 callersFunctionpasskey_retrieval_test
(model, tokenizer, device, use_cache=False, n_garbage=60000, seed=666)
passkey_retrivial.py:70
↓ 1 callersFunctionpreprocess
Preprocess the data by tokenizing.
supervised-fine-tune-qlora.py:163
↓ 1 callersFunctionpreprocess
Preprocess the data by tokenizing.
supervised-fine-tune.py:162
↓ 1 callersFunctionprocess_pdf
(pdf_file, outputs_dir, config_file)
pdf2txt/pdf2txt.py:77
↓ 1 callersFunctionread_txt_file
(material_txt)
inference-qlora.py:41
↓ 1 callersFunctionread_txt_file
(material_txt)
inference.py:41
↓ 1 callersFunctionread_txt_file
(material_txt)
demo.py:77
↓ 1 callersFunctionrun_eval
(args: EvalArguments)
eval_distributed.py:191
↓ 1 callersFunctionsmart_tokenizer_and_embedding_resize
Resize tokenizer and embedding. Note: This is the unoptimized version that may make your embedding size not be divisible by 64.
fine-tune.py:71
↓ 1 callersFunctionsmart_tokenizer_and_embedding_resize
Resize tokenizer and embedding. Note: This is the unoptimized version that may make your embedding size not be divisible by 64.
supervised-fine-tune-qlora.py:116
↓ 1 callersFunctionsmart_tokenizer_and_embedding_resize
Resize tokenizer and embedding. Note: This is the unoptimized version that may make your embedding size not be divisible by 64.
merge_lora_weights_and_save_hf_model.py:38
↓ 1 callersFunctionsmart_tokenizer_and_embedding_resize
Resize tokenizer and embedding. Note: This is the unoptimized version that may make your embedding size not be divisible by 64.
supervised-fine-tune.py:115
↓ 1 callersFunctionstreaming_inference
(model, tokenizer, prompts, kv_cache=None, max_gen_len=1000)
run_streaming_llama_longalpaca.py:61
↓ 1 callersFunctiontrain
()
fine-tune.py:104
↓ 1 callersFunctiontrain
()
supervised-fine-tune-qlora.py:235
↓ 1 callersFunctiontrain
()
supervised-fine-tune.py:234
Method__call__
(self, instances: Sequence[Dict])
supervised-fine-tune-qlora.py:215
Method__call__
(self, instances: Sequence[Dict])
supervised-fine-tune.py:214
Method__call__
(self, past_key_values)
streaming_llm/kv_cache.py:40
Method__getitem__
(self, index)
eval_distributed.py:60
Method__getitem__
(self, i)
supervised-fine-tune-qlora.py:205
Method__getitem__
(self, i)
supervised-fine-tune.py:204
Method__init__
(self, data_path: str, seq_length: int, sliding_window: int = 256)
eval_distributed.py:47
Method__init__
(self, model: Union[PreTrainedModel, nn.Module], batch_size: int,
eval_distributed.py:87
Method__init__
(self, vocab_size: int, gpu_id: int)
eval_distributed.py:129
Method__init__
(self, data_path: str, tokenizer: transformers.PreTrainedTokenizer)
supervised-fine-tune-qlora.py:181
Method__init__
(self, data_path: str, tokenizer: transformers.PreTrainedTokenizer)
supervised-fine-tune.py:180
Method__init__
(self, drop_prob=None)
pdf2txt/beit.py:47
Method__init__
( self, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0., proj_drop=0., w
pdf2txt/beit.py:79
Method__init__
(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_scale=None, drop=0., attn_drop=0., dr
pdf2txt/beit.py:211
Method__init__
(self, img_size=[224, 224], patch_size=16, in_chans=3, embed_dim=768)
pdf2txt/beit.py:247
Method__init__
(self, backbone, img_size=[224, 224], feature_size=None, in_chans=3, embed_dim=768)
pdf2txt/beit.py:285
Method__init__
(self, window_size, num_heads)
pdf2txt/beit.py:318
Method__init__
(self, img_size=[224, 224], patch_size=16, in_chans=3,
pdf2txt/beit.py:402
next →1–100 of 157, ranked by callers