o
    ÓÙ¾iä  ã                   @   sN   d dl mZmZmZmZmZmZmZ d dlZ	d dl
mZ G dd„ deeƒZdS )é    )ÚDictÚHashableÚListÚProtocolÚSetÚTupleÚUnionN)ÚNDArrayc                   @   s¢   e Zd ZU eed< eed< eed< eeef ed< ee ed< deee	e f de
eej eej f fdd	„Zd
eej de	e fdd„Zdedefdd„ZdS )Ú	TokenizerÚ	eos_tokenÚeos_token_idÚpad_token_idÚ
vocabularyÚspecial_tokensÚpromptÚreturnc                 C   ó   dS )zHTranslate the input prompts into arrays of token ids and attention mask.N© )Úselfr   r   r   úM/home/ubuntu/.local/lib/python3.10/site-packages/outlines/models/tokenizer.pyÚencode   s   zTokenizer.encodeÚ	token_idsc                 C   r   )z?Translate an array of token ids to a string or list of strings.Nr   )r   r   r   r   r   Údecode   s   zTokenizer.decodeÚtokenc                 C   r   )u   Convert a token to its equivalent string.

        This is for instance useful for BPE tokenizers where whitespaces are
        represented by the special characted `Ä `. This prevents matching a raw
        token that includes `Ä ` with a string.
        Nr   )r   r   r   r   r   Úconvert_token_to_string   s   z!Tokenizer.convert_token_to_stringN)Ú__name__Ú
__module__Ú__qualname__ÚstrÚ__annotations__Úintr   r   r   r   r   r	   ÚnpÚint64r   r   r   r   r   r   r   r
      s   
 ÿ
þr
   )Útypingr   r   r   r   r   r   r   Únumpyr!   Únumpy.typingr	   r
   r   r   r   r   Ú<module>   s   $ 