o
    h=)                     @   s  d dl mZ ddlmZmZmZmZmZ dgddgdZze s#e W n	 ey-   Y nw g ded	< g d
ed< g ded< g ded< g ded< ze sSe W n	 ey]   Y nw g ded< g ded< ze sqe W n	 ey{   Y nw g ded< g ded< erddl	m
Z
 ddlmZmZ ze se W n	 ey   Y nw ddlmZmZmZmZ dd
lmZmZmZmZ ddlmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7 ddl8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z> ddlm?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHmIZImJZJ z	e s9e W n
 eyD   Y n?w ddlKmLZLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZYmZZZ dd l[m\Z\m]Z]m^Z^m_Z_m`Z`maZambZbmcZcmdZdmeZemfZfmgZg z	e se W n ey   Y d"S w ddlhmiZimjZjmkZkmlZlmmZmmnZnmoZompZpmqZqmrZrmsZsmtZtmuZu dd!lvmwZwmxZxmyZymzZz d"S d d"l{Z{ee|e} d# ee~d$e{je|< d"S )%    )TYPE_CHECKING   )OptionalDependencyNotAvailable_LazyModuleis_flax_availableis_tf_availableis_torch_availableGenerationConfigTextIteratorStreamerTextStreamer)configuration_utils	streamers)
ConstraintConstraintListStateDisjunctiveConstraintPhrasalConstraintbeam_constraints)BeamHypotheses
BeamScorerBeamSearchScorerConstrainedBeamSearchScorerbeam_search)#AlternatingCodebooksLogitsProcessor%ClassifierFreeGuidanceLogitsProcessor#EncoderNoRepeatNGramLogitsProcessor'EncoderRepetitionPenaltyLogitsProcessorEpsilonLogitsWarperEtaLogitsWarperExponentialDecayLengthPenaltyForcedBOSTokenLogitsProcessorForcedEOSTokenLogitsProcessorForceTokensLogitsProcessorHammingDiversityLogitsProcessorInfNanRemoveLogitsProcessorLogitNormalizationLogitsProcessorLogitsProcessorListLogitsWarperMinLengthLogitsProcessor!MinNewTokensLengthLogitsProcessorNoBadWordsLogitsProcessorNoRepeatNGramLogitsProcessor PrefixConstrainedLogitsProcessor RepetitionPenaltyLogitsProcessorSequenceBiasLogitsProcessorSuppressTokensLogitsProcessor$SuppressTokensAtBeginLogitsProcessorTemperatureLogitsWarperTopKLogitsWarperTopPLogitsWarperTypicalLogitsWarper.UnbatchedClassifierFreeGuidanceLogitsProcessorWhisperTimeStampLogitsProcessorlogits_process)MaxNewTokensCriteriaMaxLengthCriteriaMaxTimeCriteriaStoppingCriteriaStoppingCriteriaListvalidate_stopping_criteriastopping_criteria)GenerationMixintop_k_top_p_filtering GreedySearchEncoderDecoderOutputGreedySearchDecoderOnlyOutputSampleEncoderDecoderOutputSampleDecoderOnlyOutputBeamSearchEncoderDecoderOutputBeamSearchDecoderOnlyOutputBeamSampleEncoderDecoderOutputBeamSampleDecoderOnlyOutput%ContrastiveSearchEncoderDecoderOutput"ContrastiveSearchDecoderOnlyOutpututils)TFForcedBOSTokenLogitsProcessorTFForcedEOSTokenLogitsProcessorTFForceTokensLogitsProcessorTFLogitsProcessorTFLogitsProcessorListTFLogitsWarperTFMinLengthLogitsProcessorTFNoBadWordsLogitsProcessorTFNoRepeatNGramLogitsProcessor"TFRepetitionPenaltyLogitsProcessor&TFSuppressTokensAtBeginLogitsProcessorTFSuppressTokensLogitsProcessorTFTemperatureLogitsWarperTFTopKLogitsWarperTFTopPLogitsWarpertf_logits_process)TFGenerationMixintf_top_k_top_p_filteringTFGreedySearchDecoderOnlyOutput"TFGreedySearchEncoderDecoderOutputTFSampleEncoderDecoderOutputTFSampleDecoderOnlyOutput TFBeamSearchEncoderDecoderOutputTFBeamSearchDecoderOnlyOutput TFBeamSampleEncoderDecoderOutputTFBeamSampleDecoderOnlyOutput'TFContrastiveSearchEncoderDecoderOutput$TFContrastiveSearchDecoderOnlyOutputtf_utils)!FlaxForcedBOSTokenLogitsProcessor!FlaxForcedEOSTokenLogitsProcessorFlaxForceTokensLogitsProcessorFlaxLogitsProcessorFlaxLogitsProcessorListFlaxLogitsWarperFlaxMinLengthLogitsProcessor(FlaxSuppressTokensAtBeginLogitsProcessor!FlaxSuppressTokensLogitsProcessorFlaxTemperatureLogitsWarperFlaxTopKLogitsWarperFlaxTopPLogitsWarper#FlaxWhisperTimeStampLogitsProcessorflax_logits_process)FlaxGenerationMixinFlaxGreedySearchOutputFlaxSampleOutputFlaxBeamSearchOutput
flax_utils   )r	   )r
   r   )r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r0   r/   r1   r2   r3   r4   r5   r6   )r9   r8   r:   r;   r<   r=   )rH   rG   rF   rE   rJ   rI   r?   rB   rA   rD   rC   r@   )re   rd   rc   rb   rg   rf   r\   r^   r_   ra   r`   r]   )rz   rw   rx   ry   N__file__)module_spec)typingr   rK   r   r   r   r   r   _import_structurer   r	   r   r
   r   r   r   r   r   r   r   r   r   r   r   r7   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r0   r/   r1   r2   r3   r4   r5   r6   r>   r9   r8   r:   r;   r<   r=   rH   rG   rF   rE   rJ   rI   r?   rB   rA   rD   rC   r@   r[   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   rh   re   rd   rc   rb   rg   rf   r\   r^   r_   ra   r`   r]   rv   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   r{   rz   rw   rx   ry   sys__name__globals__spec__modules r   r   V/var/www/html/ai/venv/lib/python3.10/site-packages/transformers/generation/__init__.py<module>   s   ! !8D8< 