
    eThw|                        S SK r S SKrS SKrS SKrS SKrS SKrS SKJrJr  S SK	J
r
Jr  S SKJr  S SKJr  S SKrS SKJrJr  SSKJr  \R,                  " 5       S	:w  a  S SKr\" 5       (       a  S S
KJr  S SKJr  S SKJr  \" 5       (       a  S SKrS SKJ r J!r!J"r"J#r#J$r$  \%" \RL                  \RN                  -   5      r(\%" \RL                  \RR                  -   \RN                  -   S-   5      r*SS0SS0SS0SS0SS0SS0S.r+Sr,SSR[                  \+R]                  5       5       S3r// SQr0 " S S5      r1\
 " S S5      5       r2S \4S! jr3 " S" S#\5      r4g)$    N)ArgumentParser	Namespace)	dataclassfield)Thread)Optional)is_rich_availableis_torch_available   )BaseTransformersCLICommandWindows)Console)Live)Markdown)AutoModelForCausalLMAutoTokenizerBitsAndBytesConfigGenerationConfigTextIteratorStreamerz .!\"#$%&'()*+,\-/:<=>?@[]^_`{|}~textz5There is a Llama in my lawn, how can I get rid of it?zyWrite a Python function that integrates any Python function f(x) numerically over an arbitrary interval [x_start, x_end].z4How many helicopters can a human eat in one sitting?z4Count to 10 but skip every number ending with an 'e'zWhy aren't birds real?z2Why is it important to eat socks after meditating?)llamacode
helicopternumbersbirdssocksaa  

**TRANSFORMERS CHAT INTERFACE**

Chat interface to try out a model. Besides chatting with the model, here are some basic commands:
- **!help**: shows all available commands
- **!status**: shows the current status of the model and generation settings
- **!clear**: clears the current conversation and starts a new one
- **!exit**: closes the interface
am  

**TRANSFORMERS CHAT INTERFACE HELP**

Full command list:
- **!help**: shows this help message
- **!clear**: clears the current conversation and starts a new one
- **!status**: shows the current status of the model and generation settings
- **!example {NAME}**: loads example named `{NAME}` from the config and uses it as the user input.
Available example names: `z`, `a%  `
- **!set {ARG_1}={VALUE_1} {ARG_2}={VALUE_2}** ...: changes the system prompt or generation settings (multiple
settings are separated by a space). Accepts the same flags and format as the `generate_flags` CLI argument.
If you're a new user, check this basic flag guide: https://huggingface.co/docs/transformers/llm_tutorial#common-options
- **!save {SAVE_NAME} (optional)**: saves the current chat and settings to file by default to
`./chat_history/{MODEL_NAME}/chat_{DATETIME}.yaml` or `{SAVE_NAME}` if provided
- **!exit**: closes the interface
)	)max_new_tokens   r   )	do_sampleTr   )	num_beamsr   r    )temperature      ?r!   )top_k2   r#   )top_pr"   r%   )repetition_penaltyr"   r&   )
eos_tokensNeos_token_id)eos_token_idsNr(   c                       \ rS rSrSS\\   S\\   4S jjrS\S\4S jrS\4S	 jr	S
 r
S\4S jrS\S\4S jrSS\4S jjrS\S\S\4S jrSrg)RichInterfacew   N
model_name	user_namec                 f    [        5       U l        Uc  SU l        OXl        Uc  SU l        g X l        g )N	assistantuser)r   _consoler-   r.   )selfr-   r.   s      R/var/www/auris/envauris/lib/python3.13/site-packages/transformers/commands/chat.py__init__RichInterface.__init__x   s/    	)DO(O#DN&N    output_streamreturnc                 r   SnU R                   R                  SU R                   S35        [        U R                   SS9 n[	        U5       H  u  pEU(       a  US:X  a  M  X%-  n/ nUR                  5        HN  nUR                  U5        UR                  S5      (       a  UR                  S5        M=  UR                  S	5        MP     [        SR                  U5      R                  5       S
S9nUR                  U5        M     SSS5        U R                   R                  5         U$ ! , (       d  f       N*= f)zRStream output from a role, and return the generated text after it's done steaming. z[bold blue]<z>:   )consolerefresh_per_secondr   z```
z  
zgithub-dark)
code_themeN)r2   printr-   r   	enumerate
splitlinesappend
startswithr   joinstripupdate)	r3   r8   r   liveioutputslineslinemarkdowns	            r4   stream_outputRichInterface.stream_output   s    
 l4??*;2>?$--A>$'6
!q&  OO-DLL&u-- T*V, . $BGGEN$8$8$:}UH%5 7 ?: 	= ?>s    CD((
D6c                     U R                   R                  SU R                   S35      nU R                   R                  5         U$ )z!Gets user input from the console.[bold red]<z>:
)r2   inputr.   rA   )r3   rS   s     r4   rS   RichInterface.input   s9    ##k$..1A$FGr7   c                 8    U R                   R                  5         g)zClears the console.N)r2   clear)r3   s    r4   rV   RichInterface.clear   s    r7   r   c                     U R                   R                  SU R                   SU 35        U R                   R                  5         g)z%Prints a user message to the console.rR   z>:[/ bold red]
N)r2   rA   r.   )r3   r   s     r4   print_user_message RichInterface.print_user_message   s7    k$..)99I$PQr7   colorc                 z    U R                   R                  SU SU 35        U R                   R                  5         g)z,Prints text in a given color to the console.z[bold ]Nr2   rA   )r3   r   r[   s      r4   print_colorRichInterface.print_color   s1    fUG1TF34r7   minimalc                     U R                   R                  [        U(       a  [        O[        5      5        U R                   R                  5         g)z'Prints the help message to the console.N)r2   rA   r   HELP_STRING_MINIMALHELP_STRING)r3   ra   s     r4   
print_helpRichInterface.print_help   s.    HG%8UVr7   generation_configmodel_kwargsc                     U R                   R                  SU S35        U(       a  U R                   R                  SU 35        U R                   R                  SU 35        U R                   R                  5         g)zFPrints the status of the model and generation settings to the console.z[bold blue]Model: r?   z[bold blue]Model kwargs: z[bold blue]Nr^   )r3   r-   rg   rh   s       r4   print_statusRichInterface.print_status   sf    0B?@MM";L> JKk*;)<=>r7   )r2   r-   r.   )NN)F)__name__
__module____qualname____firstlineno__r   strr5   r   rO   rS   rV   rY   r_   boolre   r   dictrj   __static_attributes__ r7   r4   r+   r+   w   s    	'8C= 	'HSM 	'%+? %C %Ns s 
 C 
$ 
s ?O _c r7   r+   c                      \ rS rSr% Sr\" SSS0S9r\\   \	S'   \" SSS0S9r
\\   \	S	'   \" SSS
0S9r\\   \	S'   \" SSS0S9r\\	S'   \" SSS0S9r\\   \	S'   \" SSS0S9r\\   \	S'   \" SSS0S9r\\	S'   \" SSS0S9r\\	S'   \" SSS0S9r\\	S'   \" SSS0S9r\\	S'   \" SSS 0S9r\\	S!'   \" SSS"0S9r\\	S#'   \" SSS$0S9r\\	S%'   \" SSS&0S9r\\   \	S''   \" SSS(0S9r\\   \	S)'   \" S*SS+0S9r\\	S,'   \" S-SS.0S9r\\	S/'   \" S0S1/ S2QS3.S9r\\   \	S4'   \" S5SS60S9r\\	S7'   \" SSS80S9r\\   \	S9'   \" S5SS:0S9r \\	S;'   \" S5SS<0S9r!\\	S='   \" S>S?S@S>/S3.S9r"\\	SA'   \" S5SSB0S9r#\\	SC'   SDr$g)EChatArguments   z
Arguments for the chat CLI.

See the metadata arg for each argument's description -- the medatata will be printed with
`transformers chat --help`
Nhelpz_Name of the pre-trained model. The positional argument will take precedence if both are passed.)defaultmetadatamodel_name_or_pathzKUsername to display in chat interface. Defaults to the current user's name.r1   zSystem prompt.system_promptz./chat_history/zFolder to save chat history.save_folderz"Path to a yaml file with examples.examples_pathzPath to a local generation config file or to a HuggingFace repo containing a `generation_config.json` file. Other generation settings passed as CLI arguments will be applied on top of this generation config.rg   r   z%Maximum number of tokens to generate.r   Tz,Whether to sample outputs during generation.r   r   z Number of beams for beam search.r    r"   z%Temperature parameter for generation.r!   r$   zValue of k for top-k sampling.r#   z Value of p for nucleus sampling.r%   zRepetition penalty.r&   zNEOS tokens to stop the generation. If multiple they should be comma separated.r'   zQEOS token IDs to stop the generation. If multiple they should be comma separated.r)   mainzLSpecific model version to use (can be a branch name, tag name or commit id).model_revisioncpuzDevice to use for inference.deviceautozOverride the default `torch.dtype` and load the model under this dtype. If `'auto'` is passed, the dtype will be automatically derived from the model's weights.)r   bfloat16float16float32)rx   choicestorch_dtypeFz2Whether to trust remote code when loading a model.trust_remote_codezWhich attention implementation to use; you can run --attn_implementation=flash_attention_2, in which case you must install this manually by running `pip install flash-attn --no-build-isolation`.attn_implementationzIWhether to use 8 bit precision for the base model - works only with LoRA.load_in_8bitzIWhether to use 4 bit precision for the base model - works only with LoRA.load_in_4bitnf4zQuantization type.fp4bnb_4bit_quant_typez#Whether to use nested quantization.use_bnb_nested_quantrt   )%rl   rm   rn   ro   __doc__r   r{   r   rp   __annotations__r1   r|   r}   r~   rg   r   intr   rq   r    r!   floatr#   r%   r&   r'   r)   r   r   r   r   r   r   r   r   r   rs   rt   r7   r4   rv   rv      s    ).u
)   ghD(3-  $)IY@Z#[M8C=[%6&JhAijKj#(Im@n#oM8C=o (-1
	(x} 	  v?f6ghNChDF<j3klItl18Z/[\Is\sf>e5fgKgrV5U,VWE3W8Z/[\E5\ %cVEZ<[ \\ %jk!J  $)mn$M8C=   hiNC  9W0XYFCY!&PA
"K#  $)] ^t  */ r
*#  efL$  efL$   %UFZhmotgu=vww!&uHm?n!o$or7   rv   argsc                     [        U 5      $ )z3
Factory function used to chat with a local model.
)ChatCommandr   s    r4   chat_command_factoryr   %  s     tr7   c                      \ rS rSr\S\4S j5       rS rS\S\4S jr	\S\
4S j5       r\S"S\S
\\
   S\
4S jj5       r\S"S\\
   S\\   4S jj5       rS\\
   S\4S jrS\S\S\\\4   4S jr\S\S\\
   S\\
   S\\\\   4   4S j5       r\S\S\S   4S j5       rS\S\\\4   4S jrS\
S\S\S\\
\\
\
4   4   S\S\S\\   S\\\   \\4   4S jrS  rS!rg	)#r   i,  parserc                     [         4nU R                  SUS9nUR                  S5      nUR                  S[        SSS9  UR                  S[        SS	S
S9  UR                  [        S9  g)z
Register this command to argparse so it's available for the transformer-cli

Args:
    parser: Root parser to register command-specific arguments
chat)dataclass_typeszPositional argumentsmodel_name_or_path_positionalNzName of the pre-trained model.)typery   rx   generate_flagsa  Flags to pass to `generate`, using a space as a separator between flags. Accepts booleans, numbers, and lists of integers, more advanced parameterization should be set through --generation-config. Example: `transformers chat <model_repo> max_new_tokens=100 do_sample=False eos_token_id=[1,2]`. If you're a new user, check this basic flag guide: https://huggingface.co/docs/transformers/llm_tutorial#common-options*)r   ry   rx   nargs)func)rv   
add_parseradd_argument_groupadd_argumentrp   set_defaultsr   )r   r   chat_parsergroups       r4   register_subcommandChatCommand.register_subcommand-  s     )*'''P../EF+#tJj 	 	
 	J
  	 	
 	  &: ;r7   c                 2    U R                  U5      nXl        g N)_handle_deprecated_argsr   )r3   r   s     r4   r5   ChatCommand.__init__J  s    ++D1	r7   r   r9   c           
         SnUR                   =(       d    UR                  Ul         UR                   c  [        S5      eUR                  b  Sn[        R                  " S[
        5        [         H?  u  p4n[        X5      nXd:w  d  M  Sn[        R                  " SU SU SU S3[
        5        MA     U(       a  [        S	5        [        5         U$ )
zr
Handles deprecated arguments and their deprecation cycle. To be removed after we fully migrated to the new
args.
FzOne of the following must be provided:
- The positional argument containing the model repo, e.g. `transformers chat <model_repo>`
- the optional --model_name_or_path argument, containing the model repo (deprecated)TzThe --model_name_or_path argument is deprecated will be removed in v4.54.0. Use the positional argument instead, e.g. `transformers chat <model_repo>`.zThe --a.   argument is deprecated will be removed in v4.54.0. There are two alternative solutions to specify this generation option: 
1. Pass `--generation-config <path_to_file/Hub repo>` to specify a generation config.
2. Pass `generate` flags through positional arguments, e.g. `transformers chat <model_repo> =`z
(Press enter to continue))
r   r{   
ValueErrorwarningswarnFutureWarning_DEPRECATION_MAPgetattrrA   rS   )r3   r   has_warningsdeprecated_argdefault_valuenew_argvalues          r4   r   #ChatCommand._handle_deprecated_argsN  s    
  .2-O-O-jSWSjSj*--5i 
 $$0LMMK 7G2N7D1E%#^, -s iqq	*
 "	 7G /0Gr7   c                      [         R                  " 5       S:X  a  [        R                  " 5       $ [        R
                  " [        R                  " 5       5      R                  $ )z)Returns the username of the current user.r   )platformsystemosgetloginpwdgetpwuidgetuidpw_namert   r7   r4   get_usernameChatCommand.get_usernamey  s:     ??	);;= <<		,444r7   Nfilenamec                    0 n[        U5      US'   XS'   UR                  nUcG  [        R                  " S5      nUR                   SU S3n[
        R                  R                  XB5      n[
        R                  " [
        R                  R                  U5      SS9  [        US	5       n[        R                  " X6S
S9  SSS5        [
        R                  R                  U5      $ ! , (       d  f       N-= f)z!Saves the chat history to a file.settingschat_historyNz%Y-%m-%d_%H-%M-%Sz/chat_.jsonT)exist_okwr<   )indent)varsr}   timestrftimer   r   pathrF   makedirsdirnameopenjsondumpabspath)r   r   r   output_dictfoldertime_strfs          r4   	save_chatChatCommand.save_chat  s     "&t*J&*N#!!}}%89H<<=VH:USHww||F5H
BGGOOH-=(C AIIkQ/ !wwx(( ! s   )C&&
C4r|   c                      U c  / nU$ SU S./nU$ )zClears the chat history.r   rolecontentrt   )r|   r   s     r4   clear_chat_historyChatCommand.clear_chat_history  s*      D  &-@ADr7   r   c           	      "   [        U5      S:X  a  0 $ U Vs0 s H0  nSUR                  S5      S   -   S-   UR                  S5      S   _M2     nnUR                  5        VVs0 s H+  u  pEXER                  5       S;   a  UR                  5       OU_M-     nnnUR                  5        VVs0 s H  u  pEXES:X  a  SOU_M     nnnS[        S	[
        4S
 jnUR                  5        VVs0 s H  u  pEXF" U5      (       d  SU S3OU_M     nnnSR                  UR                  5        VVs/ s H  u  pEU SU 3PM     snn5      nSU-   S-   nUR                  SS5      nUR                  SS5      nUR                  SS5      nUR                  SS5      nUR                  SS5      nUR                  SS5      n [        R                  " U5      nU$ s  snf s  snnf s  snnf s  snnf s  snnf ! [        R                   a    [        S5      ef = f)zUParses the generate flags from the user input into a dictionary of `generate` kwargs.r   "r   r   )truefalseNonenullsr9   c                 D    U R                  SSS5      R                  5       $ )N.r;   r   )replaceisdigit)r   s    r4   	is_number3ChatCommand.parse_generate_flags.<locals>.is_number  s    99S"a(0022r7   z, z: {}z"null"z"true"r   z"false"r   z"[[z]"r]   :zFailed to convert `generate_flags` into a valid JSON object.
`generate_flags` = {generate_flags}
Converted JSON string = {generate_flags_string})lensplititemslowerrp   rq   rF   r   r   loadsJSONDecodeErrorr   )	r3   r   flaggenerate_flags_as_dictkvr   generate_flags_stringprocessed_generate_flagss	            r4   parse_generate_flags ChatCommand.parse_generate_flags  sF   ~!#I
 bp!paoY]#

3(:":S"@$**S/RSBT"Tao!p
 OeNjNjNl"
NldaAGGI)::qwwyANl 	 "
 OeNjNjNl!mNlda!F{V"ANl!m	3 	3 	3 VlUqUqUs!tUsTQ!Yq\\q1Xq"HUs!t
 !%		CYC_C_Ca*bCa41aS1#;Ca*b c !$&; ;c A !6 = =h O 5 = =h O 5 = =i Q 5 = =dC H 5 = =dC H !6 = =c3 G	'+zz2G'H$ ('S "q"
 "n "u
 +c" ## 	D 	s)   7G"2G*G'!G")G(
9G. . H	tokenizerc           
         UR                   c  [        5       nU R                  X!R                  UR                  5      u  pEUR
                  UR                  UR                  UR                  UR                  UR                  UR                  UUS.	nUR                  " S0 UD6  OSUR                   ;   ai  [        R                  R                  UR                   5      n[        R                  R!                  UR                   5      n[        R"                  " Xx5      nO [        R"                  " UR                   5      nU R%                  UR&                  5      n	UR                  " S0 U	D6n
X:4$ )zZ
Returns a GenerationConfig object holding the generation parameters for the CLI command.
)	r   r   r    r!   r#   r%   r&   pad_token_idr(   r   rt   )rg   r   parse_eos_tokensr'   r)   r   r   r    r!   r#   r%   r&   rH   r   r   r   basenamefrom_pretrainedr  r   )r3   r   r  rg   r
  r)   deprecated_kwargsr   r   parsed_generate_flagsrh   s              r4   get_generation_parameterization+ChatCommand.get_generation_parameterization  s4    !!) 0 2*.*?*?	??\`\n\n*o'L"&"5"5!^^!^^#//&*&=&= , -
! $$9'89 $000''//$*@*@A77++D,B,BC$4$D$DW$W!$4$D$DTE[E[$\! !% 9 9$:M:M N(//H2GH !..r7   r'   r)   c                    U R                   c  U R                  nOU R                   n/ nUb/  UR                  U R                  UR	                  S5      5      5        Ub:  UR                  UR	                  S5       Vs/ s H  n[        U5      PM     sn5        [        U5      S:X  a  UR                  U R                  5        X44$ s  snf )z:Retrieves the pad token ID and all possible EOS token IDs.,r   )r
  r(   extendconvert_tokens_to_idsr   r   r   rD   )r  r'   r)   r
  all_eos_token_idstoken_ids         r4   r  ChatCommand.parse_eos_tokens  s    
 !!)$11L$11L!$$Y%D%DZEUEUVYEZ%[\$$$MDWDWX[D\%]D\c(mD\%]^ !Q&$$Y%;%;<.. &^s   <C
model_argsr   c                     U R                   (       a7  [        SU R                  U R                  U R                  U R                  S9nU$ U R
                  (       a  [        SS9nU$ S nU$ )NT)r   bnb_4bit_compute_dtyper   bnb_4bit_use_double_quantbnb_4bit_quant_storage)r   )r   r   r   r   r   r   )r  quantization_configs     r4   get_quantization_config#ChatCommand.get_quantization_config  st    """4!'1'='=$.$B$B*4*I*I'1'='=# #" $$"4!# #" #'""r7   c                    [         R                  " UR                  UR                  UR                  S9nUR
                  S;   a  UR
                  O[        [        UR
                  5      nU R                  U5      nUR                  UR                  USUS.n[        R                  " UR                  4SUR                  0UD6n[        USS 5      c  UR                  UR                  5      nXb4$ )N)revisionr   )r   Nr   )r"  r   r   
device_mapr  r   hf_device_map)r   r  r   r   r   r   r   torchr  r   r   tor   )r3   r   r  r   r  rh   models          r4   load_model_and_tokenizer$ChatCommand.load_model_and_tokenizer&  s    !11..(("44
	 +/*:*:n*Ld&&RYZ_aeaqaqRr"::4@++#'#;#;& #6
 %44..
BFBXBX
\h
 5/408HHT[[)Er7   
user_input	interfaceexamplesrg   rh   r   c                    US:X  a-  U R                  UR                  5      nUR                  5         GO4US:X  a  UR                  5         GOUR	                  S5      (       al  [        UR                  5       5      S:  aO  UR                  5       n[        U5      S:X  a  US   n	OSn	U R                  XrU	5      n	UR                  SU	 S3S	S
9  GOUR	                  S5      (       a  USS R                  5       n
U
R                  5       n
U
 H   nSU;  d  M  UR                  SU S3SS
9    GO=   U R                  U
5      nUR                  " S0 UD6nUR                  " S0 UD6  GOUR	                  S5      (       a  [        UR                  5       5      S:X  a  UR                  5       S   nX;   aB  UR                  5         / nUR                  XN   S   5        UR                  SXN   S   S.5        OwSU S[        UR                  5       5       S3nUR                  USS
9  OFUS:X  a  UR!                  UR"                  UUS9  O$UR                  SU S3SS
9  UR                  5         XuU4$ )z
Handles all user commands except for `!exit`. May update the chat history (e.g. reset it) or the
generation config (e.g. set a new flag).
z!clearz!helpz!save   r   NzChat saved in !green)r   r[   z!setr<   r   z(Invalid flag format, missing `=` after `z;`. Please use the format `arg_1=value_1 arg_2=value_2 ...`.red!exampler   r1   r   zExample z* not found in list of available examples: r   z!status)r-   rg   rh   'z/' is not a valid command. Showing help message.rt   )r   r|   rV   re   rE   r   r   r   r_   rG   r  rH   rY   rD   listkeysrj   r   )r3   r*  r   r+  r,  rg   rh   r   split_inputr   new_generate_flagsr   parsed_new_generate_flagsnew_model_kwargsexample_nameexample_errors                   r4   handle_non_exit_user_commands)ChatCommand.handle_non_exit_user_commandsA  s    !**4+=+=>DOO7"  """7++J4D4D4F0G!0K$**,K;1$&q>~~d(;H!!z'C7!S""6** ",AB!5!5!7!3!9!9!;*d?))Ftf MA A $ *   + -1,E,EFX,Y)#4#;#;#X>W#X ##7&67"":..3z7G7G7I3Ja3O%++-a0L'!,,X-CF-KLV8Nv8VWX |n,VW[\d\i\i\kWlVmmno  %%=%F9$""=="3) #  !!:,6e'fns!t  "44r7   c           
         [        5       (       d  [        S5      e[        5       (       d  [        S5      eU R                  nUR                  c  [
        nO4[        UR                  5       n[        R                  " U5      nS S S 5        UR                  c  U R                  5       nOUR                  nU R                  U5      u  pV[        USSS9nU R                  X5      u  p[        UR                  US9n
U
R!                  5         U R#                  UR$                  5      nU
R'                  SS9    U
R)                  5       nUR+                  S5      (       a8  US:X  a  g U R-                  UUU
WUU	US	9u  pn	UR+                  S
5      (       d  M_  OUR/                  SUS.5        UR1                  USSS9R3                  UR4                  5      n[6        R8                  " U5      nUUUUS.U	En[;        UR<                  US9nUR?                  5         U
RA                  U5      nURC                  5         UR/                  SUS.5        GM  ! , (       d  f       GN= f! [D         a     g f = f)NzHYou need to install rich to use the chat interface. (`pip install rich`)zJYou need to install torch to use the chat interface. (`pip install torch`)T)skip_special_tokensskip_prompt)r-   r.   )ra   r/  z!exit)r*  r   r+  r,  rg   rh   r   r2  r1   r   pt)return_tensorsadd_generation_prompt)inputsattention_maskstreamerrg   )targetkwargsr0   )#r	   ImportErrorr
   r   r~   DEFAULT_EXAMPLESr   yaml	safe_loadr1   r   r(  r   r  r+   r   rV   r   r|   re   rS   rE   r<  rD   apply_chat_templater&  r   r%  	ones_liker   generatestartrO   rF   KeyboardInterrupt)r3   r   r,  r   r1   r'  r  generation_streamerrg   rh   r+  r   r*  rD  rE  generation_kwargsthreadmodel_outputs                     r4   runChatCommand.run  s^    ""hii!##jkkyy%'Hd(()Q>>!, * 99$$&D99D88>29RVdhi*.*N*Nt*_'!T-O-O[_`	&&t'9'9: 	T*+&__.
 ((--!W,@D@b@b'1!%&/%-.?)5!% Ac A= &00<<  = KKJ GH"66tDhl6mppLL "'!8$&4 3):	%
 #%!  u~~>OP(667JK[\JKS % *)z % s+   *I4,I !.I B7I 
I
I*)I*r   r   )rl   rm   rn   ro   staticmethodr   r   r5   rv   r   rp   r   r   r   r4  rr   r   r  r   tupler   r  r   r  r  r   r(  r+   r<  rV  rs   rt   r7   r4   r   r   ,  s   <N < <8'M 'm 'V 5# 5 5 )m )x} )PS ) )$ (3- 4:  1(49 1( 1(f%/!%/.;%/	%	&%/N / /.6sm/LTUXM/	sDI~	/ /0 #M #hG[>\ # #& ]  uEY[hEh?i  6N5N5 N5 !	N5
 sDcN*+N5 ,N5 N5 4jN5 
tDz+T1	2N5dHr7   r   )5r   r   r   stringr   r   argparser   r   dataclassesr   r   	threadingr   typingr   rK  transformers.utilsr	   r
   r;   r   r   r   rich.consoler   	rich.liver   rich.markdownr   r%  transformersr   r   r   r   r   setascii_letters
whitespaceALLOWED_KEY_CHARSdigitsALLOWED_VALUE_CHARSrJ  rc   rF   r5  rd   r   r+   rv   r   r   rt   r7   r4   <module>rj     s     	     . (    D ( ??	!$&  ,,v/@/@@A 
6==(6+<+<<?bb 
 MN) QRNO./JK 	 	 ";;'7'<'<'>?@ A&
 R Rj Up Up Uppy o, or7   