MCPcopy Create free account

hub / github.com/DAMO-NLP-SG/multilingual_analysis / types & classes

Types & classes462 in github.com/DAMO-NLP-SG/multilingual_analysis

↓ 25 callersClassLogitsProcessorList
This class can be used to create a list of [`LogitsProcessor`] or [`LogitsWarper`] to subsequently process a `scores` input tensor. This clas
neuron_detection/transformers/generation/logits_process.py:65
↓ 18 callersClassStoppingCriteriaList
neuron_detection/transformers/generation/stopping_criteria.py:503
↓ 15 callersClassLogitsProcessorList
This class can be used to create a list of [`LogitsProcessor`] or [`LogitsWarper`] to subsequently process a `scores` input tensor. This clas
neuron_deactivate/transformers/generation/logits_process.py:65
↓ 10 callersClassStoppingCriteriaList
neuron_deactivate/transformers/generation/stopping_criteria.py:506
↓ 10 callersClassTFLogitsProcessorList
This class can be used to create a list of [`TFLogitsProcessor`] to subsequently process a `scores` input tensor. This class inherits from li
neuron_detection/transformers/generation/tf_logits_process.py:75
↓ 10 callersClassTFLogitsProcessorList
This class can be used to create a list of [`TFLogitsProcessor`] to subsequently process a `scores` input tensor. This class inherits from li
neuron_deactivate/transformers/generation/tf_logits_process.py:75
↓ 6 callersClassBeamSearchScorer
r""" [`BeamScorer`] implementing standard beam search decoding. Adapted in part from [Facebook's XLM beam search code](https://github.com
neuron_detection/transformers/generation/beam_search.py:123
↓ 5 callersClassGemma2RMSNorm
neuron_detection/transformers/models/gemma2/modeling_gemma2.py:74
↓ 5 callersClassGemma2RMSNorm
neuron_deactivate/transformers/models/gemma2/modeling_gemma2.py:111
↓ 4 callersClassBloomModel
layers/transformers/models/modeling_bloom.py:618
↓ 4 callersClassLlamaModel
Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`LlamaDecoderLayer`] Args: config: LlamaConfig
neuron_deactivate/transformers/models/llama/modeling_llama.py:929
↓ 4 callersClassLogitNormalization
r""" [`LogitsWarper`] and [`LogitsProcessor`] for normalizing the scores using log-softmax. It's important to normalize the scores during beam
neuron_detection/transformers/generation/logits_process.py:1711
↓ 4 callersClassTopKLogitsWarper
r""" [`LogitsWarper`] that performs top-k, i.e. restricting to the k highest probability elements. Often used together with [`TemperatureLogit
neuron_detection/transformers/generation/logits_process.py:478
↓ 4 callersClassTopPLogitsWarper
[`LogitsWarper`] that performs top-p, i.e. restricting to top tokens summing to prob_cut_off <= prob_cut_off. Often used together with [`Temp
neuron_detection/transformers/generation/logits_process.py:411
↓ 3 callersClassBeamSearchDecoderOnlyOutput
Base class for outputs of decoder-only generation models using beam search. Args: sequences (`torch.LongTensor` of shape `(batch_siz
neuron_detection/transformers/generation/utils.py:293
↓ 3 callersClassBeamSearchDecoderOnlyOutput
Base class for outputs of decoder-only generation models using beam search. Args: sequences (`torch.LongTensor` of shape `(batch_siz
layers/transformers/generation/utils.py:293
↓ 3 callersClassBeamSearchDecoderOnlyOutput
Base class for outputs of decoder-only generation models using beam search. Args: sequences (`torch.LongTensor` of shape `(batch_siz
neuron_deactivate/transformers/generation/utils.py:299
↓ 3 callersClassBeamSearchEncoderDecoderOutput
Base class for outputs of encoder-decoder generation models using beam search. Hidden states and attention weights of the decoder (respective
neuron_detection/transformers/generation/utils.py:328
↓ 3 callersClassBeamSearchEncoderDecoderOutput
Base class for outputs of encoder-decoder generation models using beam search. Hidden states and attention weights of the decoder (respective
layers/transformers/generation/utils.py:328
↓ 3 callersClassBeamSearchEncoderDecoderOutput
Base class for outputs of encoder-decoder generation models using beam search. Hidden states and attention weights of the decoder (respective
neuron_deactivate/transformers/generation/utils.py:334
↓ 3 callersClassBeamSearchScorer
r""" [`BeamScorer`] implementing standard beam search decoding. Adapted in part from [Facebook's XLM beam search code](https://github.com
neuron_deactivate/transformers/generation/beam_search.py:123
↓ 3 callersClassDisjunctiveConstraint
r""" A special [`Constraint`] that is fulfilled by fulfilling just one of several constraints. Args: nested_token_ids (`List[List[int
neuron_detection/transformers/generation/beam_constraints.py:261
↓ 3 callersClassFlaxLlamaRMSNorm
neuron_detection/transformers/models/llama/modeling_flax_llama.py:152
↓ 3 callersClassFlaxLlamaRMSNorm
neuron_deactivate/transformers/models/llama/modeling_flax_llama.py:152
↓ 3 callersClassFlaxLogitsProcessorList
This class can be used to create a list of [`FlaxLogitsProcessor`] or [`FlaxLogitsWarper`] to subsequently process a `scores` input tensor. T
neuron_detection/transformers/generation/flax_logits_process.py:73
↓ 3 callersClassFlaxLogitsProcessorList
This class can be used to create a list of [`FlaxLogitsProcessor`] or [`FlaxLogitsWarper`] to subsequently process a `scores` input tensor. T
neuron_deactivate/transformers/generation/flax_logits_process.py:73
↓ 3 callersClassFlaxMistralRMSNorm
neuron_detection/transformers/models/mistral/modeling_flax_mistral.py:131
↓ 3 callersClassFlaxMistralRMSNorm
neuron_deactivate/transformers/models/mistral/modeling_flax_mistral.py:131
↓ 3 callersClassGemma2Model
Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`Gemma2DecoderLayer`] Args: config: Gemma2Conf
neuron_detection/transformers/models/gemma2/modeling_gemma2.py:874
↓ 3 callersClassGemma2Model
Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`Gemma2DecoderLayer`] Args: config: Gemma2Conf
neuron_deactivate/transformers/models/gemma2/modeling_gemma2.py:779
↓ 3 callersClassGenerationConfig
r""" Class that holds a configuration for a generation task. A `generate` call supports the following generation methods for text-decoder, tex
neuron_deactivate/transformers/generation/configuration_utils.py:71
↓ 3 callersClassLlamaModel
Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`LlamaDecoderLayer`] Args: config: LlamaConfig
neuron_detection/transformers/models/llama/modeling_llama.py:967
↓ 3 callersClassLlamaModel
Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`LlamaDecoderLayer`] Args: config: LlamaConfig
layers/transformers/models/modeling_llama.py:909
↓ 3 callersClassLlamaRMSNorm
neuron_detection/transformers/models/llama/modeling_llama.py:75
↓ 3 callersClassLlamaRMSNorm
layers/transformers/models/modeling_llama.py:74
↓ 3 callersClassLlamaRMSNorm
neuron_deactivate/transformers/models/llama/modeling_llama.py:112
↓ 3 callersClassMaxLengthCriteria
This class can be used to stop generation whenever the full generated number of tokens exceeds `max_length`. Keep in mind for decoder-only ty
neuron_detection/transformers/generation/stopping_criteria.py:57
↓ 3 callersClassMistralModel
Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`MistralDecoderLayer`] Args: config: MistralCo
neuron_detection/transformers/models/mistral/modeling_mistral.py:756
↓ 3 callersClassMistralModel
Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`MistralDecoderLayer`] Args: config: MistralCo
neuron_deactivate/transformers/models/mistral/modeling_mistral.py:722
↓ 3 callersClassMistralRMSNorm
neuron_detection/transformers/models/mistral/modeling_mistral.py:61
↓ 3 callersClassMistralRMSNorm
neuron_deactivate/transformers/models/mistral/modeling_mistral.py:63
↓ 3 callersClassPhrasalConstraint
r""" [`Constraint`] enforcing that an ordered sequence of tokens is included in the output. Args: token_ids (`List[int]`):
neuron_detection/transformers/generation/beam_constraints.py:129
↓ 3 callersClassQwen2RMSNorm
layers/transformers/models/modeling_qwen2.py:81
↓ 3 callersClassTFMistralMainLayer
Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`MistralDecoderLayer`] Args: config: MistralCo
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:472
↓ 3 callersClassTFMistralMainLayer
Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`MistralDecoderLayer`] Args: config: MistralCo
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:472
↓ 3 callersClassTFMistralRMSNorm
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:101
↓ 3 callersClassTFMistralRMSNorm
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:101
↓ 2 callersClassBeamHypotheses
neuron_detection/transformers/generation/beam_search.py:930
↓ 2 callersClassBeamHypotheses
neuron_deactivate/transformers/generation/beam_search.py:930
↓ 2 callersClassBeamSearchState
neuron_detection/transformers/generation/flax_utils.py:120
↓ 2 callersClassBeamSearchState
neuron_deactivate/transformers/generation/flax_utils.py:120
↓ 2 callersClassConstrainedBeamSearchScorer
r""" [`BeamScorer`] implementing constrained beam search decoding. Args: batch_size (`int`): Batch Size of `input_ids` f
neuron_detection/transformers/generation/beam_search.py:419
↓ 2 callersClassConstraintListState
r""" A class for beam scorers to track its progress through a list of constraints. Args: constraints (`List[Constraint]`):
neuron_detection/transformers/generation/beam_constraints.py:351
↓ 2 callersClassConstraintListState
r""" A class for beam scorers to track its progress through a list of constraints. Args: constraints (`List[Constraint]`):
neuron_deactivate/transformers/generation/beam_constraints.py:351
↓ 2 callersClassDisjunctiveConstraint
r""" A special [`Constraint`] that is fulfilled by fulfilling just one of several constraints. Args: nested_token_ids (`List[List[int
neuron_deactivate/transformers/generation/beam_constraints.py:261
↓ 2 callersClassEncoderNoRepeatNGramLogitsProcessor
r""" [`LogitsProcessor`] that works similarly to [`NoRepeatNGramLogitsProcessor`], but applied exclusively to prevent the repetition of n-gram
neuron_detection/transformers/generation/logits_process.py:975
↓ 2 callersClassEncoderRepetitionPenaltyLogitsProcessor
r""" [`LogitsProcessor`] that works similarly to [`RepetitionPenaltyLogitsProcessor`], but with an *inverse* penalty that is applied to the to
neuron_detection/transformers/generation/logits_process.py:356
↓ 2 callersClassEpsilonLogitsWarper
r""" [`LogitsWarper`] that performs epsilon-sampling, i.e. restricting to tokens with `prob >= epsilon`. Takes the largest min_tokens_to_keep
neuron_detection/transformers/generation/logits_process.py:696
↓ 2 callersClassEtaLogitsWarper
r""" [`LogitsWarper`] that performs eta-sampling, a technique to filter out tokens with probabilities below a dynamic cutoff value, `eta`, whi
neuron_detection/transformers/generation/logits_process.py:765
↓ 2 callersClassExponentialDecayLengthPenalty
r""" [`LogitsProcessor`] that exponentially increases the score of the `eos_token_id` after `start_index` has been reached. This allows genera
neuron_detection/transformers/generation/logits_process.py:1610
↓ 2 callersClassForceTokensLogitsProcessor
r""" This processor takes a list of pairs of integers which indicates a mapping from generation indices to token indices that will be forced b
neuron_detection/transformers/generation/logits_process.py:1841
↓ 2 callersClassForcedBOSTokenLogitsProcessor
r""" [`LogitsProcessor`] that enforces the specified token as the first generated token. Used with encoder-decoder models. Args:
neuron_detection/transformers/generation/logits_process.py:1488
↓ 2 callersClassForcedEOSTokenLogitsProcessor
r""" [`LogitsProcessor`] that enforces the specified token as the last generated token when `max_length` is reached. Args: max_length
neuron_detection/transformers/generation/logits_process.py:1533
↓ 2 callersClassGemma2Config
neuron_detection/transformers/models/gemma2/diff_gemma2.py:67
↓ 2 callersClassGemma2Config
neuron_deactivate/transformers/models/gemma2/diff_gemma2.py:47
↓ 2 callersClassGemma2RMSNorm
neuron_detection/transformers/models/gemma2/diff_gemma2.py:84
↓ 2 callersClassGemma2RMSNorm
neuron_deactivate/transformers/models/gemma2/diff_gemma2.py:64
↓ 2 callersClassGenerationConfig
r""" Class that holds a configuration for a generation task. A `generate` call supports the following generation methods for text-decoder, tex
neuron_detection/transformers/generation/configuration_utils.py:70
↓ 2 callersClassGreedySearchDecoderOnlyOutput
Base class for outputs of decoder-only generation models using greedy search. Args: sequences (`torch.LongTensor` of shape `(batch_
neuron_deactivate/transformers/generation/utils.py:89
↓ 2 callersClassGreedySearchEncoderDecoderOutput
Base class for outputs of encoder-decoder generation models using greedy search. Hidden states and attention weights of the decoder (respecti
neuron_deactivate/transformers/generation/utils.py:185
↓ 2 callersClassGreedyState
neuron_detection/transformers/generation/flax_utils.py:101
↓ 2 callersClassGreedyState
neuron_deactivate/transformers/generation/flax_utils.py:101
↓ 2 callersClassHammingDiversityLogitsProcessor
r""" [`LogitsProcessor`] that enforces diverse beam search. Note that this logits processor is only effective for [`PreTrainedModel.group_bea
neuron_detection/transformers/generation/logits_process.py:1352
↓ 2 callersClassInfNanRemoveLogitsProcessor
r""" [`LogitsProcessor`] that removes all `nan` and `inf` values to avoid the generation method to fail. Note that using the logits processor
neuron_detection/transformers/generation/logits_process.py:1589
↓ 2 callersClassLlamaRotaryEmbedding
neuron_deactivate/transformers/models/llama/modeling_llama.py:135
↓ 2 callersClassLogitNormalization
r""" [`LogitsWarper`] and [`LogitsProcessor`] for normalizing the scores using log-softmax. It's important to normalize the scores during beam
neuron_deactivate/transformers/generation/logits_process.py:1711
↓ 2 callersClassMaxLengthCriteria
This class can be used to stop generation whenever the full generated number of tokens exceeds `max_length`. Keep in mind for decoder-only ty
neuron_deactivate/transformers/generation/stopping_criteria.py:59
↓ 2 callersClassMaxTimeCriteria
This class can be used to stop generation whenever the full generation exceeds some amount of time. By default, the time will start being cou
neuron_detection/transformers/generation/stopping_criteria.py:116
↓ 2 callersClassMinLengthLogitsProcessor
r""" [`LogitsProcessor`] enforcing a min-length by setting EOS probability to 0. Note that, for decoder-only models like most LLMs, the length
neuron_detection/transformers/generation/logits_process.py:103
↓ 2 callersClassMinNewTokensLengthLogitsProcessor
r""" [`LogitsProcessor`] enforcing a min-length of new tokens by setting EOS (End-Of-Sequence) token probability to 0. Contrarily to [`MinLeng
neuron_detection/transformers/generation/logits_process.py:164
↓ 2 callersClassNoBadWordsLogitsProcessor
[`LogitsProcessor`] that enforces that specified sequences will never be selected. <Tip> In order to get the token ids of the words tha
neuron_detection/transformers/generation/logits_process.py:1192
↓ 2 callersClassNoRepeatNGramLogitsProcessor
r""" N-grams are groups of "n" consecutive words, characters, or tokens taken from a sequence of text. Given the sentence: "She runs fast", th
neuron_detection/transformers/generation/logits_process.py:916
↓ 2 callersClassPhrasalConstraint
r""" [`Constraint`] enforcing that an ordered sequence of tokens is included in the output. Args: token_ids (`List[int]`):
neuron_deactivate/transformers/generation/beam_constraints.py:129
↓ 2 callersClassPrefixConstrainedLogitsProcessor
r""" [`LogitsProcessor`] that enforces constrained generation and is useful for prefix-conditioned constrained generation. See [Autoregressive
neuron_detection/transformers/generation/logits_process.py:1283
↓ 2 callersClassQwen2Model
Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`Qwen2DecoderLayer`] Args: config: Qwen2Config
layers/transformers/models/modeling_qwen2.py:917
↓ 2 callersClassRepetitionPenaltyLogitsProcessor
r""" [`LogitsProcessor`] that prevents the repetition of previous tokens through a penalty. This penalty is applied at most once per token. No
neuron_detection/transformers/generation/logits_process.py:302
↓ 2 callersClassSampleState
neuron_detection/transformers/generation/flax_utils.py:110
↓ 2 callersClassSampleState
neuron_deactivate/transformers/generation/flax_utils.py:110
↓ 2 callersClassSuppressTokensAtBeginLogitsProcessor
r""" [`SuppressTokensAtBeginLogitsProcessor`] supresses a list of tokens as soon as the `generate` function starts generating using `begin_ind
neuron_detection/transformers/generation/logits_process.py:1748
↓ 2 callersClassSuppressTokensLogitsProcessor
r""" This processor can be used to suppress a list of tokens. The processor will set their log probs to `-inf` so that they are not generated.
neuron_detection/transformers/generation/logits_process.py:1801
↓ 2 callersClassTemperatureLogitsWarper
r""" [`LogitsWarper`] for temperature (exponential scaling output probability distribution), which effectively means that it can control the r
neuron_detection/transformers/generation/logits_process.py:236
↓ 2 callersClassTopKLogitsWarper
r""" [`LogitsWarper`] that performs top-k, i.e. restricting to the k highest probability elements. Often used together with [`TemperatureLogit
neuron_deactivate/transformers/generation/logits_process.py:478
↓ 2 callersClassTopPLogitsWarper
[`LogitsWarper`] that performs top-p, i.e. restricting to top tokens summing to prob_cut_off <= prob_cut_off. Often used together with [`Temp
neuron_deactivate/transformers/generation/logits_process.py:411
↓ 2 callersClassTypicalLogitsWarper
r""" [`LogitsWarper`] that performs typical decoding. Inspired on how humans use language, it prioritizes tokens whose log probability is clos
neuron_detection/transformers/generation/logits_process.py:608
↓ 1 callersClassBeamSampleDecoderOnlyOutput
Base class for outputs of decoder-only generation models using beam sample. Args: sequences (`torch.LongTensor` of shape `(batch_siz
neuron_detection/transformers/generation/utils.py:378
↓ 1 callersClassBeamSampleDecoderOnlyOutput
Base class for outputs of decoder-only generation models using beam sample. Args: sequences (`torch.LongTensor` of shape `(batch_siz
layers/transformers/generation/utils.py:378
↓ 1 callersClassBeamSampleDecoderOnlyOutput
Base class for outputs of decoder-only generation models using beam sample. Args: sequences (`torch.LongTensor` of shape `(batch_siz
neuron_deactivate/transformers/generation/utils.py:384
↓ 1 callersClassBeamSampleEncoderDecoderOutput
Base class for outputs of encoder-decoder generation models using beam sampling. Hidden states and attention weights of the decoder (respecti
neuron_detection/transformers/generation/utils.py:413
↓ 1 callersClassBeamSampleEncoderDecoderOutput
Base class for outputs of encoder-decoder generation models using beam sampling. Hidden states and attention weights of the decoder (respecti
layers/transformers/generation/utils.py:413
↓ 1 callersClassBeamSampleEncoderDecoderOutput
Base class for outputs of encoder-decoder generation models using beam sampling. Hidden states and attention weights of the decoder (respecti
neuron_deactivate/transformers/generation/utils.py:419
next →1–100 of 462, ranked by callers