class_docstr: A class containing all of the functions supporting generation, to be used as a mixin in
  :class:`~transformers.PreTrainedModel`.
class_docstr_tok: ["A","class","containing","all","of","the","functions","supporting","generation",",","to","be","used","as","a","mixin","in",":","class",":","`","~transformers.PreTrainedModel","`","."]
docstr: Implement in subclasses of :class:`~transformers.PreTrainedModel` for custom behavior to adjust the logits in
  the generate method.
docstr_tok: ["Implement","in","subclasses","of",":","class",":","`","~transformers.PreTrainedModel","`","for","custom","behavior","to","adjust","the","logits","in","the","generate","method","."]
code: def adjust_logits_during_generation(
      self, logits: "torch.FloatTensor", **kwargs
  ) -> "torch.FloatTensor":
      """
      Implement in subclasses of :class:`~transformers.PreTrainedModel` for custom behavior to adjust the logits in
      the generate method.
      """
      return logits
  
imports: from dataclasses import dataclass
  from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union
  from .file_utils import ModelOutput
  from .generation_beam_search import BeamScorer, BeamSearchScorer
  from .generation_logits_process import EncoderNoRepeatNGramLogitsProcessor, ForcedBOSTokenLogitsProcessor, ForcedEOSTokenLogitsProcessor, HammingDiversityLogitsProcessor, InfNanRemoveLogitsProcessor, LogitsProcessorList, MinLengthLogitsProcessor, NoBadWordsLogitsProcessor, NoRepeatNGramLogitsProcessor, PrefixConstrainedLogitsProcessor, RepetitionPenaltyLogitsProcessor, TemperatureLogitsWarper, TopKLogitsWarper, TopPLogitsWarper
  from .generation_stopping_criteria import MaxLengthCriteria, MaxNewTokensCriteria, MaxTimeCriteria, StoppingCriteriaList, validate_stopping_criteria
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
  from fastNLP.core.log import logger
label_desc: Use image node_id 2 for calling the GenerationMixin obj's underlying member method code with example usage: obj.adjust_logits_during_generation(logits) and returns: logits