MCPcopy Create free account

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

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

Methodauto_wrapper_callable
(m, *args, **kwargs)
neuron_enhancement/transformers/trainer.py:1453
Methodbeam_search_body_fn
beam search state update fn.
neuron_detection/transformers/generation/flax_utils.py:886
Methodbeam_search_body_fn
Beam Search iterative update function -- each iteration adds a new token and updates the best sequences seen so far
neuron_detection/transformers/generation/tf_utils.py:2344
Methodbeam_search_body_fn
beam search state update fn.
neuron_deactivate/transformers/generation/flax_utils.py:886
Methodbeam_search_body_fn
Beam Search iterative update function -- each iteration adds a new token and updates the best sequences seen so far
neuron_deactivate/transformers/generation/tf_utils.py:2344
Methodbeam_search_cond_fn
beam search state termination condition fn.
neuron_detection/transformers/generation/flax_utils.py:856
Methodbeam_search_cond_fn
Beam Search termination condition function -- halts the generation loop if any of these conditions becomes False
neuron_detection/transformers/generation/tf_utils.py:2303
Methodbeam_search_cond_fn
beam search state termination condition fn.
neuron_deactivate/transformers/generation/flax_utils.py:856
Methodbeam_search_cond_fn
Beam Search termination condition function -- halts the generation loop if any of these conditions becomes False
neuron_deactivate/transformers/generation/tf_utils.py:2303
Methodbody_fun
(i, val)
neuron_detection/transformers/generation/flax_logits_process.py:488
Methodbody_fun
(i, val)
neuron_deactivate/transformers/generation/flax_logits_process.py:488
Methodbuild
(self, input_shape=None)
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:110
Methodbuild
(self, input_shape=None)
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:363
Methodbuild
(self, input_shape=None)
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:453
Methodbuild
(self, input_shape=None)
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:623
Methodbuild
(self, input_shape=None)
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:797
Methodbuild
(self, input_shape=None)
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:917
Methodbuild
(self, input_shape=None)
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:1046
Methodbuild
(self, input_shape=None)
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:110
Methodbuild
(self, input_shape=None)
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:363
Methodbuild
(self, input_shape=None)
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:453
Methodbuild
(self, input_shape=None)
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:623
Methodbuild
(self, input_shape=None)
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:797
Methodbuild
(self, input_shape=None)
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:917
Methodbuild
(self, input_shape=None)
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:1046
Methodbuild_inputs_with_special_tokens
(self, token_ids_0, token_ids_1=None)
neuron_detection/transformers/models/llama/tokenization_llama_fast.py:301
Methodbuild_inputs_with_special_tokens
(self, token_ids_0, token_ids_1=None)
neuron_detection/transformers/models/llama/tokenization_llama.py:334
Methodbuild_inputs_with_special_tokens
(self, token_ids_0, token_ids_1=None)
neuron_deactivate/transformers/models/llama/tokenization_llama_fast.py:246
Methodbuild_inputs_with_special_tokens
(self, token_ids_0, token_ids_1=None)
neuron_deactivate/transformers/models/llama/tokenization_llama.py:333
Methodcall
(self, hidden_states)
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:120
Methodcall
(self, x, seq_len=None)
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:137
Methodcall
(self, x)
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:200
Methodcall
( self, hidden_states: tf.Tensor, attention_mask: Optional[tf.Tensor] = None,
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:282
Methodcall
Args: hidden_states (`tf.Tensor`): input to the layer of shape `(batch, seq_len, embed_dim)` attention_mask (`tf.Tens
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:394
Methodcall
( self, input_ids: tf.Tensor = None, attention_mask: Optional[tf.Tensor] = None,
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:529
Methodcall
( self, input_ids: tf.Tensor = None, attention_mask: Optional[tf.Tensor] = None,
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:772
Methodcall
r""" Args: labels (`tf.Tensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing the mas
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:839
Methodcall
r""" Args: labels (`tf.Tensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing the mas
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:965
Methodcall
(self, hidden_states)
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:120
Methodcall
(self, x, seq_len=None)
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:137
Methodcall
(self, x)
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:200
Methodcall
( self, hidden_states: tf.Tensor, attention_mask: Optional[tf.Tensor] = None,
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:282
Methodcall
Args: hidden_states (`tf.Tensor`): input to the layer of shape `(batch, seq_len, embed_dim)` attention_mask (`tf.Tens
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:394
Methodcall
( self, input_ids: tf.Tensor = None, attention_mask: Optional[tf.Tensor] = None,
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:529
Methodcall
( self, input_ids: tf.Tensor = None, attention_mask: Optional[tf.Tensor] = None,
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:772
Methodcall
r""" Args: labels (`tf.Tensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing the mas
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:839
Methodcall
r""" Args: labels (`tf.Tensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing the mas
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:965
Methodcan_save_slow_tokenizer
(self)
neuron_detection/transformers/models/llama/tokenization_llama_fast.py:178
Methodcan_save_slow_tokenizer
(self)
neuron_deactivate/transformers/models/llama/tokenization_llama_fast.py:178
Functioncompute_intermediate_size
(n, ffn_dim_multiplier=1, multiple_of=256)
neuron_detection/transformers/models/mistral/convert_mistral_weights_to_hf.py:66
Functioncompute_intermediate_size
(n, ffn_dim_multiplier=1, multiple_of=256)
neuron_deactivate/transformers/models/mistral/convert_mistral_weights_to_hf.py:66
Methodcompute_transition_scores
Computes the transition scores of sequences given the generation scores (and beam indices, if beam search was used). This is a conven
neuron_detection/transformers/generation/utils.py:944
Methodcompute_transition_scores
Computes the transition scores of sequences given the generation scores (and beam indices, if beam search was used). This is a conven
neuron_detection/transformers/generation/tf_utils.py:477
Methodcompute_transition_scores
Computes the transition scores of sequences given the generation scores (and beam indices, if beam search was used). This is a conven
layers/transformers/generation/utils.py:944
Methodcompute_transition_scores
Computes the transition scores of sequences given the generation scores (and beam indices, if beam search was used). This is a conven
neuron_deactivate/transformers/generation/utils.py:1059
Methodcompute_transition_scores
Computes the transition scores of sequences given the generation scores (and beam indices, if beam search was used). This is a conven
neuron_deactivate/transformers/generation/tf_utils.py:477
Methodcontrastive_search_body_fn
state update fn.
neuron_detection/transformers/generation/tf_utils.py:2818
Methodcontrastive_search_body_fn
state update fn.
neuron_deactivate/transformers/generation/tf_utils.py:2818
Methodcontrastive_search_cond_fn
state termination condition fn.
neuron_detection/transformers/generation/tf_utils.py:2811
Methodcontrastive_search_cond_fn
state termination condition fn.
neuron_deactivate/transformers/generation/tf_utils.py:2811
Methodconvert_dataclass_to_dict
(obj)
neuron_detection/transformers/generation/configuration_utils.py:1093
Methodconvert_dataclass_to_dict
(obj)
neuron_deactivate/transformers/generation/configuration_utils.py:1131
Methodconvert_keys_to_string
(obj)
neuron_detection/transformers/generation/configuration_utils.py:1085
Methodconvert_keys_to_string
(obj)
neuron_deactivate/transformers/generation/configuration_utils.py:1123
Methodcopy
(self, stateful=False)
neuron_detection/transformers/generation/beam_constraints.py:193
Methodcopy
(self, stateful=False)
neuron_detection/transformers/generation/beam_constraints.py:340
Methodcopy
(self, stateful=True)
neuron_detection/transformers/generation/beam_constraints.py:509
Methodcopy
(self, stateful=False)
neuron_deactivate/transformers/generation/beam_constraints.py:193
Methodcopy
(self, stateful=False)
neuron_deactivate/transformers/generation/beam_constraints.py:340
Methodcopy
(self, stateful=True)
neuron_deactivate/transformers/generation/beam_constraints.py:509
Methodcos_cached
(self)
neuron_detection/transformers/models/llama/modeling_llama.py:123
Methodcos_cached
(self)
layers/transformers/models/modeling_llama.py:122
Methodcreate_custom_forward
(module)
layers/transformers/models/modeling_bloom.py:766
Methodcreate_token_type_ids_from_sequences
Creates a mask from the two sequences passed to be used in a sequence-pair classification task. An ALBERT sequence pair mask has the
neuron_detection/transformers/models/llama/tokenization_llama.py:382
Methodcreate_token_type_ids_from_sequences
Creates a mask from the two sequences passed to be used in a sequence-pair classification task. An ALBERT sequence pair mask has the
neuron_deactivate/transformers/models/llama/tokenization_llama.py:381
Methodcustom_forward
(*inputs)
layers/transformers/models/modeling_bloom.py:767
Functiondeduplicate
(neuron_target, neuron_delete)
neuron_enhancement/train_neuron.py:49
Methoddefault_chat_template
LLaMA uses [INST] and [/INST] to indicate user messages, and <<SYS>> and <</SYS>> to indicate system messages. Assistant messages do
neuron_detection/transformers/models/llama/tokenization_llama_fast.py:246
Methoddefault_chat_template
LLaMA uses [INST] and [/INST] to indicate user messages, and <<SYS>> and <</SYS>> to indicate system messages. Assistant messages do
neuron_detection/transformers/models/llama/tokenization_llama.py:416
Methodend
Flushes any remaining cache and prints a newline to stdout.
neuron_detection/transformers/generation/streamers.py:116
Methodend
Flushes any remaining cache and prints a newline to stdout.
neuron_deactivate/transformers/generation/streamers.py:116
Methodevaluation_loop
Prediction/evaluation loop, shared by `Trainer.evaluate()` and `Trainer.predict()`. Works both with or without labels.
neuron_enhancement/transformers/trainer.py:3409
Methodextra_repr
(self)
neuron_detection/transformers/models/mistral/modeling_mistral.py:77
Methodextra_repr
(self)
neuron_deactivate/transformers/models/llama/modeling_llama.py:128
Methodextra_repr
(self)
neuron_deactivate/transformers/models/mistral/modeling_mistral.py:79
Methodextra_repr
(self)
neuron_deactivate/transformers/models/gemma2/modeling_gemma2.py:127
Methodfinalize
( self, input_ids: torch.LongTensor, final_beam_scores: torch.FloatTensor, fin
neuron_detection/transformers/generation/beam_search.py:320
Methodfinalize
( self, input_ids: torch.LongTensor, final_beam_scores: torch.FloatTensor, fin
neuron_detection/transformers/generation/beam_search.py:813
Methodfinalize
( self, input_ids: torch.LongTensor, final_beam_scores: torch.FloatTensor, fin
neuron_deactivate/transformers/generation/beam_search.py:320
Methodfinalize
( self, input_ids: torch.LongTensor, final_beam_scores: torch.FloatTensor, fin
neuron_deactivate/transformers/generation/beam_search.py:813
Methodflatten_beam_dim
Flattens the first two dimensions of a non-scalar array.
neuron_detection/transformers/generation/flax_utils.py:767
Methodflatten_beam_dim
Flattens the first two dimensions of a non-scalar array.
neuron_detection/transformers/generation/tf_utils.py:2211
Methodflatten_beam_dim
Flattens the first two dimensions of a non-scalar array.
neuron_deactivate/transformers/generation/flax_utils.py:767
Methodflatten_beam_dim
Flattens the first two dimensions of a non-scalar array.
neuron_deactivate/transformers/generation/tf_utils.py:2211
Functionformatting_prompts_func
(example)
neuron_enhancement/train_neuron.py:84
Methodforward
(self, hidden_states)
neuron_detection/transformers/models/llama/modeling_llama.py:84
Methodforward
(self, x, position_ids, seq_len=None)
neuron_detection/transformers/models/llama/modeling_llama.py:131
Methodforward
(self, x, position_ids, seq_len=None)
neuron_detection/transformers/models/llama/modeling_llama.py:153
Methodforward
(self, x, position_ids, seq_len=None)
neuron_detection/transformers/models/llama/modeling_llama.py:163
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
neuron_detection/transformers/models/llama/modeling_llama.py:432
← previousnext →1,101–1,200 of 1,603, ranked by callers