Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DAMO-NLP-SG/multilingual_analysis
/ types & classes
Types & classes
462 in github.com/DAMO-NLP-SG/multilingual_analysis
⨍
Functions
1,603
◇
Types & classes
462
↳
Endpoints
11
↓ 25 callers
Class
LogitsProcessorList
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 callers
Class
StoppingCriteriaList
neuron_detection/transformers/generation/stopping_criteria.py:503
↓ 15 callers
Class
LogitsProcessorList
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 callers
Class
StoppingCriteriaList
neuron_deactivate/transformers/generation/stopping_criteria.py:506
↓ 10 callers
Class
TFLogitsProcessorList
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 callers
Class
TFLogitsProcessorList
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 callers
Class
BeamSearchScorer
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 callers
Class
Gemma2RMSNorm
neuron_detection/transformers/models/gemma2/modeling_gemma2.py:74
↓ 5 callers
Class
Gemma2RMSNorm
neuron_deactivate/transformers/models/gemma2/modeling_gemma2.py:111
↓ 4 callers
Class
BloomModel
layers/transformers/models/modeling_bloom.py:618
↓ 4 callers
Class
LlamaModel
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 callers
Class
LogitNormalization
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 callers
Class
TopKLogitsWarper
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 callers
Class
TopPLogitsWarper
[`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 callers
Class
BeamSearchDecoderOnlyOutput
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 callers
Class
BeamSearchDecoderOnlyOutput
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 callers
Class
BeamSearchDecoderOnlyOutput
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 callers
Class
BeamSearchEncoderDecoderOutput
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 callers
Class
BeamSearchEncoderDecoderOutput
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 callers
Class
BeamSearchEncoderDecoderOutput
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 callers
Class
BeamSearchScorer
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 callers
Class
DisjunctiveConstraint
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 callers
Class
FlaxLlamaRMSNorm
neuron_detection/transformers/models/llama/modeling_flax_llama.py:152
↓ 3 callers
Class
FlaxLlamaRMSNorm
neuron_deactivate/transformers/models/llama/modeling_flax_llama.py:152
↓ 3 callers
Class
FlaxLogitsProcessorList
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 callers
Class
FlaxLogitsProcessorList
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 callers
Class
FlaxMistralRMSNorm
neuron_detection/transformers/models/mistral/modeling_flax_mistral.py:131
↓ 3 callers
Class
FlaxMistralRMSNorm
neuron_deactivate/transformers/models/mistral/modeling_flax_mistral.py:131
↓ 3 callers
Class
Gemma2Model
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 callers
Class
Gemma2Model
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 callers
Class
GenerationConfig
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 callers
Class
LlamaModel
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 callers
Class
LlamaModel
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 callers
Class
LlamaRMSNorm
neuron_detection/transformers/models/llama/modeling_llama.py:75
↓ 3 callers
Class
LlamaRMSNorm
layers/transformers/models/modeling_llama.py:74
↓ 3 callers
Class
LlamaRMSNorm
neuron_deactivate/transformers/models/llama/modeling_llama.py:112
↓ 3 callers
Class
MaxLengthCriteria
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 callers
Class
MistralModel
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 callers
Class
MistralModel
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 callers
Class
MistralRMSNorm
neuron_detection/transformers/models/mistral/modeling_mistral.py:61
↓ 3 callers
Class
MistralRMSNorm
neuron_deactivate/transformers/models/mistral/modeling_mistral.py:63
↓ 3 callers
Class
PhrasalConstraint
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 callers
Class
Qwen2RMSNorm
layers/transformers/models/modeling_qwen2.py:81
↓ 3 callers
Class
TFMistralMainLayer
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 callers
Class
TFMistralMainLayer
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 callers
Class
TFMistralRMSNorm
neuron_detection/transformers/models/mistral/modeling_tf_mistral.py:101
↓ 3 callers
Class
TFMistralRMSNorm
neuron_deactivate/transformers/models/mistral/modeling_tf_mistral.py:101
↓ 2 callers
Class
BeamHypotheses
neuron_detection/transformers/generation/beam_search.py:930
↓ 2 callers
Class
BeamHypotheses
neuron_deactivate/transformers/generation/beam_search.py:930
↓ 2 callers
Class
BeamSearchState
neuron_detection/transformers/generation/flax_utils.py:120
↓ 2 callers
Class
BeamSearchState
neuron_deactivate/transformers/generation/flax_utils.py:120
↓ 2 callers
Class
ConstrainedBeamSearchScorer
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 callers
Class
ConstraintListState
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 callers
Class
ConstraintListState
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 callers
Class
DisjunctiveConstraint
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 callers
Class
EncoderNoRepeatNGramLogitsProcessor
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 callers
Class
EncoderRepetitionPenaltyLogitsProcessor
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 callers
Class
EpsilonLogitsWarper
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 callers
Class
EtaLogitsWarper
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 callers
Class
ExponentialDecayLengthPenalty
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 callers
Class
ForceTokensLogitsProcessor
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 callers
Class
ForcedBOSTokenLogitsProcessor
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 callers
Class
ForcedEOSTokenLogitsProcessor
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 callers
Class
Gemma2Config
neuron_detection/transformers/models/gemma2/diff_gemma2.py:67
↓ 2 callers
Class
Gemma2Config
neuron_deactivate/transformers/models/gemma2/diff_gemma2.py:47
↓ 2 callers
Class
Gemma2RMSNorm
neuron_detection/transformers/models/gemma2/diff_gemma2.py:84
↓ 2 callers
Class
Gemma2RMSNorm
neuron_deactivate/transformers/models/gemma2/diff_gemma2.py:64
↓ 2 callers
Class
GenerationConfig
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 callers
Class
GreedySearchDecoderOnlyOutput
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 callers
Class
GreedySearchEncoderDecoderOutput
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 callers
Class
GreedyState
neuron_detection/transformers/generation/flax_utils.py:101
↓ 2 callers
Class
GreedyState
neuron_deactivate/transformers/generation/flax_utils.py:101
↓ 2 callers
Class
HammingDiversityLogitsProcessor
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 callers
Class
InfNanRemoveLogitsProcessor
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 callers
Class
LlamaRotaryEmbedding
neuron_deactivate/transformers/models/llama/modeling_llama.py:135
↓ 2 callers
Class
LogitNormalization
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 callers
Class
MaxLengthCriteria
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 callers
Class
MaxTimeCriteria
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 callers
Class
MinLengthLogitsProcessor
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 callers
Class
MinNewTokensLengthLogitsProcessor
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 callers
Class
NoBadWordsLogitsProcessor
[`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 callers
Class
NoRepeatNGramLogitsProcessor
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 callers
Class
PhrasalConstraint
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 callers
Class
PrefixConstrainedLogitsProcessor
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 callers
Class
Qwen2Model
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 callers
Class
RepetitionPenaltyLogitsProcessor
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 callers
Class
SampleState
neuron_detection/transformers/generation/flax_utils.py:110
↓ 2 callers
Class
SampleState
neuron_deactivate/transformers/generation/flax_utils.py:110
↓ 2 callers
Class
SuppressTokensAtBeginLogitsProcessor
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 callers
Class
SuppressTokensLogitsProcessor
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 callers
Class
TemperatureLogitsWarper
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 callers
Class
TopKLogitsWarper
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 callers
Class
TopPLogitsWarper
[`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 callers
Class
TypicalLogitsWarper
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 callers
Class
BeamSampleDecoderOnlyOutput
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 callers
Class
BeamSampleDecoderOnlyOutput
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 callers
Class
BeamSampleDecoderOnlyOutput
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 callers
Class
BeamSampleEncoderDecoderOutput
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 callers
Class
BeamSampleEncoderDecoderOutput
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 callers
Class
BeamSampleEncoderDecoderOutput
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