
    sgK0                        d dl mZ ddlmZmZmZmZmZ g dddgdZ	  e       s e       	 g ded	<   g d
ed<   g ded<   g ded<   g ded<   g ded<   g ded<   	  e       s e       	 g ded<   g ded<   	  e       s e       	 g ded<   g ded<   eraddl	m
Z
mZmZmZmZmZ ddlmZmZ 	  e       s e       	 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#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?m@Z@mAZAmBZBmCZC dd!lDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZM dd"lmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZYmZZZm[Z[m\Z\ dd#l]m^Z^m_Z_m`Z`maZambZb 	  e       s e       	 ddlcmdZdmeZemfZfmgZgmhZhmiZimjZjmkZkmlZlmmZmmnZnmoZompZpmqZqmrZr dd$lsmtZtmuZumvZvmwZwmxZxmyZymzZzm{Z{m|Z|m}Z}m~Z~ 	  e       s e       	 dd%lmZmZmZmZmZmZmZmZmZmZmZmZmZmZ dd&lmZmZmZmZ y'd d'lZ ee e       d(   ee)      ej.                  e<   y'# e$ r Y w xY w# e$ r Y w xY w# e$ r Y w xY w# e$ r Y w xY w# e$ r Y w xY w# e$ r Y y'w xY w)*    )TYPE_CHECKING   )OptionalDependencyNotAvailable_LazyModuleis_flax_availableis_tf_availableis_torch_available)BaseWatermarkingConfigCompileConfigGenerationConfigGenerationModeSynthIDTextWatermarkingConfigWatermarkingConfig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LogitsWarperMinLengthLogitsProcessor!MinNewTokensLengthLogitsProcessorMinPLogitsWarperNoBadWordsLogitsProcessorNoRepeatNGramLogitsProcessor PrefixConstrainedLogitsProcessor RepetitionPenaltyLogitsProcessorSequenceBiasLogitsProcessorSuppressTokensLogitsProcessor$SuppressTokensAtBeginLogitsProcessor#SynthIDTextWatermarkLogitsProcessorTemperatureLogitsWarperTopKLogitsWarperTopPLogitsWarperTypicalLogitsWarper.UnbatchedClassifierFreeGuidanceLogitsProcessorWhisperTimeStampLogitsProcessorWatermarkLogitsProcessorlogits_process)	MaxNewTokensCriteriaMaxLengthCriteriaMaxTimeCriteriaConfidenceCriteria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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   )r   r   )!r#   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   )	rH   rI   rF   rE   rG   rJ   rK   rM   rL   )rW   rV   rU   rT   rY   rX   rZ   r[   r\   r]   rO   rQ   rP   rS   rR   )rb   ra   rc   r_   r`   )r}   r|   r{   rz   r   r~   ru   rv   rw   ry   rx   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r   r   r   r   N__file__)module_spec)typingr   r^   r   r   r   r   r	   _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!   rD   r#   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   rN   rH   rI   rF   rE   rG   rJ   rK   rM   rL   rW   rV   rU   rT   rY   rX   rZ   r[   r\   r]   rO   rQ   rP   rS   rR   rd   rb   ra   rc   r_   r`   rt   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   r   r}   r|   r{   rz   r   r~   ru   rv   rw   ry   rx   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     S/var/www/html/venv/lib/python3.12/site-packages/transformers/generation/__init__.py<module>r      s   ! w w ).9
 ],..  
-()(m$0+,"+&'F
.)*"g")n%#,.. 
.)*"%j!,.. 
0+, 'l#   >S
!#022 $
 	pojj	
 	
"	
 "	
 "	
 "	
 "	
 "	
 "	
 "	
 "	
F
	
 
	
 
	
	
 	
 	
 	
 	
"	
 	
#
 022 !
	
 	
 	
 	
 	
"	
 	
 	
 	
t "022 #
	
 	
 	
 	
  	ts'')J2GIZhpqCKK{	 & 		~ & 		J & 		P * j * J * sk   H&  H2 >H> 7I
 7I I  &H/.H/2H;:H;>II
IIII I('I(