MCPcopy Create free account

hub / github.com/DAMO-NLP-SG/multilingual_analysis / functions

Functions1,603 in github.com/DAMO-NLP-SG/multilingual_analysis

↓ 1 callersFunctionlayerwise_lang_distribution
(lang_stats, candidate_langs)
layers/test_layer.py:73
↓ 1 callersFunctionlayerwise_lang_stats
(hidden_embed_token_level, candidate_langs=['en', 'zh', 'es', 'ru', 'de', 'fr'])
layers/test_layer.py:57
↓ 1 callersFunctionmain
(argv)
neuron_detection/neuron_detection.py:48
↓ 1 callersFunctionmain
()
neuron_detection/transformers/models/llama/convert_llama_weights_to_hf.py:365
↓ 1 callersFunctionmain
()
neuron_detection/transformers/models/mistral/convert_mistral_weights_to_hf.py:255
↓ 1 callersFunctionmain
()
neuron_detection/transformers/models/gemma2/convert_gemma2_weights_to_hf.py:172
↓ 1 callersFunctionmain
(argv)
layers/test_layer.py:145
↓ 1 callersFunctionmain
(argv)
neuron_deactivate/test_mistral_gsm.py:155
↓ 1 callersFunctionmain
()
neuron_deactivate/transformers/models/llama/convert_llama_weights_to_hf.py:404
↓ 1 callersFunctionmain
()
neuron_deactivate/transformers/models/mistral/convert_mistral_weights_to_hf.py:255
↓ 1 callersFunctionmain
()
neuron_deactivate/transformers/models/gemma2/convert_gemma2_weights_to_hf.py:172
↓ 1 callersFunctionplot_lang_distribution
(lang_distribution, candidate_langs, candidate_layers)
layers/test_layer.py:129
↓ 1 callersMethodreached_leaf
(self, current_seq)
neuron_detection/transformers/generation/beam_constraints.py:241
↓ 1 callersMethodreached_leaf
(self, current_seq)
neuron_deactivate/transformers/generation/beam_constraints.py:241
↓ 1 callersFunctionread_json
(path)
neuron_detection/transformers/models/llama/convert_llama_weights_to_hf.py:95
↓ 1 callersFunctionread_json
(path)
neuron_detection/transformers/models/mistral/convert_mistral_weights_to_hf.py:70
↓ 1 callersFunctionread_json
(path)
neuron_deactivate/transformers/models/llama/convert_llama_weights_to_hf.py:100
↓ 1 callersFunctionread_json
(path)
neuron_deactivate/transformers/models/mistral/convert_mistral_weights_to_hf.py:70
↓ 1 callersMethodreset
(self)
neuron_detection/transformers/generation/beam_constraints.py:186
↓ 1 callersMethodreset
(self)
neuron_detection/transformers/generation/beam_constraints.py:329
↓ 1 callersMethodreset
(self)
neuron_deactivate/transformers/generation/beam_constraints.py:186
↓ 1 callersMethodreset
(self)
neuron_deactivate/transformers/generation/beam_constraints.py:329
↓ 1 callersFunctionretrive_neuron
(filename)
neuron_enhancement/train_neuron.py:36
↓ 1 callersFunctionrotate_half
Rotates half the hidden dims of the input.
neuron_detection/transformers/models/llama/modeling_flax_llama.py:140
↓ 1 callersFunctionrotate_half
Rotates half the hidden dims of the input.
neuron_detection/transformers/models/mistral/modeling_flax_mistral.py:211
↓ 1 callersFunctionrotate_half
Rotates half the hidden dims of the input.
neuron_deactivate/transformers/models/llama/modeling_flax_llama.py:140
↓ 1 callersFunctionrotate_half
Rotates half the hidden dims of the input.
neuron_deactivate/transformers/models/mistral/modeling_flax_mistral.py:211
↓ 1 callersMethodsample
r""" Generates sequences for models with a language modeling head using multinomial sampling. Parameters: input_ids (`tf.
neuron_detection/transformers/generation/tf_utils.py:1788
↓ 1 callersMethodsample
r""" Generates sequences of token ids for models with a language modeling head using **multinomial sampling** and can be used for text
layers/transformers/generation/utils.py:2376
↓ 1 callersMethodsample
r""" Generates sequences of token ids for models with a language modeling head using **multinomial sampling** and can be used for text
neuron_deactivate/transformers/generation/utils.py:2610
↓ 1 callersMethodsample
r""" Generates sequences for models with a language modeling head using multinomial sampling. Parameters: input_ids (`tf.
neuron_deactivate/transformers/generation/tf_utils.py:1788
↓ 1 callersFunctionsample_without_replacement
categorical sampling without replacement is currently not implemented the gumbel-max trick will do for now see https://github.com/tensorflow/
neuron_detection/transformers/generation/tf_utils.py:3101
↓ 1 callersFunctionsample_without_replacement
categorical sampling without replacement is currently not implemented the gumbel-max trick will do for now see https://github.com/tensorflow/
neuron_deactivate/transformers/generation/tf_utils.py:3101
↓ 1 callersMethodset_seed
(self, input_seq: torch.LongTensor)
neuron_detection/transformers/generation/logits_process.py:2427
↓ 1 callersMethodset_seed
(self, input_seq: torch.LongTensor)
neuron_deactivate/transformers/generation/logits_process.py:2427
↓ 1 callersMethodshare_forward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
neuron_detection/transformers/models/mistral/modeling_mistral.py:220
↓ 1 callersMethodshared_forward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
neuron_detection/transformers/models/llama/modeling_llama.py:327
↓ 1 callersMethodshared_forward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
neuron_detection/transformers/models/gemma2/modeling_gemma2.py:231
↓ 1 callersMethodstep_sentence_constraint
( self, batch_idx: int, input_ids: torch.LongTensor, vocab_scores: torch.Float
neuron_detection/transformers/generation/beam_search.py:672
↓ 1 callersMethodstep_sentence_constraint
( self, batch_idx: int, input_ids: torch.LongTensor, vocab_scores: torch.Float
neuron_deactivate/transformers/generation/beam_search.py:672
↓ 1 callersMethodtest
Tests whether this constraint has been properly defined.
neuron_detection/transformers/generation/beam_constraints.py:24
↓ 1 callersMethodtest
Tests whether this constraint has been properly defined.
neuron_deactivate/transformers/generation/beam_constraints.py:24
↓ 1 callersMethodto_dict
Serializes this instance to a Python dictionary. Returns: Dict[str, Any]: Dictionary of all the attributes that make up
neuron_detection/transformers/generation/configuration_utils.py:1247
↓ 1 callersMethodto_dict
Serializes this instance to a Python dictionary. Returns: Dict[str, Any]: Dictionary of all the attributes that make up
neuron_deactivate/transformers/generation/configuration_utils.py:1285
↓ 1 callersMethodto_diff_dict
Removes all attributes from config which correspond to the default config attributes for better readability and serializes to a Pytho
neuron_detection/transformers/generation/configuration_utils.py:1018
↓ 1 callersMethodto_diff_dict
Removes all attributes from config which correspond to the default config attributes for better readability and serializes to a Pytho
neuron_deactivate/transformers/generation/configuration_utils.py:1056
↓ 1 callersMethodto_json_file
Save this instance to a JSON file. Args: json_file_path (`str` or `os.PathLike`): Path to the JSON file
neuron_detection/transformers/generation/configuration_utils.py:1106
↓ 1 callersMethodto_json_file
Save this instance to a JSON file. Args: json_file_path (`str` or `os.PathLike`): Path to the JSON file
neuron_deactivate/transformers/generation/configuration_utils.py:1144
↓ 1 callersMethodto_json_string
Serializes this instance to a JSON formatted string. Returns: str: JSON formatted string representing the configuration
neuron_detection/transformers/generation/configuration_utils.py:1264
↓ 1 callersMethodto_json_string
Serializes this instance to a JSON formatted string. Returns: str: JSON formatted string representing the configuration
neuron_deactivate/transformers/generation/configuration_utils.py:1302
↓ 1 callersMethodtorch_jit_model_eval
(self, model, dataloader, training=False)
neuron_enhancement/transformers/trainer.py:1310
↓ 1 callersMethodtraining_step
Perform a training step on a batch of inputs. Subclass and override to inject custom behavior. Args: model (`nn
neuron_enhancement/transformers/trainer.py:2960
↓ 1 callersMethodupdate
Updates attributes of this class instance with attributes from `kwargs` if they match existing attributes, returning all the unused k
neuron_detection/transformers/generation/configuration_utils.py:1150
↓ 1 callersMethodupdate
Updates attributes of this class instance with attributes from `kwargs` if they match existing attributes, returning all the unused k
neuron_deactivate/transformers/generation/configuration_utils.py:1188
↓ 1 callersFunctionwrite_json
(text, path)
neuron_detection/transformers/models/llama/convert_llama_weights_to_hf.py:100
↓ 1 callersFunctionwrite_json
(text, path)
neuron_detection/transformers/models/mistral/convert_mistral_weights_to_hf.py:75
↓ 1 callersFunctionwrite_json
(text, path)
neuron_deactivate/transformers/models/llama/convert_llama_weights_to_hf.py:105
↓ 1 callersFunctionwrite_json
(text, path)
neuron_deactivate/transformers/models/mistral/convert_mistral_weights_to_hf.py:75
↓ 1 callersFunctionwrite_model
( model_path, input_base_path, model_size=None, safe_serialization=True, llama_version=1,
neuron_detection/transformers/models/llama/convert_llama_weights_to_hf.py:105
↓ 1 callersFunctionwrite_model
(model_path, input_base_path, model_size, tokenizer_path=None, safe_serialization=True, is_v3=False)
neuron_detection/transformers/models/mistral/convert_mistral_weights_to_hf.py:80
↓ 1 callersFunctionwrite_model
(save_path, input_base_path, config, safe_serialization=True, push_to_hub=False, dtype=torch.float32)
neuron_detection/transformers/models/gemma2/convert_gemma2_weights_to_hf.py:84
↓ 1 callersFunctionwrite_model
( model_path, input_base_path, model_size=None, safe_serialization=True, llama_version="1"
neuron_deactivate/transformers/models/llama/convert_llama_weights_to_hf.py:110
↓ 1 callersFunctionwrite_model
(model_path, input_base_path, model_size, tokenizer_path=None, safe_serialization=True, is_v3=False)
neuron_deactivate/transformers/models/mistral/convert_mistral_weights_to_hf.py:80
↓ 1 callersFunctionwrite_model
(save_path, input_base_path, config, safe_serialization=True, push_to_hub=False, dtype=torch.float32)
neuron_deactivate/transformers/models/gemma2/convert_gemma2_weights_to_hf.py:84
↓ 1 callersFunctionwrite_tokenizer
(tokenizer_path, input_tokenizer_path, llama_version=2)
neuron_detection/transformers/models/llama/convert_llama_weights_to_hf.py:354
↓ 1 callersFunctionwrite_tokenizer
(tokenizer_path, input_tokenizer_path)
neuron_detection/transformers/models/mistral/convert_mistral_weights_to_hf.py:248
↓ 1 callersFunctionwrite_tokenizer
(input_tokenizer_path, save_path, push_to_hub=False)
neuron_detection/transformers/models/gemma2/convert_gemma2_weights_to_hf.py:161
↓ 1 callersFunctionwrite_tokenizer
(tokenizer_path, input_tokenizer_path, llama_version="2", special_tokens=None, instruct=False)
neuron_deactivate/transformers/models/llama/convert_llama_weights_to_hf.py:360
↓ 1 callersFunctionwrite_tokenizer
(tokenizer_path, input_tokenizer_path)
neuron_deactivate/transformers/models/mistral/convert_mistral_weights_to_hf.py:248
↓ 1 callersFunctionwrite_tokenizer
(input_tokenizer_path, save_path, push_to_hub=False)
neuron_deactivate/transformers/models/gemma2/convert_gemma2_weights_to_hf.py:161
Method__call__
Flax method for processing logits.
neuron_detection/transformers/generation/flax_logits_process.py:55
Method__call__
Flax method for warping logits.
neuron_detection/transformers/generation/flax_logits_process.py:66
Method__call__
(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_len: int, **kwargs)
neuron_detection/transformers/generation/flax_logits_process.py:81
Method__call__
(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_len: int)
neuron_detection/transformers/generation/flax_logits_process.py:111
Method__call__
(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_len: int)
neuron_detection/transformers/generation/flax_logits_process.py:140
Method__call__
(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_len: int)
neuron_detection/transformers/generation/flax_logits_process.py:180
Method__call__
(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_len: int)
neuron_detection/transformers/generation/flax_logits_process.py:207
Method__call__
(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_len: int)
neuron_detection/transformers/generation/flax_logits_process.py:232
Method__call__
(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_len: int)
neuron_detection/transformers/generation/flax_logits_process.py:263
Method__call__
(self, input_ids, scores, cur_len: int)
neuron_detection/transformers/generation/flax_logits_process.py:289
Method__call__
(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_len: int)
neuron_detection/transformers/generation/flax_logits_process.py:310
Method__call__
(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_len: int)
neuron_detection/transformers/generation/flax_logits_process.py:338
Method__call__
(self, input_ids, scores, cur_len)
neuron_detection/transformers/generation/flax_logits_process.py:398
Method__call__
(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_len: int)
neuron_detection/transformers/generation/flax_logits_process.py:523
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
neuron_detection/transformers/generation/logits_process.py:49
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
neuron_detection/transformers/generation/logits_process.py:59
Method__call__
r""" Args: input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`): Indices of input sequence toke
neuron_detection/transformers/generation/logits_process.py:72
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
neuron_detection/transformers/generation/logits_process.py:155
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
neuron_detection/transformers/generation/logits_process.py:225
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
neuron_detection/transformers/generation/logits_process.py:297
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
neuron_detection/transformers/generation/logits_process.py:346
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
neuron_detection/transformers/generation/logits_process.py:401
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
neuron_detection/transformers/generation/logits_process.py:463
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
neuron_detection/transformers/generation/logits_process.py:523
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
neuron_detection/transformers/generation/logits_process.py:588
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
neuron_detection/transformers/generation/logits_process.py:673
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
neuron_detection/transformers/generation/logits_process.py:752
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
neuron_detection/transformers/generation/logits_process.py:835
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
neuron_detection/transformers/generation/logits_process.py:964
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)
neuron_detection/transformers/generation/logits_process.py:1025
← previousnext →501–600 of 1,603, ranked by callers