U
    4Af-                  !   @   s  d dl mZ ddlmZmZmZmZmZ dddgddgd	Zze sJe W n ek
r`   Y nX d
dddged< ddddged< dddged< ddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8g!ed9< d:d;d<d=d>d?d@dAgedB< dCdDdEdFdGdHdIdJdKdLdMdNdOdPdQgedR< dSdTgedU< ze s4e W n ek
rL   Y nFX dVdWdXdYdZd[d\d]d^d_d`dadbdcddgede< dfdgdhdidjdkdldmdndodpgedq< ze se W n ek
r   Y n6X drdsdtdudvdwdxdydzd{d|d}d~dged< ddddged< erddl	m
Z
mZmZ ddlmZmZ ze s*e W n ek
rD   Y nNX ddlmZmZmZmZ ddlmZmZmZmZ ddlmZmZmZ ddl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/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z? ddl@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZH ddlmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZW ddlXmYZYmZZZ ze se W n ek
r   Y nzX ddl[m\Z\m]Z]m^Z^m_Z_m`Z`maZambZbmcZcmdZdmeZemfZfmgZgmhZhmiZimjZj ddlkmlZlmmZmmnZnmoZompZpmqZqmrZrmsZsmtZtmuZumvZv ze sDe W n ek
r\   Y nZX ddlwmxZxmyZymzZzm{Z{m|Z|m}Z}m~Z~mZmZmZmZmZmZmZ ddlmZmZmZmZ n$d dlZeee d eedeje< dS )    )TYPE_CHECKING   )OptionalDependencyNotAvailable_LazyModuleis_flax_availableis_tf_availableis_torch_availableGenerationConfigGenerationModeWatermarkingConfigTextIteratorStreamerTextStreamer)configuration_utils	streamers
ConstraintConstraintListStateDisjunctiveConstraintPhrasalConstraintbeam_constraintsBeamHypotheses
BeamScorerBeamSearchScorerConstrainedBeamSearchScorerbeam_searchAssistedCandidateGeneratorCandidateGeneratorPromptLookupCandidateGeneratorcandidate_generator#AlternatingCodebooksLogitsProcessor%ClassifierFreeGuidanceLogitsProcessor#EncoderNoRepeatNGramLogitsProcessor'EncoderRepetitionPenaltyLogitsProcessorEpsilonLogitsWarperEtaLogitsWarperExponentialDecayLengthPenaltyForcedBOSTokenLogitsProcessorForcedEOSTokenLogitsProcessorForceTokensLogitsProcessorHammingDiversityLogitsProcessorInfNanRemoveLogitsProcessorLogitNormalizationLogitsProcessorLogitsProcessorListLogitsWarperMinLengthLogitsProcessor!MinNewTokensLengthLogitsProcessorMinPLogitsWarperNoBadWordsLogitsProcessorNoRepeatNGramLogitsProcessor PrefixConstrainedLogitsProcessor RepetitionPenaltyLogitsProcessorSequenceBiasLogitsProcessorSuppressTokensLogitsProcessor$SuppressTokensAtBeginLogitsProcessorTemperatureLogitsWarperTopKLogitsWarperTopPLogitsWarperTypicalLogitsWarper.UnbatchedClassifierFreeGuidanceLogitsProcessorWhisperTimeStampLogitsProcessorWatermarkLogitsProcessorlogits_processMaxNewTokensCriteriaMaxLengthCriteriaMaxTimeCriteriaEosTokenCriteriaStoppingCriteriaStoppingCriteriaListvalidate_stopping_criteriaStopStringCriteriastopping_criteriaGenerationMixin GreedySearchEncoderDecoderOutputGreedySearchDecoderOnlyOutputSampleEncoderDecoderOutputSampleDecoderOnlyOutputBeamSearchEncoderDecoderOutputBeamSearchDecoderOnlyOutputBeamSampleEncoderDecoderOutputBeamSampleDecoderOnlyOutput%ContrastiveSearchEncoderDecoderOutput"ContrastiveSearchDecoderOnlyOutputGenerateBeamDecoderOnlyOutput GenerateBeamEncoderDecoderOutputGenerateDecoderOnlyOutputGenerateEncoderDecoderOutpututilsWatermarkDetectorWatermarkDetectorOutputwatermarkingTFForcedBOSTokenLogitsProcessorTFForcedEOSTokenLogitsProcessorTFForceTokensLogitsProcessorTFLogitsProcessorTFLogitsProcessorListTFLogitsWarperTFMinLengthLogitsProcessorTFNoBadWordsLogitsProcessorTFNoRepeatNGramLogitsProcessor"TFRepetitionPenaltyLogitsProcessor&TFSuppressTokensAtBeginLogitsProcessorTFSuppressTokensLogitsProcessorTFTemperatureLogitsWarperTFTopKLogitsWarperTFTopPLogitsWarpertf_logits_processTFGenerationMixin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 FlaxNoRepeatNGramLogitsProcessor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'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r7   r6   r8   r9   r:   r;   r<   r>   r=   )rC   rA   r@   rB   rD   rE   rG   rF   )rQ   rP   rO   rN   rS   rR   rT   rU   rV   rW   rI   rK   rJ   rM   rL   )rY   rZ   )r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   )rt   rs   rr   rq   rv   ru   rl   rm   rn   rp   ro   )rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   )r   r   r   r   N__file__)Zmodule_spec)typingr   rX   r   r   r   r   r   Z_import_structurer   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"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r7   r6   r8   r9   r:   r;   r<   r>   r=   rH   rC   rA   r@   rB   rD   rE   rG   rF   rQ   rP   rO   rN   rS   rR   rT   rU   rV   rW   rI   rK   rJ   rM   rL   r[   rY   rZ   rk   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rw   rt   rs   rr   rq   rv   ru   rl   rm   rn   rp   ro   r   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   r   r   sys__name__globals__spec__modules r   r   D/tmp/pip-unpacked-wheel-zw5xktn0/transformers/generation/__init__.py<module>   s\  
$


#(
D
D4
@