+
    ~jJ                         ^ RI t ^ RIt^ RIHt ^ RIHtHt ^ RIHt ]	t
]	t]R,          t] ! R R4      4       t] ! R R4      4       t] ! R	 R
4      4       tR# )    N)defaultdict)	dataclassfield)Literalc                   T   a  ] tR t^t o Rt]! RR7      tV 3R lR ltV 3R ltRt	V t
R# )	
TensorInfoa  Information about a tensor.

For more details regarding the safetensors format, check out https://huggingface.co/docs/safetensors/index#format.

Attributes:
    dtype (`str`):
        The data type of the tensor ("F64", "F32", "F16", "BF16", "I64", "I32", "I16", "I8", "U8", "BOOL").
    shape (`list[int]`):
        The shape of the tensor.
    data_offsets (`tuple[int, int]`):
        The offsets of the data in the file as a tuple `[BEGIN, END]`.
    parameter_count (`int`):
        The number of parameters in the tensor.
Finitc                   < V ^8  d   QhRR/#    returnN )format__classdict__s   "w/Users/mitch_tango/dev/rabbit-r1-livekit/agent/.venv/lib/python3.14/site-packages/huggingface_hub/utils/_safetensors.py__annotate__TensorInfo.__annotate__#   s     % %t %    c                     \         P                  ! \        P                  V P                  4      V n        R#   \         d    ^T n         R# i ; i)   N)	functoolsreduceoperatormulshapeparameter_count	TypeError)selfs   &r   __post_init__TensorInfo.__post_init__#   s;    	%#,#3#3HLL$**#MD  	%#$D 	%s   48 AAc                p   < V ^8  d   Qh/ S[ ;R&   S[S[,          ;R&   S[S[S[3,          ;R&   S[;R&   # )r   dtyper   data_offsetsr   )DTYPE_Tlistinttuple)r   r   s   "r   r   r      sD     " N# $ 9% & S/!' ( ,) r   r   N__name__
__module____qualname____firstlineno____doc__r   r   r    __annotate_func____static_attributes____classdictcell__r   s   @r   r   r      s'     $ !e,O% %-  r   r   c                   T   a  ] tR t^+t o Rt]! RR7      tV 3R lR ltV 3R ltRt	V t
R# )	SafetensorsFileMetadataa  Metadata for a Safetensors file hosted on the Hub.

This class is returned by [`parse_safetensors_file_metadata`].

For more details regarding the safetensors format, check out https://huggingface.co/docs/safetensors/index#format.

Attributes:
    metadata (`dict`):
        The metadata contained in the file.
    tensors (`dict[str, TensorInfo]`):
        A map of all tensors. Keys are tensor names and values are information about the corresponding tensor, as a
        [`TensorInfo`] object.
    parameter_count (`dict[str, int]`):
        A map of the number of parameters per data type. Keys are data types and values are the number of parameters
        of that data type.
Fr	   c                   < V ^8  d   QhRR/# r   r   )r   r   s   "r   r   $SafetensorsFileMetadata.__annotate__B   s     5 5t 5r   c                    \        \        4      pV P                  P                  4        F+  pWP                  ;;,          VP
                  ,          uu&   K-  	  \        V4      V n        R # N)r   r'   tensorsvaluesr#   r   dict)r   r   tensors   &  r   r    %SafetensorsFileMetadata.__post_init__B   sH    .9#.>ll))+FLL)V-C-CC) ,#O4r   c                   < V ^8  d   Qh/ S[ S[S[3,          ;R&   S[ S[S[3,          ;R&   S[ S[S[3,          ;R&   # )r   metadatar:   r   )r<   strTENSOR_NAME_Tr   r%   r'   )r   r   s   "r   r   r7   +   sG     & 38n' ( -+,,) * '3,';+ r   r)   Nr*   r3   s   @r   r5   r5   +   s'     & +0U*;O5 5/  r   r5   c                   T   a  ] tR t^It o Rt]! RR7      tV 3R lR ltV 3R ltRt	V t
R# )	SafetensorsRepoMetadataa  Metadata for a Safetensors repo.

A repo is considered to be a Safetensors repo if it contains either a 'model.safetensors' weight file (non-shared
model) or a 'model.safetensors.index.json' index file (sharded model) at its root.

This class is returned by [`get_safetensors_metadata`].

For more details regarding the safetensors format, check out https://huggingface.co/docs/safetensors/index#format.

Attributes:
    metadata (`dict`, *optional*):
        The metadata contained in the 'model.safetensors.index.json' file, if it exists. Only populated for sharded
        models.
    sharded (`bool`):
        Whether the repo contains a sharded model or not.
    weight_map (`dict[str, str]`):
        A map of all weights. Keys are tensor names and values are filenames of the files containing the tensors.
    files_metadata (`dict[str, SafetensorsFileMetadata]`):
        A map of all files metadata. Keys are filenames and values are the metadata of the corresponding file, as
        a [`SafetensorsFileMetadata`] object.
    parameter_count (`dict[str, int]`):
        A map of the number of parameters per data type. Keys are data types and values are the number of parameters
        of that data type.
Fr	   c                   < V ^8  d   QhRR/# r   r   )r   r   s   "r   r   $SafetensorsRepoMetadata.__annotate__j   s     5 5t 5r   c                    \        \        4      pV P                  P                  4        F:  pVP                  P                  4        F  w  r4W;;,          V,          uu&   K  	  K<  	  \        V4      V n        R # r9   )r   r'   files_metadatar;   r   itemsr<   )r   r   file_metadatar#   nb_parameters_s   &    r   r    %SafetensorsRepoMetadata.__post_init__j   s_    .9#.>!00779M)6)F)F)L)L)N%&.8& *O :  $O4r   c                   < V ^8  d   Qh/ S[ R,          ;R&   S[;R&   S[ S[S[3,          ;R&   S[ S[S[3,          ;R&   S[ S[S[3,          ;R&   # )r   Nr@   sharded
weight_maprH   r   )r<   boolrB   
FILENAME_Tr5   r%   r'   )r   r   s   "r   r   rF   I   sg     6 Tk7 8 M9 : ]J.//; < %<<=== > '3,';? r   r)   Nr*   r3   s   @r   rD   rD   I   s(     : +0U*;O5 5C  r   rD   )
F64F32F16BF16I64I32I16I8U8BOOL)r   r   collectionsr   dataclassesr   r   typingr   rA   rQ   rB   r%   r   r5   rD   r   r   r   <module>r_      sv      # (  

V
W % % %: 5 5 5: %5 %5 %5r   