
    <h                     ,   S r SSKrSSKrSSKrSSKrSSKJr  SSKJrJ	r	J
r
  SSKJr  SSKJr  SSKJrJr  SS	KJr  SS
KJr  SSKJr  SSKJrJrJrJrJrJr  SSKJ r   SSK!J"r"  SSK#J$r$J%r%J&r&J'r'J(r(  \" 5       (       a  SSK)J*r*  OSr*\RV                  " \,5      r-\\.\/\	\.   \	\.   4   4   " / SS\" 5       (       a  SOS44PS\" 5       (       a  SOS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PS S\" 5       (       a  S!OS44PS"S\" 5       (       a  SOS44PS#PS$\" 5       (       a  S%OS\" 5       (       a  S&OS44PS'PS(S\" 5       (       a  SOS44PS)\" 5       (       a  S*OSS44PS+PS,PS-\" 5       (       a  S.OS\" 5       (       a  S/OS44PS0S1\" 5       (       a  S2OS44PS3PS4S\" 5       (       a  S5OS44PS6PS7PS8S\" 5       (       a  SOS44PS9S:\" 5       (       a  S;OS44PS<S\" 5       (       a  S=OS44PS>S?\" 5       (       a  S@OS44PSAS\" 5       (       a  SOS44PSBPSC\" 5       (       a  SDOS\" 5       (       a  SEOS44PSFPSG\" 5       (       a  SOS\" 5       (       a  SOS44PSHS\" 5       (       a  SOS44PSIS?\" 5       (       a  S@OS44PSJS\" 5       (       a  SOS44PSKS\" 5       (       a  SOS44PSLPSM\" 5       (       a  SNOS\" 5       (       a  SOOS44PSPSQ\" 5       (       a  SROS44PSSS\" 5       (       a  S!OS44PSTS\" 5       (       a  S!OS44PSUS\" 5       (       a  SOS44PSVSW\" 5       (       a  SXOS44PSYSZ\" 5       (       a  S[OS44PS\\" 5       (       a  S]OS\" 5       (       a  S^OS44PS_PS`PSaPSbS?\" 5       (       a  S@OS44PScS:\" 5       (       a  S;OS44PSdSe\" 5       (       a  SfOS44PSg\" 5       (       a  ShOS\" 5       (       a  SiOS44PSj\" 5       (       a  SOS\" 5       (       a  SOS44PSk\" 5       (       a  SOS\" 5       (       a  SOS44PSl\" 5       (       a  SOS\" 5       (       a  SOS44PSm\" 5       (       a  SOS\" 5       (       a  SOS44PSnPSo\" 5       (       a  SOS\" 5       (       a  SOS44PSpSq\" 5       (       a  SrOS44PSsSt\" 5       (       a  SuOS44PSvSw\" 5       (       a  SxOS44PSyS:\" 5       (       a  S;OS44PSzS\" 5       (       a  SOS44PS{S\" 5       (       a  SOS44PS|S\" 5       (       a  SOS44PS}\" 5       (       a  S~OSS44PSPS\" 5       (       a  S:OS\" 5       (       a  S;OS44PSS\" 5       (       a  S5OS44PSS\" 5       (       a  SOS44PS\" 5       (       a  SOSS44PSPSS\" 5       (       a  SOS44PSPSS\" 5       (       a  SOS44PS\" 5       (       a  SOS\" 5       (       a  SOS44PS\" 5       (       a  SOS\" 5       (       a  SOS44PS\" 5       (       a  SOS\" 5       (       a  SOS44PS\" 5       (       a  SOS\" 5       (       a  SOS44PS\" 5       (       a  SOS\" 5       (       a  SOS44PS\" 5       (       a  SOS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  S5OS44PSS\" 5       (       a  S5OS44PSS\" 5       (       a  S5OS44PSS\" 5       (       a  S5OS44PS\" 5       (       a  SOSS44PSS:\" 5       (       a  S;OS44PSS:\" 5       (       a  S;OS44PSS:\" 5       (       a  S;OS44PSS\" 5       (       a  SOS44PSPSS\" 5       (       a  S5OS44PSS:\" 5       (       a  S;OS44PSPSPSPSPSPSS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  S5OS44PSS\" 5       (       a  SOS44PSPSS?\" 5       (       a  S@OS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PSS:\" 5       (       a  S;OS44PSS:\" 5       (       a  S;OS44PSSW\" 5       (       a  SXOS44PS\" 5       (       a  SOS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PS\" 5       (       a  SOS\" 5       (       a  SOS44PSPS\" 5       (       a  SOS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PS\" 5       (       a  SOS\" 5       (       a  SOS44PS\" 5       (       a  SOS\" 5       (       a  SOS44PS\" 5       (       a  SOS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PS\" 5       (       a  SOS\" 5       (       a  SOS44PSPSS\" 5       (       a  SOS44PS\" 5       (       a  SOSS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PS\" 5       (       a  SOSS44PS\" 5       (       a  SOS\" 5       (       a  SOS44PS\" 5       (       a  SOS\" 5       (       a  SOS44PSS?\" 5       (       a  S@OS44PSS\" 5       (       a  SOS44PSPS\" 5       (       a  S:OS\" 5       (       a  S;OS44PS\" 5       (       a  SO\" 5       (       a  SOS\" 5       (       a  \" 5       (       d  SOS44PS\" 5       (       a  SO\" 5       (       a  SOS\" 5       (       a  \" 5       (       d  SOS44PSS\" 5       (       a  SOS44PS\" 5       (       a  SOSS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  S5OS44PSS\" 5       (       a  S5OS44PSS\" 5       (       a  S5OS44PSS\" 5       (       a  SOS44PSS\" 5       (       a  SOS44PGS S?\" 5       (       a  S@OS44PGS\" 5       (       a  GSOS\" 5       (       a  GSOS44PGSS\" 5       (       a  SOS44PGSS\" 5       (       a  SOS44PGSGS\" 5       (       a  GSOS44PGS	PGS
S\" 5       (       a  S5OS44PGSS\" 5       (       a  SOS44PGS\" 5       (       a  GSOS\" 5       (       a  GSOS44PGS\" 5       (       a  GSOS\" 5       (       a  GSOS44PGS\" 5       (       a  SOS\" 5       (       a  SOS44PGSS\" 5       (       a  SOS44PGSS\" 5       (       a  SOS44PGSS\" 5       (       a  SOS44PGSS\" 5       (       a  SOS44PGSS\" 5       (       a  SOS44PGSGS\" 5       (       a  GSOS44PGSS:\" 5       (       a  S;OS44PGSS\" 5       (       a  SOS44PGSS\" 5       (       a  SOS44PGSS\" 5       (       a  SOS44PGS\" 5       (       a  S1OS\" 5       (       a  S2OS44PGS\" 5       (       a  S1OS\" 5       (       a  S2OS44PGSPGS \" 5       (       a  SOS\" 5       (       a  SOS44PGS!SQ\" 5       (       a  SROS44PGS"S\" 5       (       a  SOS44PGS#S\" 5       (       a  SOS44PGS$PGS%S\" 5       (       a  SOS44PGS&S\" 5       (       a  SO\" 5       (       a  S5OS44PGS'\" 5       (       a  GS(OSS44PGS)PGS*S\" 5       (       a  SOS44PGS+SW\" 5       (       a  SXOS44PGS,SW\" 5       (       a  SXOS44PGS-SW\" 5       (       a  SXOS44PGS.SW\" 5       (       a  SXOS44PGS/SW\" 5       (       a  SXOS44PGS0SW\" 5       (       a  SXOS44PGS1SW\" 5       (       a  SXOS44PGS2SW\" 5       (       a  SXOS44PGS3PGS4GS5\" 5       (       a  GS6OS44PGS7\" 5       (       a  SOS\" 5       (       a  SOS44PGS8\" 5       (       a  GS9OS\" 5       (       a  GS:OS44PGS;\" 5       (       a  GS<OS\" 5       (       a  GS=OS44PGS>GS?\" 5       (       a  GS@OS44PGSAS?\" 5       (       a  S@OS44PGSBS?\" 5       (       a  S@OS44PGSCPGSDGSE\" 5       (       a  GSFOS44PGSGS\" 5       (       a  SOS44PGSH\" 5       (       a  GSIOS\" 5       (       a  GSJOS44PGSK\" 5       (       a  GSIOS\" 5       (       a  GSJOS44PGSL\" 5       (       a  SOS\" 5       (       a  SOS44PGSM\" 5       (       a  GSNOSS44PGSO\" 5       (       a  SOS\" 5       (       a  SOS44PGSPS\" 5       (       a  S5OS44PGSQ\" 5       (       a  GSROSS44PGSSPGST\" 5       (       a  GSUOSS44PGSVPGSWGSX\" 5       (       a  GSYOS44PGSZS\" 5       (       a  SOS44PGS[S:\" 5       (       a  S;OS44PGS\\" 5       (       a  SOS\" 5       (       a  SOS44PGS]\" 5       (       a  SOS\" 5       (       a  SOS44PGS^\" 5       (       a  SOS\" 5       (       a  SOS44PGS_PGS`PGSaPGSbS\" 5       (       a  SOS44PGSc\" 5       (       a  GSdOS\" 5       (       a  GSeOS44PGSf\" 5       (       a  SOS\" 5       (       a  SOS44PGSgS\" 5       (       a  SOS44PGShS\" 5       (       a  SOS44PGSiS\" 5       (       a  SOS44PGSjS\" 5       (       a  SOS44PGSkPGSl\" 5       (       a  SO\" 5       (       a  SOS\" 5       (       a  \" 5       (       d  SOS44PGSmPGSnPGSoPGSpPGSqGSr\" 5       (       a  GSsOS44PGStS\" 5       (       a  SOS44PGSu\" 5       (       a  GSvOS\" 5       (       a  GSwOS44PGSxPGSy\" 5       (       a  GSzOSS44PGS{\" 5       (       a  SOS\" 5       (       a  SOS44PGS|\" 5       (       a  SOS\" 5       (       a  SOS44PGS}\" 5       (       a  GS~OS\" 5       (       a  GSOS44PGSS\" 5       (       a  SOS44PGS\" 5       (       a  SOS\" 5       (       a  SOS44PGS\" 5       (       a  SOS\" 5       (       a  SOS44PGS\" 5       (       a  SOS\" 5       (       a  SOS44PGS\" 5       (       a  SOS\" 5       (       a  SOS44P5      r0\"" \$\05      r1\$Rd                  " 5        V Vs0 sH  u  pX_M	     snn r3GS\.GS\
\4\   S4   4GS jr5        GSGS\
\.\Rl                  \.   4   GS\	\
\.\Rl                  \.   4      GS\7GS\	\7   GS\	\8\.\.4      GS\	\
\7\.4      GS\	\.   GS\7GS\.GS\8\.\4   4GS jjr9 " GS GS5      r:GSGS/r;gs  snn f (  zAuto Tokenizer class.    N)OrderedDict)AnyOptionalUnion)is_mistral_common_available   )PretrainedConfig)get_class_from_dynamic_moduleresolve_trust_remote_code)load_gguf_checkpoint)PreTrainedTokenizer)TOKENIZER_CONFIG_FILE)cached_fileextract_commit_hashis_g2p_en_availableis_sentencepiece_availableis_tokenizers_availablelogging   )EncoderDecoderConfig   )_LazyAutoMapping)CONFIG_MAPPING_NAMES
AutoConfigconfig_class_to_model_typemodel_type_to_module_name!replace_list_option_in_docstrings)PreTrainedTokenizerFastaimv2CLIPTokenizerCLIPTokenizerFastalbertAlbertTokenizerAlbertTokenizerFastalignBertTokenizerBertTokenizerFastarceeLlamaTokenizerLlamaTokenizerFastaria
aya_visionCohereTokenizerFastbark)bart)BartTokenizerBartTokenizerFastbarthezBarthezTokenizerBarthezTokenizerFast)bartpho)BartphoTokenizerNbertzbert-generationBertGenerationTokenizer)zbert-japanese)BertJapaneseTokenizerN)bertweet)BertweetTokenizerNbig_birdBigBirdTokenizerBigBirdTokenizerFastbigbird_pegasusPegasusTokenizerPegasusTokenizerFast)biogpt)BioGptTokenizerNbitnetr   )
blenderbot)BlenderbotTokenizerBlenderbotTokenizerFast)zblenderbot-small)BlenderbotSmallTokenizerNblipzblip-2GPT2TokenizerGPT2TokenizerFastbloomBloomTokenizerFastbridgetowerRobertaTokenizerRobertaTokenizerFastbros)byt5)ByT5TokenizerN	camembertCamembertTokenizerCamembertTokenizerFast)canine)CanineTokenizerN	chameleonchinese_clipclapclipclipseg)clvp)ClvpTokenizerN
code_llamaCodeLlamaTokenizerCodeLlamaTokenizerFastcodegenCodeGenTokenizerCodeGenTokenizerFastcoherecohere2colpalicolqwen2Qwen2TokenizerQwen2TokenizerFastconvbertConvBertTokenizerConvBertTokenizerFastcpmCpmTokenizerCpmTokenizerFast)cpmant)CpmAntTokenizerN)ctrl)CTRLTokenizerN)zdata2vec-audioWav2Vec2CTCTokenizerNzdata2vec-textdbrxdebertaDebertaTokenizerDebertaTokenizerFastz
deberta-v2DebertaV2TokenizerDebertaV2TokenizerFastdeepseek_v2deepseek_v3deepseek_vldeepseek_vl_hybrid)dia)DiaTokenizerN	diffllama
distilbertDistilBertTokenizerDistilBertTokenizerFastdprDPRQuestionEncoderTokenizerDPRQuestionEncoderTokenizerFastelectraElectraTokenizerElectraTokenizerFastemu3ernieernie4_5ernie4_5_moeernie_mErnieMTokenizer)esm)EsmTokenizerNexaone4falconfalcon_mambaGPTNeoXTokenizerFastfastspeech2_conformerFastSpeech2ConformerTokenizer)flaubert)FlaubertTokenizerNfnetFNetTokenizerFNetTokenizerFast)fsmt)FSMTTokenizerNfunnelFunnelTokenizerFunnelTokenizerFastgemmaGemmaTokenizerGemmaTokenizerFastgemma2gemma3gemma3_textgemma3ngemma3n_textgitglmglm4glm4_moeglm4vzgpt-sw3GPTSw3Tokenizergpt2gpt_bigcodegpt_neogpt_neox)gpt_neox_japanese)GPTNeoXJapaneseTokenizerNgpt_ossgptj)zgptsan-japanese)GPTSanJapaneseTokenizerN)graniterJ   N)
granitemoer   )granitemoehybridr   )granitemoesharedr   zgrounding-dinogroupvitheliumherbertHerbertTokenizerHerbertTokenizerFast)hubertrv   ibertideficsidefics2idefics3instructblipinstructblipvideointernvljambajanusjetmoe)jukebox)JukeboxTokenizerNzkosmos-2XLMRobertaTokenizerXLMRobertaTokenizerFastlayoutlmLayoutLMTokenizerLayoutLMTokenizerFast
layoutlmv2LayoutLMv2TokenizerLayoutLMv2TokenizerFast
layoutlmv3LayoutLMv3TokenizerLayoutLMv3TokenizerFast	layoutxlmLayoutXLMTokenizerLayoutXLMTokenizerFastledLEDTokenizerLEDTokenizerFastliltllamallama4llama4_textllava
llava_nextllava_next_videollava_onevision
longformerLongformerTokenizerLongformerTokenizerFastlongt5T5TokenizerT5TokenizerFast)luke)LukeTokenizerNlxmertLxmertTokenizerLxmertTokenizerFastm2m_100M2M100Tokenizermambamamba2marianMarianTokenizermbartMBartTokenizerMBartTokenizerFastmbart50MBart50TokenizerMBart50TokenizerFastmegazmegatron-bert)zmgp-str)MgpstrTokenizerNminimaxmistralMistralCommonTokenizermixtralmllamamlukeMLukeTokenizerzmm-grounding-dino
mobilebertMobileBertTokenizerMobileBertTokenizerFast
modernbert	moonshinemoshimpnetMPNetTokenizerMPNetTokenizerFastmptmramt5MT5TokenizerMT5TokenizerFastmusicgenmusicgen_melodymvpMvpTokenizerMvpTokenizerFast)myt5)MyT5TokenizerNnemotronnezhanllbNllbTokenizerNllbTokenizerFastznllb-moenystromformerolmoolmo2olmoezomdet-turbo	oneformerz
openai-gptOpenAIGPTTokenizerOpenAIGPTTokenizerFastoptowlv2owlvit	paligemmapegasus	pegasus_x)	perceiver)PerceiverTokenizerN	persimmonphiphi3phimoe)phobert)PhobertTokenizerN
pix2structpixtralplbartPLBartTokenizer)
prophetnet)ProphetNetTokenizerNqdqbertqwen2qwen2_5_omni
qwen2_5_vlqwen2_audio	qwen2_moeqwen2_vlqwen3	qwen3_moe)rag)RagTokenizerNrealmRealmTokenizerRealmTokenizerFastrecurrent_gemmareformerReformerTokenizerReformerTokenizerFastrembertRemBertTokenizerRemBertTokenizerFast	retribertRetriBertTokenizerRetriBertTokenizerFastrobertazroberta-prelayernorm)roc_bert)RoCBertTokenizerNroformerRoFormerTokenizerRoFormerTokenizerFastrwkvseamless_m4tSeamlessM4TTokenizerSeamlessM4TTokenizerFastseamless_m4t_v2shieldgemma2siglipSiglipTokenizersiglip2smollm3speech_to_textSpeech2TextTokenizer)speech_to_text_2)Speech2Text2TokenizerNspeecht5SpeechT5Tokenizer)splinter)SplinterTokenizerSplinterTokenizerFastsqueezebertSqueezeBertTokenizerSqueezeBertTokenizerFaststablelm
starcoder2switch_transformerst5t5gemma)tapas)TapasTokenizerN)tapex)TapexTokenizerN)z
transfo-xl)TransfoXLTokenizerNtvpudopUdopTokenizerUdopTokenizerFastumt5video_llavaviltvipllavavisual_bert)vits)VitsTokenizerNvoxtral)wav2vec2rv   )zwav2vec2-bertrv   )zwav2vec2-conformerrv   )wav2vec2_phoneme)Wav2Vec2PhonemeCTCTokenizerNwhisperWhisperTokenizerWhisperTokenizerFastxclipxglmXGLMTokenizerXGLMTokenizerFast)xlm)XLMTokenizerNzxlm-prophetnetXLMProphetNetTokenizerzxlm-robertazxlm-roberta-xlxlnetXLNetTokenizerXLNetTokenizerFastxlstmxmodyosozambazamba2
class_namereturnc                    U S:X  a  [         $ [        R                  5        Ha  u  pX;   d  M  [        U5      nUS;   a  U S:X  a  [        R
                  " SS5      nO[        R
                  " SU 3S5      n [        X05      s  $    [        R                  R                  5        H#  nU H  n[        USS 5      U :X  d  M  Us  s  $    M%     [        R
                  " S5      n[        XP5      (       a  [        XP5      $ g ! [         a     M  f = f)	Nr   )r  r	  r  z.tokenization_mistral_commontransformers.ztransformers.models__name__)r   TOKENIZER_MAPPING_NAMESitemsr   	importlibimport_modulegetattrAttributeErrorTOKENIZER_MAPPING_extra_contentvalueshasattr)r  module_name
tokenizersmodule	tokenizermain_modules         b/var/www/html/shao/venv/lib/python3.13/site-packages/transformers/models/auto/tokenization_auto.pytokenizer_class_from_namer    s   ..&&#:#@#@#B#3K@K44G_9_"001OQ_`"001[M1BDYZv22 $C (66==?
#Iy*d3zA   $ @ )).9K{''{// " s   7
C==
D
Dpretrained_model_name_or_path	cache_dirforce_downloadresume_downloadproxiestokenrevisionlocal_files_only	subfolderc	                    U	R                  SS5      n
U
b+  [        R                  " S[        5        Ub  [	        S5      eU
nU	R                  S5      n[        U [        UUUUUUUUSSSUS9nUc  [        R                  S5        0 $ [        X5      n[        US	S
9 n[        R                  " U5      nSSS5        UWS'   U$ ! , (       d  f       N= f)a=  
Loads the tokenizer configuration from a pretrained model tokenizer configuration.

Args:
    pretrained_model_name_or_path (`str` or `os.PathLike`):
        This can be either:

        - a string, the *model id* of a pretrained model configuration hosted inside a model repo on
          huggingface.co.
        - a path to a *directory* containing a configuration file saved using the
          [`~PreTrainedTokenizer.save_pretrained`] method, e.g., `./my_model_directory/`.

    cache_dir (`str` or `os.PathLike`, *optional*):
        Path to a directory in which a downloaded pretrained model configuration should be cached if the standard
        cache should not be used.
    force_download (`bool`, *optional*, defaults to `False`):
        Whether or not to force to (re-)download the configuration files and override the cached versions if they
        exist.
    resume_download:
        Deprecated and ignored. All downloads are now resumed by default when possible.
        Will be removed in v5 of Transformers.
    proxies (`dict[str, str]`, *optional*):
        A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
        'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
    token (`str` or *bool*, *optional*):
        The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
        when running `hf auth login` (stored in `~/.huggingface`).
    revision (`str`, *optional*, defaults to `"main"`):
        The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
        git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
        identifier allowed by git.
    local_files_only (`bool`, *optional*, defaults to `False`):
        If `True`, will only try to load the tokenizer configuration from local files.
    subfolder (`str`, *optional*, defaults to `""`):
        In case the tokenizer config is located inside a subfolder of the model repo on huggingface.co, you can
        specify the folder name here.

<Tip>

Passing `token=True` is required when you want to use a private model.

</Tip>

Returns:
    `dict`: The configuration of the tokenizer.

Examples:

```python
# Download configuration from huggingface.co and cache.
tokenizer_config = get_tokenizer_config("google-bert/bert-base-uncased")
# This model does not have a tokenizer config so the result will be an empty dict.
tokenizer_config = get_tokenizer_config("FacebookAI/xlm-roberta-base")

# Save a pretrained tokenizer locally and you can reload its config
from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("google-bert/bert-base-cased")
tokenizer.save_pretrained("tokenizer-test")
tokenizer_config = get_tokenizer_config("tokenizer-test")
```use_auth_tokenNrThe `use_auth_token` argument is deprecated and will be removed in v5 of Transformers. Please use `token` instead.V`token` and `use_auth_token` are both specified. Please set only the argument `token`._commit_hashF)r  r  r  r  r  r  r  r   _raise_exceptions_for_gated_repo%_raise_exceptions_for_missing_entries'_raise_exceptions_for_connection_errorsr  z\Could not locate the tokenizer configuration file, will try to use the model config instead.zutf-8)encoding)popwarningswarnFutureWarning
ValueErrorgetr   r   loggerinfor   openjsonload)r  r  r  r  r  r  r  r  r  kwargsr  commit_hashresolved_config_filereaderresults                  r  get_tokenizer_configr    s    R ZZ 0$7N! A	
 uvv**^,K&%%'))..305   #rs	%&:HK	"W	56" 
6(F>M 
6	5s   C
Cc                   X    \ rS rSrSrS r\\" \5      S 5       5       r	\
SS j5       rSrg)	AutoTokenizeri  a  
This is a generic tokenizer class that will be instantiated as one of the tokenizer classes of the library when
created with the [`AutoTokenizer.from_pretrained`] class method.

This class cannot be instantiated directly using `__init__()` (throws an error).
c                     [        S5      e)Nz}AutoTokenizer is designed to be instantiated using the `AutoTokenizer.from_pretrained(pretrained_model_name_or_path)` method.)OSError)selfs    r  __init__AutoTokenizer.__init__  s    _
 	
    c           	      
   UR                  SS5      nUb<  [        R                  " S[        5        UR	                  S5      b  [        S5      eXCS'   UR                  SS5      nSUS'   UR                  S	S5      nUR                  S
S5      nUR                  SS5      nUR	                  S5      n	Ub  Sn
[        R	                  US5      nUc,  [        SU SSR                  S [         5       5       S35      eUu  pU(       a$  Ub  [        U5      n
O[        R                  S5        U
c  [        U5      n
U
c  [        SU S35      eU
R                  " U/UQ70 UD6$ [        U40 UD6nSU;   a  US   US'   UR	                  S5      nSnSU;   a9  [        US   [        [        45      (       a  US   nOUS   R	                  SS5      nUc  [        U[         5      (       dP  U	(       a0  [#        X40 UD6n[%        USS9S   n[&        R(                  " S(0 UD6nO[&        R                  " U4SU0UD6nUR*                  n[-        US5      (       a  SUR.                  ;   a  UR.                  S   nUSLn[1        U5      [2        ;   =(       d/    USL=(       a$    [        U5      SL=(       d    [        US-   5      SLnU(       aC  U(       a  US   b  US   nOUS   nSU;   a  UR5                  S5      S   nOSn[7        XUUU5      nU(       aN  U(       aG  [9        WU40 UD6n
UR                  SS5      nU
R;                  5         U
R                  " U/UQ7SU0UD6$ Ubg  Sn
U(       a&  UR=                  S5      (       d  U S3n[        U5      n
U
c  Un[        U5      n
U
c  [        SW S 35      eU
R                  " U/UQ70 UD6$ [        U[>        5      (       a{  [1        UR@                  5      [1        URB                  5      LaD  [        R                  S!URB                  RD                   S"UR@                  RD                   S#35        URB                  n[G        [1        U5      RH                  5      nUb`  [2        [1        U5         u  nnU(       a   U(       d  Uc  UR                  " U/UQ70 UD6$ Ub  UR                  " U/UQ70 UD6$ [        S$5      e[        S%URD                   S&SR                  S' [2         5       5       S35      e))ae  
Instantiate one of the tokenizer classes of the library from a pretrained model vocabulary.

The tokenizer class to instantiate is selected based on the `model_type` property of the config object (either
passed as an argument or loaded from `pretrained_model_name_or_path` if possible), or when it's missing, by
falling back to using pattern matching on `pretrained_model_name_or_path`:

List options

Params:
    pretrained_model_name_or_path (`str` or `os.PathLike`):
        Can be either:

            - A string, the *model id* of a predefined tokenizer hosted inside a model repo on huggingface.co.
            - A path to a *directory* containing vocabulary files required by the tokenizer, for instance saved
              using the [`~PreTrainedTokenizer.save_pretrained`] method, e.g., `./my_model_directory/`.
            - A path or url to a single saved vocabulary file if and only if the tokenizer only requires a
              single vocabulary file (like Bert or XLNet), e.g.: `./my_model_directory/vocab.txt`. (Not
              applicable to all derived classes)
    inputs (additional positional arguments, *optional*):
        Will be passed along to the Tokenizer `__init__()` method.
    config ([`PretrainedConfig`], *optional*)
        The configuration object used to determine the tokenizer class to instantiate.
    cache_dir (`str` or `os.PathLike`, *optional*):
        Path to a directory in which a downloaded pretrained model configuration should be cached if the
        standard cache should not be used.
    force_download (`bool`, *optional*, defaults to `False`):
        Whether or not to force the (re-)download the model weights and configuration files and override the
        cached versions if they exist.
    resume_download:
        Deprecated and ignored. All downloads are now resumed by default when possible.
        Will be removed in v5 of Transformers.
    proxies (`dict[str, str]`, *optional*):
        A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
        'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request.
    revision (`str`, *optional*, defaults to `"main"`):
        The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
        git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
        identifier allowed by git.
    subfolder (`str`, *optional*):
        In case the relevant files are located inside a subfolder of the model repo on huggingface.co (e.g. for
        facebook/rag-token-base), specify it here.
    use_fast (`bool`, *optional*, defaults to `True`):
        Use a [fast Rust-based tokenizer](https://huggingface.co/docs/tokenizers/index) if it is supported for
        a given model. If a fast tokenizer is not available for a given model, a normal Python-based tokenizer
        is returned instead.
    tokenizer_type (`str`, *optional*):
        Tokenizer type to be loaded.
    trust_remote_code (`bool`, *optional*, defaults to `False`):
        Whether or not to allow for custom models defined on the Hub in their own modeling files. This option
        should only be set to `True` for repositories you trust and in which you have read the code, as it will
        execute code present on the Hub on your local machine.
    kwargs (additional keyword arguments, *optional*):
        Will be passed to the Tokenizer `__init__()` method. Can be used to set special tokens like
        `bos_token`, `eos_token`, `unk_token`, `sep_token`, `pad_token`, `cls_token`, `mask_token`,
        `additional_special_tokens`. See parameters in the `__init__()` for more details.

Examples:

```python
>>> from transformers import AutoTokenizer

>>> # Download vocabulary from huggingface.co and cache.
>>> tokenizer = AutoTokenizer.from_pretrained("google-bert/bert-base-uncased")

>>> # Download vocabulary from huggingface.co (user-uploaded) and cache.
>>> tokenizer = AutoTokenizer.from_pretrained("dbmdz/bert-base-german-cased")

>>> # If vocabulary files are in a directory (e.g. tokenizer was saved using *save_pretrained('./test/saved_model/')*)
>>> # tokenizer = AutoTokenizer.from_pretrained("./test/bert_saved_model/")

>>> # Download vocabulary from huggingface.co and define model-specific arguments
>>> tokenizer = AutoTokenizer.from_pretrained("FacebookAI/roberta-base", add_prefix_space=True)
```r  Nr  r  r  configT
_from_autouse_fasttokenizer_typetrust_remote_code	gguf_filezPassed `tokenizer_type` z3 does not exist. `tokenizer_type` should be one of z, c              3   "   #    U H  ov   M     g 7fN .0cs     r  	<genexpr>0AutoTokenizer.from_pretrained.<locals>.<genexpr>  s      D,Cq,Cs   r  zt`use_fast` is set to `True` but the tokenizer class does not have a fast version.  Falling back to the slow version.zTokenizer class z is not currently imported.r  tokenizer_classauto_mapr  F)return_tensorsFastr   r   z--code_revisionz- does not exist or is not currently imported.z The encoder model config class: z3 is different from the decoder model config class: z. It is not recommended to use the `AutoTokenizer.from_pretrained()` method in this case. Please use the encoder and decoder specific tokenizer classes.zzThis tokenizer cannot be instantiated. Please make sure you have `sentencepiece` installed in order to use this tokenizer.z!Unrecognized configuration class z8 to build an AutoTokenizer.
Model type should be one of c              3   6   #    U H  oR                   v   M     g 7fr  )r  r  s     r  r  r  {  s     4[IZAZZIZs   r  )%r  r  r  r  r  r  r  joinr  r  warningfrom_pretrainedr  
isinstancetuplelistr	   r   r   r   	for_modelr  r  r  typer  splitr   r
   register_for_auto_classendswithr   decoderencoder	__class__r   r  )clsr  inputsr  r  r  r  r  r  r  r  tokenizer_class_tupletokenizer_class_nametokenizer_fast_class_nametokenizer_configconfig_tokenizer_classtokenizer_auto_map	gguf_pathconfig_dicthas_remote_codehas_local_code	class_refupstream_repo_tokenizer_class_candidate
model_typetokenizer_class_pytokenizer_class_fasts                               r  r  AutoTokenizer.from_pretrained  s   Z  $4d;%MM E zz'". l  -7OHd+#|::j$/$4d;"JJ':DAJJ{+	 %"O$;$?$?PT$U!$, .~.>>qyy D,C DDEQH 
 ?T; ,8&?@Y&ZONN= &";<P"Q& #34H3IId!eff"223PdSYd]cdd 00MXQWX--%5n%EF>"!1!5!56G!H!))*:6FF%5j%A"%5j%A%E%EoW[%\" ")f&677 +,I _X^ _I"6yQV"WX`"aK'11@K@F'775IZ^dF &,%;%;"vz**&///Q%+___%E",D8f):: 
"$. )*@AM Z,-Cf-LMUYY	 	 .q1=.q1	.q1	y  ) 5a 8 $ 9!.Racp! 0;IGdohnoO

?D1A335"22-06J[_e  $/"O 6 ? ? G G/E.Fd,K)";<U"V&,B)";<U"V& &'@&AAno  #223PdSYd]cdd f233FNN#4+??6v~~7O7O6P Q%%+^^%=%=$> ?22 ^^F/V0E0EF
!7Hf7V4 4#5G5O+;;<Ym\bmflmm%1-==>[o^dohnoo$: 
 /0@0@/A B++/994[IZ4[+[*\\]_
 	
r  Nc                    Uc  Uc  [        S5      eUb   [        U[        5      (       a  [        S5      eUb   [        U[        5      (       a  [        S5      eUbD  UbA  [        U[        5      (       a,  UR                  U:w  a  [        SUR                   SU S35      eU [
        R                  ;   a  [
        U    u  pEUc  UnUc  Un[
        R                  XU4US9  g)	ar  
Register a new tokenizer in this mapping.


Args:
    config_class ([`PretrainedConfig`]):
        The configuration corresponding to the model to register.
    slow_tokenizer_class ([`PretrainedTokenizer`], *optional*):
        The slow tokenizer to register.
    fast_tokenizer_class ([`PretrainedTokenizerFast`], *optional*):
        The fast tokenizer to register.
NzKYou need to pass either a `slow_tokenizer_class` or a `fast_tokenizer_classz:You passed a fast tokenizer in the `slow_tokenizer_class`.z:You passed a slow tokenizer in the `fast_tokenizer_class`.zThe fast tokenizer class you are passing has a `slow_tokenizer_class` attribute that is not consistent with the slow tokenizer class you passed (fast tokenizer has z and you passed z!. Fix one of those so they match!)exist_ok)r  
issubclassr   r   slow_tokenizer_classr  r  register)config_classr  fast_tokenizer_classr  existing_slowexisting_fasts         r  r  AutoTokenizer.register~  s     ',@,Hjkk+
;OQh0i0iYZZ+
;OQd0e0eYZZ !,$0/1HII$99=QQ['<<==MNbMc d!!  ,;;;+<\+J(M#+'4$#+'4$""<H\1]hp"qr  r  )NNF)r  
__module____qualname____firstlineno____doc__r  classmethodr   r  r  staticmethodr  __static_attributes__r  r  r  r  r    sH    
 &'>?`
 @ `
D )r )rr  r  r  )NFNNNNF )<r'  r  r  osr  collectionsr   typingr   r   r   transformers.utils.import_utilsr   configuration_utilsr	   dynamic_module_utilsr
   r   modeling_gguf_pytorch_utilsr   tokenization_utilsr   tokenization_utils_baser   utilsr   r   r   r   r   r   encoder_decoderr   auto_factoryr   configuration_autor   r   r   r   r   tokenization_utils_fastr   
get_loggerr  r  strr  r  r  r  CONFIG_TO_TYPEr  r  PathLikebooldictr  r  __all__)kvs   00r  <module>rC     s4%      	  # ' ' G 3 \ ? 5 <  3 *  B" 
		H	% &c5#1M+N&NO{
'>'@'@#d	
{
 %?%A%A!t)@)B)B%	
{
 
?;R;T;T$7Z^_`{
  
#=T=V=V%9\`ab!{
" 
"<S<U<U$8[_`a#{
$ 
7N7P7P3VZ[\%{
& 
/:Q:S:S#6Y]^_'{
( 	9){
, &@&B&B"*A*C*C&	
+{
8 	09{
: 
/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