MCPcopy Create free account

hub / github.com/OpenMOSS/rope_pp / functions

Functions305 in github.com/OpenMOSS/rope_pp

↓ 12 callersMethodget_step_eye
(self, _param)
rope_pp/modeling_llama_fope.py:736
↓ 11 callersMethod__init__
(self, config)
rope_pp/modeling_llama_fope.py:851
↓ 11 callersFunctionrotate_half
Rotates half the hidden dims of the input.
rope_pp/modeling_llama_mask.py:123
↓ 11 callersFunctionrotate_half
Rotates half the hidden dims of the input.
rope_pp/modeling_llama_rope_pp.py:131
↓ 9 callersMethod__init__
(self, config)
rope_pp/modeling_llama_pythia.py:169
↓ 9 callersMethod__init__
(self, config)
rope_pp/modeling_llama_alibi.py:163
↓ 9 callersMethod__init__
(self, config)
rope_pp/modeling_llama_mask.py:131
↓ 9 callersMethod__init__
(self, config)
rope_pp/modeling_llama_rope_pp.py:139
↓ 8 callersFunction_non_meta_init_device
(config: LlamaConfig)
rope_pp/modeling_llama_fope.py:191
↓ 4 callersMethod_maybe_expand_pos_h
(self, pos: torch.Tensor, target_h: int)
rope_pp/modeling_llama_fope.py:666
↓ 4 callersMethodrotate_half
(self, x: torch.Tensor)
rope_pp/modeling_llama_fope.py:510
↓ 3 callersFunction_convert_base_messages
(inputs)
rope_pp/pythia_wrapper.py:67
↓ 3 callersFunction_convert_base_messages
(inputs)
rope_pp/mask_wrapper.py:67
↓ 3 callersFunction_convert_base_messages
(inputs)
rope_pp/rope_pp_wrapper.py:67
↓ 3 callersFunction_convert_base_messages
(inputs)
rope_pp/alibi_wrapper.py:67
↓ 3 callersFunction_convert_base_messages
(inputs)
rope_pp/fope_wrapper.py:67
↓ 3 callersMethod_expand_coef_for_heads
(self, coef: torch.Tensor, h_in: int)
rope_pp/modeling_llama_fope.py:651
↓ 2 callersMethodapply_rotary_pos_emb
(self, pos_sin: torch.Tensor, pos_cos: torch.Tensor, t: torch.Tensor, inverse: bool = False)
rope_pp/modeling_llama_fope.py:522
↓ 2 callersMethodextra_pi
(self, inv_freq = None)
rope_pp/modeling_llama_fope.py:333
↓ 2 callersMethodextra_yarn
(self, inv_freq = None)
rope_pp/modeling_llama_fope.py:299
↓ 2 callersMethodget_inv_freq
(self, dim: int, device: torch.device)
rope_pp/modeling_llama_fope.py:342
↓ 2 callersMethodget_rotary_embedding
( self, seq_len: int, device: torch.device, layer_idx: Optional[int] = None
rope_pp/modeling_llama_fope.py:444
↓ 2 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
rope_pp/modeling_llama_pythia.py:184
↓ 2 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
rope_pp/modeling_llama_alibi.py:178
↓ 2 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
rope_pp/modeling_llama_fope.py:866
↓ 2 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
rope_pp/modeling_llama_mask.py:146
↓ 2 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
rope_pp/modeling_llama_rope_pp.py:154
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
rope_pp/modeling_llama_pythia.py:126
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
rope_pp/modeling_llama_alibi.py:128
↓ 1 callersFunction_get_stopping_criteria
(stop_words, tokenizer, batch_size)
rope_pp/pythia_wrapper.py:21
↓ 1 callersFunction_get_stopping_criteria
(stop_words, tokenizer, batch_size)
rope_pp/mask_wrapper.py:21
↓ 1 callersFunction_get_stopping_criteria
(stop_words, tokenizer, batch_size)
rope_pp/rope_pp_wrapper.py:21
↓ 1 callersFunction_get_stopping_criteria
(stop_words, tokenizer, batch_size)
rope_pp/alibi_wrapper.py:21
↓ 1 callersFunction_get_stopping_criteria
(stop_words, tokenizer, batch_size)
rope_pp/fope_wrapper.py:21
↓ 1 callersMethod_load_model
(self, path: str, kwargs: dict, peft_path: Optional[str] = None, peft_kwargs: dict = dict())
rope_pp/pythia_wrapper.py:134
↓ 1 callersMethod_load_model
(self, path: str, kwargs: dict, peft_path: Optional[str] = None, peft_kwargs: dict = dict())
rope_pp/mask_wrapper.py:139
↓ 1 callersMethod_load_model
(self, path: str, kwargs: dict, peft_path: Optional[str] = None, peft_kwargs: dict = dict())
rope_pp/rope_pp_wrapper.py:139
↓ 1 callersMethod_load_model
(self, path: str, kwargs: dict, peft_path: Optional[str] = None, peft_kwargs: dict = dict())
rope_pp/alibi_wrapper.py:135
↓ 1 callersMethod_load_model
(self, path: str, kwargs: dict, peft_path: Optional[str] = None, peft_kwargs: dict = dict())
rope_pp/fope_wrapper.py:140
↓ 1 callersMethod_prepare_4d_causal_attention_mask_with_cache_position
Creates a causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape `(batch_size, key_value_l
rope_pp/modeling_llama_pythia.py:680
↓ 1 callersMethod_prepare_4d_causal_attention_mask_with_cache_position
Creates a causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape `(batch_size, key_value_l
rope_pp/modeling_llama_alibi.py:797
↓ 1 callersMethod_prepare_4d_causal_attention_mask_with_cache_position
Creates a causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape `(batch_size, key_value_l
rope_pp/modeling_llama_fope.py:1453
↓ 1 callersMethod_prepare_4d_causal_attention_mask_with_cache_position
Creates a causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape `(batch_size, key_value_l
rope_pp/modeling_llama_mask.py:712
↓ 1 callersMethod_prepare_4d_causal_attention_mask_with_cache_position
Creates a causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape `(batch_size, key_value_l
rope_pp/modeling_llama_rope_pp.py:713
↓ 1 callersFunction_set_model_kwargs_torch_dtype
(model_kwargs)
rope_pp/pythia_wrapper.py:80
↓ 1 callersFunction_set_model_kwargs_torch_dtype
(model_kwargs)
rope_pp/mask_wrapper.py:80
↓ 1 callersFunction_set_model_kwargs_torch_dtype
(model_kwargs)
rope_pp/rope_pp_wrapper.py:80
↓ 1 callersFunction_set_model_kwargs_torch_dtype
(model_kwargs)
rope_pp/alibi_wrapper.py:80
↓ 1 callersFunction_set_model_kwargs_torch_dtype
(model_kwargs)
rope_pp/fope_wrapper.py:80
↓ 1 callersMethod_update_causal_mask
( self, attention_mask: torch.Tensor, input_tensor: torch.Tensor, cache_positi
rope_pp/modeling_llama_pythia.py:609
↓ 1 callersMethod_update_causal_mask
( self, attention_mask: torch.Tensor, input_tensor: torch.Tensor, cache_positi
rope_pp/modeling_llama_alibi.py:726
↓ 1 callersMethod_update_causal_mask
( self, attention_mask: torch.Tensor, input_tensor: torch.Tensor, cache_positi
rope_pp/modeling_llama_fope.py:1382
↓ 1 callersMethod_update_causal_mask
( self, attention_mask: torch.Tensor, input_tensor: torch.Tensor, cache_positi
rope_pp/modeling_llama_mask.py:641
↓ 1 callersMethod_update_causal_mask
( self, attention_mask: torch.Tensor, input_tensor: torch.Tensor, cache_positi
rope_pp/modeling_llama_rope_pp.py:642
↓ 1 callersFunctionapply_rotary_pos_emb
Applies Rotary Position Embedding to the query and key tensors. Args: q (`torch.Tensor`): The query tensor. k (`torch.Tensor`): T
rope_pp/modeling_llama_pythia.py:133
↓ 1 callersMethodapply_rotary_pos_emb
(self, q, k, cos, sin, unsqueeze_dim=1)
rope_pp/modeling_llama_mask.py:233
↓ 1 callersMethodapply_rotary_pos_emb
(self, q, k, cos, sin, unsqueeze_dim=1)
rope_pp/modeling_llama_rope_pp.py:241
↓ 1 callersMethodget_alibi_slopes
(self, nheads)
rope_pp/modeling_llama_alibi.py:339
↓ 1 callersMethodget_ppl
Get perplexity scores given a list of inputs. Args: inputs (List[str]): A list of strings. mask_length (Optional[List
rope_pp/pythia_wrapper.py:210
↓ 1 callersMethodget_ppl
Get perplexity scores given a list of inputs. Args: inputs (List[str]): A list of strings. mask_length (Optional[List
rope_pp/mask_wrapper.py:216
↓ 1 callersMethodget_ppl
Get perplexity scores given a list of inputs. Args: inputs (List[str]): A list of strings. mask_length (Optional[List
rope_pp/rope_pp_wrapper.py:220
↓ 1 callersMethodget_ppl
Get perplexity scores given a list of inputs. Args: inputs (List[str]): A list of strings. mask_length (Optional[List
rope_pp/alibi_wrapper.py:211
↓ 1 callersMethodget_ppl
Get perplexity scores given a list of inputs. Args: inputs (List[str]): A list of strings. mask_length (Optional[List
rope_pp/fope_wrapper.py:220
↓ 1 callersMethodget_token_len
(self, prompt: str, add_special_tokens: bool=True)
rope_pp/pythia_wrapper.py:277
↓ 1 callersMethodget_token_len
(self, prompt: str, add_special_tokens: bool=True)
rope_pp/mask_wrapper.py:283
↓ 1 callersMethodget_token_len
(self, prompt: str, add_special_tokens: bool=True)
rope_pp/rope_pp_wrapper.py:287
↓ 1 callersMethodget_token_len
(self, prompt: str, add_special_tokens: bool=True)
rope_pp/alibi_wrapper.py:278
↓ 1 callersMethodget_token_len
(self, prompt: str, add_special_tokens: bool=True)
rope_pp/fope_wrapper.py:287
↓ 1 callersMethodreset_parameters
(self)
rope_pp/modeling_llama_fope.py:746
Method__call__
(self, input_ids, scores, **kwargs)
rope_pp/pythia_wrapper.py:36
Method__call__
(self, input_ids, scores, **kwargs)
rope_pp/mask_wrapper.py:36
Method__call__
(self, input_ids, scores, **kwargs)
rope_pp/rope_pp_wrapper.py:36
Method__call__
(self, input_ids, scores, **kwargs)
rope_pp/alibi_wrapper.py:36
Method__call__
(self, input_ids, scores, **kwargs)
rope_pp/fope_wrapper.py:36
Method__getitem__
(self, _)
utils/dataset_utils.py:65
Method__getitem__
(self, _)
utils/dataset_utils.py:152
Method__getitem__
(self, idx)
utils/dataset_utils.py:205
Method__init__
(self, data_root, tokenizer, label_name, train_length=4096, min_length=512, num_data=-1, seed=42, dataset_ckpt
utils/dataset_utils.py:19
Method__init__
(self, data_root, tokenizer, label_name, train_length=4096, min_length=512, num_data=-1, seed=42, dataset_ckpt
utils/dataset_utils.py:106
Method__init__
(self, dataset, tokenizer, label_name, valid_length=4096)
utils/dataset_utils.py:193
Method__init__
(self, max_steps, batch_size, max_length, world_size, valid_dataset_abbr, logging_steps=10)
utils/callback_utils.py:15
Method__init__
(self, steps_to_save)
utils/callback_utils.py:73
Method__init__
(self, stop_words: List[str], tokenizer, batch_size: int)
rope_pp/pythia_wrapper.py:27
Method__init__
(self, path: str, model_kwargs: dict = dict(), tokenizer_pa
rope_pp/pythia_wrapper.py:100
Method__init__
LlamaRMSNorm is equivalent to T5LayerNorm
rope_pp/modeling_llama_pythia.py:70
Method__init__
(self, config: LlamaConfig, device=None)
rope_pp/modeling_llama_pythia.py:93
Method__init__
(self, config: LlamaConfig, layer_idx: int)
rope_pp/modeling_llama_pythia.py:225
Method__init__
(self, config: LlamaConfig, layer_idx: int)
rope_pp/modeling_llama_pythia.py:299
Method__init__
(self, config: LlamaConfig)
rope_pp/modeling_llama_pythia.py:478
Method__init__
(self, config)
rope_pp/modeling_llama_pythia.py:746
Method__init__
(self, config)
rope_pp/modeling_llama_pythia.py:880
Method__init__
(self, config)
rope_pp/modeling_llama_pythia.py:976
Method__init__
(self, config)
rope_pp/modeling_llama_pythia.py:1054
Method__init__
LlamaRMSNorm is equivalent to T5LayerNorm
rope_pp/modeling_llama_alibi.py:72
Method__init__
(self, config: LlamaConfig, device=None)
rope_pp/modeling_llama_alibi.py:95
Method__init__
(self, config: "LlamaConfig", layer_idx: int)
rope_pp/modeling_llama_alibi.py:314
Method__init__
(self, config: LlamaConfig, layer_idx: int)
rope_pp/modeling_llama_alibi.py:416
Method__init__
(self, config: LlamaConfig)
rope_pp/modeling_llama_alibi.py:595
Method__init__
(self, config)
rope_pp/modeling_llama_alibi.py:863
Method__init__
(self, config)
rope_pp/modeling_llama_alibi.py:997
next →1–100 of 305, ranked by callers