a
    h0                     @   sN  d dl mZ ddlmZmZmZmZmZ g dg ddZze sHe W n ey\   Y n`0 g ded< g d	ed
< g ded< g ded< g ded< dged< g ded< g ded< ze se W n ey   Y n0 g ded< g ded< ze se W n ey   Y n0 g ded< g ded< er&ddl	m
Z
mZmZmZmZmZ ddlmZmZmZmZ ze se W n ey   Y nf0 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# dd l$m%Z% dd!l&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?m@Z@mAZAmBZBmCZCmDZDmEZEmFZF dd"lGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZO dd#lmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZYmZZZm[Z[m\Z\m]Z]m^Z^ dd$l_m`Z`maZambZbmcZcmdZd ze se W n ey*   Y nz0 ddlemfZfmgZgmhZhmiZimjZjmkZkmlZlmmZmmnZnmoZompZpmqZqmrZrmsZsmtZt dd%lumvZvmwZwmxZxmyZymzZzm{Z{m|Z|m}Z}m~Z~mZmZ ze se W n ey   Y nZ0 dd&lmZmZmZmZmZmZmZmZmZmZmZmZmZmZ dd'lmZmZmZmZ n$d d(lZeee d) eed*eje< d(S )+    )TYPE_CHECKING   )OptionalDependencyNotAvailable_LazyModuleis_flax_availableis_tf_availableis_torch_available)BaseWatermarkingConfigCompileConfigGenerationConfigGenerationModeSynthIDTextWatermarkingConfigWatermarkingConfig)AsyncTextIteratorStreamerBaseStreamerTextIteratorStreamerTextStreamer)configuration_utils	streamers)
ConstraintConstraintListStateDisjunctiveConstraintPhrasalConstraintbeam_constraints)BeamHypotheses
BeamScorerBeamSearchScorerConstrainedBeamSearchScorerbeam_search)AssistedCandidateGeneratorCandidateGeneratorEarlyExitCandidateGeneratorPromptLookupCandidateGeneratorcandidate_generator) #AlternatingCodebooksLogitsProcessor%ClassifierFreeGuidanceLogitsProcessor#EncoderNoRepeatNGramLogitsProcessor'EncoderRepetitionPenaltyLogitsProcessorEpsilonLogitsWarperEtaLogitsWarperExponentialDecayLengthPenaltyForcedBOSTokenLogitsProcessorForcedEOSTokenLogitsProcessorHammingDiversityLogitsProcessorInfNanRemoveLogitsProcessorLogitNormalizationLogitsProcessorLogitsProcessorListMinLengthLogitsProcessor!MinNewTokensLengthLogitsProcessorMinPLogitsWarperNoBadWordsLogitsProcessorNoRepeatNGramLogitsProcessor PrefixConstrainedLogitsProcessor RepetitionPenaltyLogitsProcessorSequenceBiasLogitsProcessorSuppressTokensLogitsProcessor$SuppressTokensAtBeginLogitsProcessor#SynthIDTextWatermarkLogitsProcessorTemperatureLogitsWarperTopKLogitsWarperTopPLogitsWarperTypicalLogitsWarper.UnbatchedClassifierFreeGuidanceLogitsProcessorWhisperTimeStampLogitsProcessorWatermarkLogitsProcessorlogits_process)MaxLengthCriteriaMaxTimeCriteriaConfidenceCriteriaEosTokenCriteriaStoppingCriteriaStoppingCriteriaListvalidate_stopping_criteriaStopStringCriteriastopping_criteriaContinuousMixincontinuous_batching)GenerationMixin GreedySearchEncoderDecoderOutputGreedySearchDecoderOnlyOutputSampleEncoderDecoderOutputSampleDecoderOnlyOutputBeamSearchEncoderDecoderOutputBeamSearchDecoderOnlyOutputBeamSampleEncoderDecoderOutputBeamSampleDecoderOnlyOutput%ContrastiveSearchEncoderDecoderOutput"ContrastiveSearchDecoderOnlyOutputGenerateBeamDecoderOnlyOutput GenerateBeamEncoderDecoderOutputGenerateDecoderOnlyOutputGenerateEncoderDecoderOutpututils)WatermarkDetectorWatermarkDetectorOutputBayesianDetectorModelBayesianDetectorConfigSynthIDTextWatermarkDetector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   )rN   ) r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r;   r:   r<   r=   r>   r?   r@   rA   rC   rB   )rG   rH   rE   rF   rI   rJ   rL   rK   )rX   rW   rV   rU   rZ   rY   r[   r\   r]   r^   rP   rR   rQ   rT   rS   )rc   rb   rd   r`   ra   )r~   r}   r|   r{   r   r   rv   rw   rx   rz   ry   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r   r   r   r   N__file__)Zmodule_spec)typingr   r_   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"   rO   rN   rD   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r;   r:   r<   r=   r>   r?   r@   rA   rC   rB   rM   rG   rH   rE   rF   rI   rJ   rL   rK   rX   rW   rV   rU   rZ   rY   r[   r\   r]   r^   rP   rR   rQ   rT   rS   re   rc   rb   rd   r`   ra   ru   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   r   r~   r}   r|   r{   r   r   rv   rw   rx   rz   ry   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   sys__name__globals__spec__modules r   r   \/var/www/html/assistant/venv/lib/python3.9/site-packages/transformers/generation/__init__.py<module>   s   
"

 
"(
D
D4
@