§
    ™Štj6 ã                  ó  — d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl	Z	d dl
mZmZ d dlmZ d dlmZ d dlmZ d dlmZmZmZ d dlZd dlZd dlmZ d dlZd dlmZmZ d d	l m!Z! d d
lm"Z"m#Z# d dlm$Z$m%Z%m&Z& d dl'm(Z( d dl)m*Z+ d dl,m-Z- d dl.m/Z/ d dl0m1Z1m2Z2 d dl3m4Z4m5Z5m6Z6 d dl7m8Z8m9Z9 d dl:m;Z;m<Z<m=Z= d dl>m?Z? d dl@mAZAmBZBmCZCmDZDmEZE d dlFmGZG erd dlmHZH  e+jI        eJ¦  «        ZK G d„ de#jL        e?e¦  «        ZMdS )é    )ÚannotationsN)ÚABCÚabstractmethod)ÚOrderedDict)ÚQueue)ÚPath)ÚTYPE_CHECKINGÚAnyÚLiteral)ÚCardDataÚHfApi)Úversion)ÚTensorÚnn)ÚPreTrainedModelÚis_datasets_availableÚis_torch_npu_available)Úget_relative_import_files)Úlogging)Ú__version__)ÚBaseEvaluator)Úinfer_batch_modalityÚ raise_unsupported_modality_error)ÚModalityÚ	PairInputÚSingleInput)ÚBaseModelCardDataÚgenerate_model_card)ÚModuleÚRouterÚTransformer)ÚPeftAdapterMixin)Úget_device_nameÚimport_module_classÚload_dir_pathÚload_file_pathÚsave_to_hub_args_decorator)ÚORIGINAL_TRANSFORMER_MODELS)ÚPretrainedConfigc                  ó4  ‡ — e Zd ZU dZeZdZded<   i Zded<   dZ	ded	<   ded
<   	 dšdddddddddddddddœd›ˆ fd&„Z
dœd'„Zd�d*„Zdžd+„ZedŸd-„¦   «         Zd d0„Zd¡d2„Zd¢d4„Zd£d6„Zd£d7„Zd¤d8„Zed¥d;„¦   «         Zed¦d=„¦   «         Zd§d@„Zdœˆ fdA„Z	 dšd¨dE„Zd©dH„ZdªdJ„Z	 	 	 	 d«d¬dR„Zd­dT„Z	 	 	 	 d«d¬dU„Z d®dW„Z!	 d¯d°dY„Z"e#	 	 	 	 	 	 	 	 	 d±d²dc„¦   «         Z$	 	 	 	 	 	 	 	 	 	 d³d´de„Z%	 	 	 	 	 	 dµd¶dg„Z&e'	 	 	 	 	 	 dµd¶dh„¦   «         Z(	 	 	 	 	 	 dµd¶di„Z)d·dk„Z*	 	 	 	 	 	 	 d¸d¹dl„Z+	 	 dºd»dm„Z,	 	 	 d¼d½dp„Z-dšd¾du„Z.dšd¿dw„Z/edÀdy„¦   «         Z0	 dšdÁd|„Z1edÂd~„¦   «         Z2d„ Z3edÃd…„¦   «         Z4edÄd†„¦   «         Z5e5j6        dœd‡„¦   «         Z5edÄdˆ„¦   «         Z7ed¢d‰„¦   «         Z8e8j6        dœdŠ„¦   «         Z8edÅdŒ„¦   «         Z9edÆdŽ„¦   «         Z:e:j6        dÇd‘„¦   «         Z:edÀd’„¦   «         Z;e;j6        dšdÈd”„¦   «         Z;edÉd–„¦   «         Z<ed¡d—„¦   «         Z=ed¡d˜„¦   «         Z>dÊd™„Z?ˆ xZ@S )ËÚ	BaseModela  
    Base class for SentenceTransformer, SparseEncoder, and CrossEncoder models.

    This class provides common functionality for:

    - Model loading (from Hub, local paths, or creating new models)
    - Model saving (to disk and Hub)
    - Device management
    - Module architecture (sequential composition)
    - Configuration management
    - Tokenizer/processor access

    All models inherit from nn.Sequential and are composed of a sequence of modules
    that are called sequentially in the forward pass.
    Nú
str | NoneÚ default_huggingface_organizationzdict[str, str | None]Ú_default_promptsÚsentence_transformers_model_idÚstrÚ _model_card_model_id_placeholderÚ
model_typeFÚtorch)ÚmodulesÚdeviceÚpromptsÚdefault_prompt_nameÚcache_folderÚtrust_remote_codeÚrevisionÚlocal_files_onlyÚtokenÚmodel_kwargsÚprocessor_kwargsÚconfig_kwargsÚmodel_card_dataÚbackendÚmodel_name_or_pathr4   ú4list[nn.Module] | OrderedDict[str, nn.Module] | Noner5   r6   údict[str, str] | Noner7   r8   r9   Úboolr:   r;   r<   úbool | str | Noner=   údict[str, Any] | Noner>   r?   r@   úCardData | NonerA   ú$Literal['torch', 'onnx', 'openvino']ÚreturnÚNonec               óŽ  •— t          | j        ¦  «        }|r|                     |¦  «         || _        || _        || _        |p|                      |	¬¦  «        | _        d| _        i | _	        d| _
        || _        |€t          j        d¦  «        }|dk    r|r|pi                      d¦  «        nd}|du}|€.|€,t          ¦   «         }t                                d|› �¦  «         n|r|�t                                d¦  «         |dk    r/t&          j                             d	¦  «        �d
dlm}  |¦   «          |rÃt          j                             |¦  «        s¤t          j                             |¦  «        rt7          d|› d�¦  «        ‚t          j        dk    rd|v s|                     d¦  «        dk    rt=          d|› d�¦  «        ‚| j        �+d|vr'|                      ¦   «         tB          vr| j        › d|› �}|r&|  "                    ||
||||	|||¬¦	  «	        \  }| _        |�;tG          |tH          ¦  «        s&tI          d„ tK          |¦  «        D ¦   «         ¦  «        }|�8tM          |¦  «        d
k    r%tO          dtQ          | ¦  «        j)        › d�¦  «        ‚tU          ¦   «          +                    |¦  «         tY          | d
          -                    ¦   «         d¦  «        }|�H|j.        }t_          |  0                    ¦   «         ¦  «        dd…         D ]}| 1                    |¦  «         Œ|�I| j2        }t_          |  0                    ¦   «         ¦  «        dd…         D ]}| 1                    |¦  «         Œn|  1                    |¦  «         d| _3        |  4                    ¦   «          | j         5                    | ¦  «         dS )aÏ  
        Initialize a BaseModel instance.

        Args:
            model_name_or_path (str, optional): If a filepath on disk, loads the model from that path. Otherwise,
                tries to download a pre-trained model. If that fails, tries to construct a model from the Hugging
                Face Hub with that name. Defaults to None.
            modules (list[nn.Module], optional): A list of torch modules that are called sequentially. Can be used
                to create custom models from scratch. Defaults to None.
            device (str, optional): Device (like ``"cuda"``, ``"cpu"``, ``"mps"``, ``"npu"``) that should be used
                for computation. If None, checks if a GPU can be used. If a ``device_map`` is provided via
                ``model_kwargs``, that controls device placement and this argument is ignored. Defaults to None.
            prompts (dict[str, str], optional): A dictionary with prompts for the model. The key is the prompt
                name, the value is the prompt text. The prompt text will be prepended before any text during inference.
                For example: ``{"query": "query: ", "passage": "passage: "}``. If a model has saved prompts, you
                can override them by passing your own, or pass ``{"query": "", "document": ""}`` to disable them.
                Defaults to None.
            default_prompt_name (str, optional): The name of the prompt that should be used by default. If not
                set, no prompt will be applied. Defaults to None.
            cache_folder (str, optional): Path to store models. Can also be set by the
                ``SENTENCE_TRANSFORMERS_HOME`` environment variable. Defaults to None.
            trust_remote_code (bool, optional): Whether to allow for custom models defined on the Hub in their
                own modeling files. Only 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. Defaults to False.
            revision (str, optional): The specific model version to use. It can be a branch name, a tag name, or
                a commit id, for a stored model on Hugging Face. Defaults to None.
            local_files_only (bool, optional): Whether to only look at local files (i.e., do not try to download
                the model). Defaults to False.
            token (bool or str, optional): Hugging Face authentication token to download private models.
                Defaults to None.
            model_kwargs (dict[str, Any], optional): Keyword arguments passed to the underlying Hugging Face
                Transformers model via ``AutoModel.from_pretrained``. Particularly useful options include:

                - ``torch_dtype``: Override the default ``torch.dtype`` and load the model under a specific
                  dtype. Can be ``torch.float16``, ``torch.bfloat16``, ``torch.float32``, or ``"auto"`` to
                  use the dtype from the model's ``config.json``.
                - ``attn_implementation``: The attention implementation to use. For example ``"eager"``,
                  ``"sdpa"``, or ``"flash_attention_2"``. If you ``pip install kernels``, then
                  ``"flash_attention_2"`` should work without having to install ``flash_attn``. It is
                  frequently the fastest option. Defaults to ``"sdpa"`` when available (torch>=2.1.1).
                - ``device_map``: Controls how the model is placed across devices, e.g. ``"auto"`` for
                  model parallelism, or a single device like ``"cuda:1"`` to load the backbone directly
                  onto one GPU (useful when serving multiple models in one process). When set, it takes
                  precedence over the ``device`` argument.
                - ``provider``: For ``backend="onnx"``, the ONNX execution provider
                  (e.g. ``"CUDAExecutionProvider"``).
                - ``file_name``: For ``backend="onnx"`` or ``"openvino"``, the filename to load
                  (e.g. for optimized or quantized models).
                - ``export``: For ``backend="onnx"`` or ``"openvino"``, whether to export the model to the
                  backend format. Also set automatically if the exported file doesn't exist.

                See the `PreTrainedModel.from_pretrained
                <https://huggingface.co/docs/transformers/en/main_classes/model#transformers.PreTrainedModel.from_pretrained>`_
                documentation for more details. Defaults to None.
            processor_kwargs (dict[str, Any], optional): Keyword arguments passed to the Hugging Face Transformers
                processor/tokenizer via ``AutoProcessor.from_pretrained``. See the
                `AutoTokenizer.from_pretrained
                <https://huggingface.co/docs/transformers/en/model_doc/auto#transformers.AutoTokenizer.from_pretrained>`_
                documentation for more details. Defaults to None.
            config_kwargs (dict[str, Any], optional): Keyword arguments passed to the Hugging Face Transformers
                config via ``AutoConfig.from_pretrained``. See the `AutoConfig.from_pretrained
                <https://huggingface.co/docs/transformers/en/model_doc/auto#transformers.AutoConfig.from_pretrained>`_
                documentation for more details. Defaults to None.
            model_card_data (CardData, optional): A model card data object that contains information about the
                model. Used to generate a model card when saving the model. If not set, a default model card data
                object is created. Defaults to None.
            backend (str, optional): The backend to use for inference. Can be ``"torch"`` (default), ``"onnx"``,
                or ``"openvino"``. Defaults to ``"torch"``.
        )r;   NÚSENTENCE_TRANSFORMERS_HOMEr3   Ú
device_mapzNo device provided, using zŠBoth `device` and `model_kwargs['device_map']` were provided. `device_map` controls device placement, so the `device` argument is ignored.ÚhpuÚoptimumr   )Úadapt_transformers_to_gaudizPath z is a file, not a directory. `model_name_or_path` must be a local directory containing a model, or a Hugging Face Hub model ID.ú\ú/é   z
 not found©r<   r8   r:   r9   r;   r=   r>   r?   c                ó6   — g | ]\  }}t          |¦  «        |f‘ŒS © )r0   )Ú.0ÚidxÚmodules      ú^/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/sentence_transformers/base/model.pyú
<listcomp>z&BaseModel.__init__.<locals>.<listcomp>ë   s'   € Ð"\Ð"\Ð"\¹+¸#¸v¥C¨¡H¤H¨fÐ#5Ð"\Ð"\Ð"\ó    z$An empty modules list was passed to z@. Please provide at least one module, e.g. a Transformer module.F)6Údictr.   Úupdater6   r7   r9   Úmodel_card_data_classr@   Úmodule_kwargsÚ_model_card_varsÚ_model_card_textrA   ÚosÚgetenvÚgetr#   ÚloggerÚinfoÚwarningÚ	importlibÚutilÚ	find_specÚ*optimum.habana.transformers.modeling_utilsrQ   ÚpathÚisdirÚisfileÚNotADirectoryErrorÚsepÚcountÚFileNotFoundErrorr-   Úlowerr(   Ú_load_modulesÚ
isinstancer   Ú	enumerateÚlenÚ
ValueErrorÚtypeÚ__name__ÚsuperÚ__init__ÚnextÚ
parametersÚdtypeÚlistÚchildrenÚtor5   Úis_hpu_graph_enabledÚ_validate_promptsÚregister_model)ÚselfrB   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   Údefault_promptsrN   Údevice_providedrQ   Úfirst_paramÚfirst_dtyperZ   Úbackbone_deviceÚ	__class__s                           €r[   r~   zBaseModel.__init__Q   s`  ø€ õp ˜tÔ4Ñ5Ô5ˆØð 	,Ø×"Ò" 7Ñ+Ô+Ð+Ø&ˆŒØ#6ˆÔ Ø!2ˆÔØ.Ðo°$×2LÒ2LÐ^nÐ2LÑ2oÔ2oˆÔØ!ˆÔØ "ˆÔØ $ˆÔØˆŒàÐÝœ9Ð%AÑBÔBˆLð AHÈ7Ò@RÐ@RÐWiÐ@R�lÐ( b×-Ò-¨lÑ;Ô;Ð;Ðptˆ
Ø ¨Ð,ˆØˆ>˜jÐ0Ý$Ñ&Ô&ˆFÝ�KŠKÐ=°VÐ=Ð=Ñ>Ô>Ð>Ð>Øð 	 Ð!7Ý�NŠNðIñô ð ð
 �UŠ?ˆ?�yœ~×7Ò7¸	ÑBÔBÐNØ^Ð^Ð^Ð^Ð^Ð^à'Ð'Ñ)Ô)Ð)ð ð 	e¥b¤g§m¢mÐ4FÑ&GÔ&Gð 	eÝŒw�~Š~Ð0Ñ1Ô1ð Ý(ð[Ð.ð [ð [ð [ñô ð õ ”˜$’� 4Ð+=Ð#=Ð#=ÐBT×BZÒBZÐ[^ÑB_ÔB_ÐbcÒBcÐBcÝ'Ð(NÐ0BÐ(NÐ(NÐ(NÑOÔOÐOð Ô5ÐAØÐ1Ð1Ð1Ø&×,Ò,Ñ.Ô.Õ6QÐQÐQà(,Ô(MÐ%dÐ%dÐPbÐ%dÐ%dÐ"àð 	Ø*.×*<Ò*<Ø"ØØ)Ø!Ø"3Ø!1Ø)Ø!1Ø+ð +=ñ 
+ô 
+Ñ'ˆG�TÔ'ð Ð¥z°'½;Ñ'GÔ'GÐÝ!Ð"\Ð"\ÍÐSZÑI[ÔI[Ð"\Ñ"\Ô"\Ñ]Ô]ˆGàÐ¥3 w¡<¤<°1Ò#4Ð#4ÝðQµt¸D±z´zÔ7Jð Qð Qð Qñô ð õ
 	‰Œ×Ò˜Ñ!Ô!Ð!õ
 ˜4 œ7×-Ò-Ñ/Ô/°Ñ6Ô6ˆØÐ"Ø%Ô+ˆKÝ˜tŸ}š}™œÑ/Ô/°°°Ô3ð 'ð '�Ø—	’	˜+Ñ&Ô&Ð&Ð&àÐ!ð #œkˆOÝ˜tŸ}š}™œÑ/Ô/°°°Ô3ð +ð +�Ø—	’	˜/Ñ*Ô*Ð*Ð*ð+ð �GŠG�F‰OŒOˆOØ$)ˆÔ!ð 	×ÒÑ Ô Ð ð 	Ô×+Ò+¨DÑ1Ô1Ð1Ð1Ð1r]   c           	     ó  — | j                              ¦   «         D ]\  }}|€
d| j         |<   Œ| j        �M| j        | j         vr?t          d| j        › dt	          | j                              ¦   «         ¦  «        ›d�¦  «        ‚d„ | j                              ¦   «         D ¦   «         x}r:t          |¦  «        }t                               d|› d|d	k    rd
nd› d|› �¦  «         | j        r%t           	                    d| j        › d�¦  «         dS dS )z9Validate prompt configuration and log prompt information.NÚ zDefault prompt name 'ú;' not found in the configured prompts dictionary with keys ú.c                ó$   — g | ]\  }}|d k    ¯|‘ŒS )r�   rW   ©rX   ÚkÚvs      r[   r\   z/BaseModel._validate_prompts.<locals>.<listcomp>  s!   € ÐLÐLÐL¡D A qÀAÈÂGÀG˜aÀGÀGÀGr]   zLoaded z promptrT   Úsz with these keys: zDefault prompt name is set to 'zs'. This prompt will be applied to all inference calls, except if a `prompt` or `prompt_name` parameter is provided.)
r6   Úitemsr7   rz   r‚   Úkeysry   rg   rh   Úwarning_once)rˆ   ÚkeyÚvalueÚnon_empty_keysÚns        r[   r†   zBaseModel._validate_prompts  sk  € ð œ,×,Ò,Ñ.Ô.ð 	'ð 	'‰JˆC�Øˆ}Ø$&�”˜SÑ!øØÔ#Ð/°DÔ4LÐTXÔT`Ð4`Ð4`ÝðG¨Ô(@ð Gð GÝ(,¨T¬\×->Ò->Ñ-@Ô-@Ñ(AÔ(AðGð Gð Gñô ð ð
 MÐL¨D¬L×,>Ò,>Ñ,@Ô,@ÐLÑLÔLÐLˆ>ð 	fÝ�NÑ#Ô#ˆAÝ�KŠKÐd !ÐdÐd°1°q²5°5¨C¨C¸bÐdÐdÐTbÐdÐdÑeÔeÐeØÔ#ð 	Ý×ÒðF°$Ô2Jð Fð Fð Fñô ð ð ð ð	ð 	r]   ÚpromptÚprompt_namec           
     óD  — |€�|�W	 | j         |         }nŒ# t          $ r; t          d|› dt          | j                              ¦   «         ¦  «        ›d�¦  «        ‚w xY w| j        � | j                              | j        d¦  «        }n|�t                               d¦  «         |S )a&  Resolve a prompt from a prompt name or the default prompt name.

        Args:
            prompt: An explicit prompt string, or None.
            prompt_name: A key into ``self.prompts``, or None.

        Returns:
            The resolved prompt string, or None if no prompt applies.
        NzPrompt name 'r‘   r’   zvProvide either a `prompt`, a `prompt_name`, or neither, but not both. Ignoring the `prompt_name` in favor of `prompt`.)	r6   ÚKeyErrorrz   r‚   r™   r7   rf   rg   ri   )rˆ   rŸ   r    s      r[   Ú_resolve_promptzBaseModel._resolve_prompt$  sû   € ð ˆ>ØÐ&ðØ!œ\¨+Ô6�F�FøÝð ð ð Ý$ð O¨ð  Oð  OÕptÐuyô  vB÷  vGò  vGñ  vIô  vIñ  qJô  qJð  Oð  Oð  Oñô ð ðøøøð Ô)Ð5Øœ×)Ò)¨$Ô*BÀDÑIÔI�øØÐ$Ý�NŠNðCñô ð ð ˆs
   † ”AAc                ó   — | j         S )z¦Return the backend used for inference, which can be one of "torch", "onnx", or "openvino".

        Returns:
            str: The backend used for inference.
        )rA   ©rˆ   s    r[   Úget_backendzBaseModel.get_backend?  s   € ð Œ|Ðr]   úlist[Modality]c                ó2   — t          | d         ddg¦  «        S )zmReturn the list of modalities supported by this model, e.g. ``["text"]`` or ``["text", "image", "message"]``.r   Ú
modalitiesÚtext©Úgetattrr¥   s    r[   r©   zBaseModel.modalitiesG  s   € õ �t˜A”w ¨v¨hÑ7Ô7Ð7r]   Úmodalityr   c                óŠ   ‡— | j         Š|‰v rdS t          |t          ¦  «        rd‰v rt          ˆfd„|D ¦   «         ¦  «        S dS )aó  Check if the model supports the given modality.

        A modality is supported if:

        1. It is directly listed in :attr:`modalities` (including tuple modalities that
           are explicitly listed), or
        2. It is a tuple of modalities (e.g. ``("image", "text")``) where each part is
           individually supported and the model also supports ``"message"`` format, which
           is used to combine multiple modalities into a single input.

        Args:
            modality: A single modality string (e.g. ``"text"``, ``"image"``) or a tuple
                of modality strings (e.g. ``("image", "text")``).

        Returns:
            bool: Whether the model supports the given modality.

        Example::

            >>> from sentence_transformers import SentenceTransformer
            >>> model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
            >>> model.supports("text")
            True
            >>> model.supports("image")
            False
        TÚmessagec              3  ó    •K  — | ]}|‰v V — Œ	d S ©NrW   )rX   ÚpartÚ	supporteds     €r[   ú	<genexpr>z%BaseModel.supports.<locals>.<genexpr>k  s(   øè è € Ð>Ð>¨T�t˜yÐ(Ð>Ð>Ð>Ð>Ð>Ð>r]   F)r©   rw   ÚtupleÚall)rˆ   r­   r³   s     @r[   ÚsupportszBaseModel.supportsL  s`   ø€ ð6 ”Oˆ	Ø�yÐ Ð Ø�4Ý�h¥Ñ&Ô&ð 	?¨9¸	Ð+AÐ+AÝÐ>Ð>Ð>Ð>°XÐ>Ñ>Ô>Ñ>Ô>Ð>Øˆur]   ú	list[str]c                ó2  — t          |                      ¦   «         ¦  «        }t          ¦   «         }|rØ|                     ¦   «         \  }}t	          |t
          ¦  «        rP|j                             ¦   «         D ]6}|                     t          |                     ¦   «         ¦  «        ¦  «         Œ7| j	        r)|| j	        v r | 
                    | j	        |         ¦  «         t          |d¦  «        r| 
                    |j        ¦  «         |°Øt          |¦  «        S )aÅ  
        Get the keyword arguments specific to this model for inference methods like `encode` or `predict`.

        Example:

            >>> from sentence_transformers import SentenceTransformer, SparseEncoder
            >>> SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2").get_model_kwargs()
            []
            >>> SentenceTransformer("jinaai/jina-embeddings-v4", trust_remote_code=True).get_model_kwargs()
            ['task', 'truncate_dim']
            >>> SparseEncoder("opensearch-project/opensearch-neural-sparse-encoding-doc-v3-distill").get_model_kwargs()
            ['task']

        Returns:
            list[str]: A list of keyword arguments for the forward pass.
        Úforward_kwargs)r‚   Únamed_childrenÚsetÚpoprw   r    Úsub_modulesÚvaluesÚextendra   r_   Úhasattrrº   )rˆ   r4   rº   Úmodule_namerZ   Úroute_moduless         r[   Úget_model_kwargszBaseModel.get_model_kwargsn  s  € õ" �t×*Ò*Ñ,Ô,Ñ-Ô-ˆÝ™œˆØð 	=Ø")§+¢+¡-¤-ÑˆK˜Ý˜&¥&Ñ)Ô)ð IØ%+Ô%7×%>Ò%>Ñ%@Ô%@ð Ið I�MØ—N’N¥4¨×(DÒ(DÑ(FÔ(FÑ#GÔ#GÑHÔHÐHÐHØÔ!ð G k°TÔ5GÐ&GÐ&GØ×%Ò% dÔ&8¸Ô&EÑFÔFÐFÝ�vÐ/Ñ0Ô0ð =Ø×%Ò% fÔ&;Ñ<Ô<Ð<ð ð 	=õ �NÑ#Ô#Ð#r]   ú
int | Nonec                ó   — | j         S )a_  
        .. deprecated::
            Use the :attr:`max_seq_length` property instead.

        Returns the maximal sequence length that the first module of the model accepts.
        Longer inputs will be truncated.

        Returns:
            Optional[int]: The maximal sequence length that the model accepts, or None if it is not defined.
        ©Úmax_seq_lengthr¥   s    r[   Úget_max_seq_lengthzBaseModel.get_max_seq_lengthŒ  s   € ð Ô"Ð"r]   útorch.nn.Modulec                óZ   — | j         t          t          | j         ¦  «        ¦  «                 S )z4Returns the first module of this sequential embedder)Ú_modulesr   Úiterr¥   s    r[   Ú_first_modulezBaseModel._first_module™  s!   € àŒ}�T¥$ t¤}Ñ"5Ô"5Ñ6Ô6Ô7Ð7r]   c                óZ   — | j         t          t          | j         ¦  «        ¦  «                 S )z3Returns the last module of this sequential embedder)rÌ   r   Úreversedr¥   s    r[   Ú_last_modulezBaseModel._last_module�  s!   € àŒ}�T¥(¨4¬=Ñ"9Ô"9Ñ:Ô:Ô;Ð;r]   c                ót  — | d         }t          |t          ¦  «        r|j        S t          |t          ¦  «        r~|j                             ¦   «         D ]P}t          t          |                     ¦   «         ¦  «        d¦  «        }t          |t          ¦  «        r|j        s dS ŒQt          |j        ¦  «        S dS )a  Check if the first module (Transformer or Router containing Transformers) supports flattened text-only inputs.

        For Router models, this returns True only if ALL routes support flattening, since we cannot
        know at this point which route will be used.
        r   NF)
rw   r!   Úcan_flatten_inputsr    r¾   r¿   r   rÍ   rƒ   rE   )rˆ   Úinput_moduleÚrouteÚfirst_in_routes       r[   Ú_can_flatten_inputszBaseModel._can_flatten_inputs¡  s·   € ð ˜A”wˆÝ�l¥KÑ0Ô0ð 	3ØÔ2Ð2Ý�l¥FÑ+Ô+ð 	2Ø%Ô1×8Ò8Ñ:Ô:ð !ð !�å!%¥d¨5¯>ª>Ñ+;Ô+;Ñ&<Ô&<¸dÑ!CÔ!C�Ý! .µ+Ñ>Ô>ð !ÀnÔFgð !Ø ˜5˜5ð!å˜Ô0Ñ1Ô1Ð1Øˆur]   Ú
sorted_idxú
np.ndarrayc                óº   — t          | ¦  «        }t          j        || j        ¬¦  «        }| d|dz   dz  …         |ddd…<   | |dz
  |dz
  dz  d…         |ddd…<   |S )aJ  Interleave a largest-to-smallest sorted index array so that each consecutive batch
        contains a mix of long and short inputs.

        When text-only inputs are flattened via flash attention, there is no padding. Total tokens per
        batch equals the sum of actual lengths. Grouping all long inputs together creates peak-memory
        batches, while grouping all short inputs together under-utilises the GPU. Interleaving
        (largest, smallest, 2nd largest, 2nd smallest, ...) balances the total token count
        across batches for more uniform memory usage.
        )r�   NrT   é   r   éÿÿÿÿ)ry   ÚnpÚemptyr�   )rØ   rž   Úinterleaveds      r[   Ú_interleave_sorted_indicesz$BaseModel._interleave_sorted_indices³  su   € õ �
‰OŒOˆÝ”h˜q¨
Ô(8Ð9Ñ9Ô9ˆØ& ~¨!¨a©%°A© ~Ô6ˆ�A�D�q�DÑØ& q¨1¡u°°A±¸!©|¸bÐ'@ÔAˆ�A�D�q�DÑØÐr]   Úintc                ó`  — t          | t          ¦  «        rt          | ¦  «        S t          | t          t          f¦  «        r@| r>t          | d         t
          ¦  «        r
d| d         v st          d„ | D ¦   «         ¦  «        S t          | t
          ¦  «        r¯d| v r t                               | d         ¦  «        S d| v r\| d         }t          |t          ¦  «        rt          |¦  «        S t          |t          ¦  «        rt          d„ |D ¦   «         ¦  «        S dS t          d„ |  	                    ¦   «         D ¦   «         ¦  «        S t          | t          ¦  «        r6| r4t          | d         t
          ¦  «        rt          d	„ | D ¦   «         ¦  «        S t          | t          j        t          j        f¦  «        r5t          | t          j        ¦  «        r|                      ¦   «         n| j        S 	 dd
lm} t          | |¦  «        r| j        d         | j        d         z  S n# t$          $ r Y nw xY wdS )zîEstimate the "size" of an input sample for length-based batch sorting.

        The exact value doesn't matter, it's only used to group similarly sized
        inputs together so that padding waste is minimised within each batch.
        r   Úrolec              3  óJ   K  — | ]}t                                |¦  «        V — Œd S r±   ©r+   Ú_input_length)rX   r—   s     r[   r´   z*BaseModel._input_length.<locals>.<genexpr>Ó  s0   è è € ÐFÐF¸!�9×2Ò2°1Ñ5Ô5ÐFÐFÐFÐFÐFÐFr]   ÚarrayÚcontentc           	   3  ó    K  — | ]I}t          |t          ¦  «        ¯t          t          |                     d d¦  «        ¦  «        ¦  «        V — ŒJdS )rª   r�   N)rw   r^   ry   r0   rf   )rX   Úitems     r[   r´   z*BaseModel._input_length.<locals>.<genexpr>Þ  sR   è è € ÐlÐlÀ$ÕU_Ð`dÕfjÑUkÔUkÐl�s¥3 t§x¢x°¸Ñ';Ô';Ñ#<Ô#<Ñ=Ô=ÐlÐlÐlÐlÐlÐlr]   rT   c              3  óJ   K  — | ]}t                                |¦  «        V — Œd S r±   rå   )rX   r–   s     r[   r´   z*BaseModel._input_length.<locals>.<genexpr>á  s0   è è € ÐKÐK°a•y×.Ò.¨qÑ1Ô1ÐKÐKÐKÐKÐKÐKr]   c              3  óJ   K  — | ]}t                                |¦  «        V — Œd S r±   rå   )rX   Úmsgs     r[   r´   z*BaseModel._input_length.<locals>.<genexpr>å  s0   è è € ÐFÐF¸•y×.Ò.¨sÑ3Ô3ÐFÐFÐFÐFÐFÐFr]   )ÚImage)rw   r0   ry   rµ   r‚   r^   Úsumr+   ræ   r¿   rÝ   Úndarrayr3   r   ÚnelementÚsizeÚ	PIL.Imagerî   ÚImportError)Úsamplerè   ÚPILImages      r[   ræ   zBaseModel._input_lengthÄ  sM  € õ �f�cÑ"Ô"ð 	Ý�v‘;”;Ðõ �f�u¥d˜mÑ,Ô,ð 	GØð G�z¨&°¬)µTÑ:Ô:ð G¸vÈÐPQÌÐ?RÐ?RÝÐFÐF¸vÐFÑFÔFÑFÔFÐFõ �f�dÑ#Ô#ð 	LØ˜&Ð Ð Ý ×.Ò.¨v°g¬Ñ?Ô?Ð?Ø˜FÐ"Ð"Ø  Ô+�Ý˜g¥sÑ+Ô+ð (Ý˜w™<œ<Ð'Ý˜g¥tÑ,Ô,ð mÝÐlÐlÈ'ÐlÑlÔlÑlÔlÐlØ�qåÐKÐK¸6¿=º=¹?¼?ÐKÑKÔKÑKÔKÐKõ �f�dÑ#Ô#ð 	G¨ð 	Gµ:¸fÀQ¼iÍÑ3NÔ3Nð 	GÝÐFÐF¸vÐFÑFÔFÑFÔFÐFõ �f�rœz­5¬<Ð8Ñ9Ô9ð 	ZÝ(2°6½5¼<Ñ(HÔ(HÐY�6—?’?Ñ$Ô$Ð$ÈfÌkÐYð	Ø3Ð3Ð3Ð3Ð3Ð3å˜& (Ñ+Ô+ð 7Ø”{ 1”~¨¬°A¬Ñ6Ð6ð7øåð 	ð 	ð 	ØˆDð	øøøð ˆqs   Ç,0H È
H+È*H+Úinputúdict[str, Tensor]c                ó  ‡‡— |                       ¦   «         D ]m\  }Ši }t          ‰t          ¦  «        r|}nEg Š| j        �| j                             |g ¦  «        Šˆˆfd„|                     ¦   «         D ¦   «         } ‰|fi |¤Ž}Œn|S )z.Forward pass through all modules in the model.Nc                óV   •— i | ]%\  }}|‰v st          ‰d ¦  «        ¯|‰j        v ¯"||“Œ&S )rº   )rÁ   rº   )rX   r›   rœ   rZ   Úmodule_kwarg_keyss      €€r[   ú
<dictcomp>z%BaseModel.forward.<locals>.<dictcomp>   sT   ø€ ð !ð !ð !á"˜˜UØÐ/Ð/Ð/µG¸FÐDTÑ4UÔ4UÐ/ÐZ]ÐagÔavÐZvÐZvð ˜àZvÐZvÐZvr]   )r»   rw   r    ra   rf   r˜   )rˆ   r÷   ÚkwargsrÂ   ra   rZ   rû   s        @@r[   ÚforwardzBaseModel.forwardö  s¿   øø€ à#'×#6Ò#6Ñ#8Ô#8ð 	3ð 	3ÑˆK˜ØˆMÝ˜&¥&Ñ)Ô)ð 
Ø &��à$&Ð!ØÔ%Ð1Ø(,Ô(:×(>Ò(>¸{ÈBÑ(OÔ(OÐ%ð!ð !ð !ð !ð !à&,§l¢l¡n¤nð!ñ !ô !�ð
 �F˜5Ð2Ð2 MÐ2Ð2ˆEˆEØˆr]   c                ó6   •—  t          ¦   «         j        |i |¤ŽS )aG  
        Compile the model's forward pass with :func:`torch.compile` to speed up inference.

        All arguments are forwarded to :func:`torch.compile`. Inference (e.g. ``encode()`` or ``predict()``) runs
        the forward pass by calling the model, so compiling the model speeds up these calls.

        .. tip::

            Pass ``dynamic=True`` for inputs with variable sequence lengths, so one compiled kernel handles any
            length. Explicit ``dynamic=False`` recompiles the model for every new sequence length, which adds
            significant overhead.
        )r}   Úcompile)rˆ   Úargsrý   rŽ   s      €r[   r   zBaseModel.compile  s    ø€ ð �u‰wŒwŒ Ð/¨Ð/Ð/Ð/r]   Úinputsúlist[SingleInput | PairInput]údict[str, Tensor | Any]c                ó`  ‡— |si S d}	 t          || j        ¬¦  «        }n# t          t          f$ r Y nw xY w|�A|                      |¦  «        s,t          ||| j        t          | ¦  «        j        › d�¦  «         	  | d         j        |fd‰i|¤Ž}nœ# t          $ r- ‰r|dk    rˆfd„|D ¦   «         } | d         j        |fi |¤Ž}Y nft          $ rZ ‰r|dk    rˆfd„|D ¦   «         }	  | d         j
        |fi |¤Ž}n+# t          $ r | d          
                    |¦  «        }Y nw xY wY nw xY w|S )	a�  
        Preprocesses the inputs for the model.

        Args:
            inputs (list[SingleInput | PairInput]): A list of inputs to be preprocessed. Each input can be a
                string, dict, tuple, PIL Image, numpy array, torch Tensor, or other supported modality.
                If a single input is provided, it must be wrapped in a list.
            prompt (str, optional): A prompt string to prepend to text inputs. Defaults to None.
                If the model supports the ``message`` modality, the prompt will be added as a system message to the
                input messages instead of being prepended to text.
            **kwargs: Forwarded to the input module's ``preprocess``. For :class:`~sentence_transformers.base.modules.Transformer`
                input modules this notably includes ``processing_kwargs``, which overrides the processor kwargs
                configured on the module for this call only (see
                :meth:`Transformer.preprocess <sentence_transformers.base.modules.Transformer.preprocess>`).

        Returns:
            dict[str, Tensor | Any]: A dictionary of tensors with the preprocessed inputs.
        N)Úsupported_modalitiesú modelr   rŸ   rª   c                ór   •— g | ]3}t          |t          ¦  «        r‰|d          z   f|dd…         z   n‰|z   ‘Œ4S ©r   rT   N©rw   rµ   ©rX   ÚinprŸ   s     €r[   r\   z(BaseModel.preprocess.<locals>.<listcomp>E  óM   ø€ ÐuÐuÐuÐgj½*ÀSÍ%Ñ:PÔ:PÐb˜6 C¨¤F™?Ð,¨s°1°2°2¬wÑ6Ð6ÐV\Ð_bÑVbÐuÐuÐur]   c                ór   •— g | ]3}t          |t          ¦  «        r‰|d          z   f|dd…         z   n‰|z   ‘Œ4S r	  r
  r  s     €r[   r\   z(BaseModel.preprocess.<locals>.<listcomp>I  r  r]   )r   r©   rz   Ú	TypeErrorr·   r   r{   r|   Ú
preprocessÚAttributeErrorÚtokenize)rˆ   r  rŸ   rý   r­   Úpreprocesseds     `   r[   r  zBaseModel.preprocess  sÙ  ø€ ð0 ð 	ØˆIð
 ˆð	Ý+¨FÈÌÐYÑYÔYˆHˆHøÝ�IÐ&ð 	ð 	ð 	ØˆDð	øøøð Ð¨¯ª°hÑ(?Ô(?ÐÝ,¨V°X¸t¼ÕSWÐX\ÑS]ÔS]ÔSfÐPnÐPnÐPnÑoÔoÐoð
	8Ø-˜4 œ7Ô-¨fÐNÐN¸VÐNÀvÐNÐNˆLˆLøÝð 	@ð 	@ð 	@Øð v˜( fÒ,Ð,ØuÐuÐuÐuÐntÐuÑuÔu�Ø-˜4 œ7Ô-¨fÐ?Ð?¸Ð?Ð?ˆLˆLˆLÝð 	8ð 	8ð 	8Øð v˜( fÒ,Ð,ØuÐuÐuÐuÐntÐuÑuÔu�ð8Ø/˜t AœwÔ/°ÐAÐA¸&ÐAÐA��øÝð 8ð 8ð 8Ø# Aœw×/Ò/°Ñ7Ô7���ð8øøøøøð	8øøøð ÐsH   ‰   4³4Á;B Â4D+ÃD+Ã(C=Ã<D+Ã=%D%Ä"D+Ä$D%Ä%D+Ä*D+Útextsú.list[str] | list[dict] | list[tuple[str, str]]c                óT   — t                                d¦  «          | j        dd|i|¤ŽS )za
        .. deprecated::
            `tokenize` is deprecated. Use `preprocess` instead.
        zEThe `tokenize` method is deprecated, please use `preprocess` instead.r  rW   )rg   rš   r  )rˆ   r  rý   s      r[   r  zBaseModel.tokenizeQ  s6   € õ 	×ÒÐcÑdÔdÐdØˆtŒÐ6Ð6 eÐ6¨vÐ6Ð6Ð6r]   r
   c                ó  — t           t          f}t          ¦   «         r	 ddlm} ||fz  }n# t
          $ r Y nw xY wt          ||¦  «        rdS t          |t          j        ¦  «        r|j	        dk    r|j
        j        dv rdS dS )zñ
        Check if the input represents a single example or a batch of examples.

        Args:
            inputs: The input to check.
        Returns:
            bool: True if the input is a single example, False if it is a batch.
        r   )ÚColumnFrT   )ÚUÚOT)r‚   rµ   r   Údatasetsr  rô   rw   rÝ   rð   Úndimr�   Úkind)rˆ   r  Ú
list_typesr  s       r[   Úis_singular_inputzBaseModel.is_singular_inputZ  s±   € õ �E�]ˆ
Ý Ñ"Ô"ð 	ðØ+Ð+Ð+Ð+Ð+Ð+à˜v˜iÑ'�
�
øÝð ð ð Ø�ðøøøå�f˜jÑ)Ô)ð 	Ø�5å�f�bœjÑ)Ô)ð 	¨f¬k¸QÒ.>Ð.>À6Ä<ÔCTÐXbÐCbÐCbØ�5Øˆts   ž+ «
8·8Trn   Ú
model_nameÚcreate_model_cardÚtrain_datasetsúlist[str] | NoneÚsafe_serializationc                ó.  — |€dS t          j        |d¬¦  «         t                               d|› �¦  «         g }|                      ¦   «         }t          t           j                             |d¦  «        dd¬¦  «        5 }t          j	        ||d	d¬
¦  «         ddd¦  «         n# 1 swxY w Y   t          | j        ¦  «        D �]W\  }	}
| j        |
         }|	dk    r8t          |d¦  «        r(|j        r!t           j                             |d¦  «        }nEt           j                             |t          |	¦  «        dz   t          |¦  «        j        z   ¦  «        }t          j        |d¬¦  «         	 |                     ||¬¦  «         n%# t$          $ r |                     |¦  «         Y nw xY wt          |¦  «        j        }|                     d¦  «        rÎt*          j        |         j        }t1          |¦  «        t1          |¦  «        j        z  }t5          j        ||¦  «         t9          |¦  «        D ];}t1          |¦  «        t1          |¦  «        j        z  }t5          j        ||¦  «         Œ<|                     d¦  «        d         › dt          |¦  «        j        › �}n|› dt          |¦  «        j        › �}|	|
t           j                             |¦  «        |dœ}| j        r|
| j        v r| j        |
         x}r||d<   |                      |¦  «         �ŒYt          t           j                             |d¦  «        dd¬¦  «        5 }t          j	        ||d	¬¦  «         ddd¦  «         n# 1 swxY w Y   |r|  !                    |||¦  «         dS dS )á—  
        Saves a model and its configuration files to a directory, so that it can be loaded again.

        Args:
            path (str): Path on disk where the model will be saved.
            model_name (str, optional): Optional model name.
            create_model_card (bool, optional): If True, create a README.md with basic information about this model.
            train_datasets (List[str], optional): Optional list with the names of the datasets used to train the model.
            safe_serialization (bool, optional): If True, save the model using safetensors. If False, save the model
                the traditional (but unsafe) PyTorch way.
        NT©Úexist_okzSaving model to ú!config_sentence_transformers.jsonÚwÚutf8©ÚencodingrÛ   )ÚindentÚ	sort_keysr   Úsave_in_rootr�   Ú_)r$  ztransformers_modules.r’   rÜ   )rY   Únamern   r{   rý   úmodules.json)r.  )"rd   Úmakedirsrg   rh   Ú_get_model_configÚopenrn   ÚjoinÚjsonÚdumprx   rÌ   rÁ   r0  r0   r{   r|   Úsaver  Ú
__module__Ú
startswithÚsysr4   Ú__file__r   r2  ÚshutilÚcopyr   ÚsplitÚbasenamera   ÚappendÚ_create_model_card)rˆ   rn   r   r!  r"  r$  Úmodules_configÚconfigÚfOutrY   r2  rZ   Ú
model_pathÚ	class_refÚ
class_fileÚ	dest_fileÚneeded_fileÚmodule_configra   s                      r[   r:  zBaseModel.saver  s  € ð& ˆ<ØˆFå
Œ�D 4Ð(Ñ(Ô(Ð(å�ŠÐ- tÐ-Ð-Ñ.Ô.Ð.Øˆð ×'Ò'Ñ)Ô)ˆÝ•"”'—,’,˜tÐ%HÑIÔIÈ3ÐY_Ð`Ñ`Ô`ð 	>ÐdhÝŒI�f˜d¨1¸Ð=Ñ=Ô=Ð=ð	>ð 	>ð 	>ñ 	>ô 	>ð 	>ð 	>ð 	>ð 	>ð 	>ð 	>øøøð 	>ð 	>ð 	>ð 	>õ # 4¤=Ñ1Ô1ð '	1ñ '	1‰IˆC�Ø!œ]¨4Ô0ˆFà�q’��W V¨^Ñ<Ô<�ÀÔAT�åœWŸ\š\¨$°Ñ3Ô3�
�
åœWŸ\š\¨$µ°C±´¸3±ÅÀfÁÄÔAVÑ0VÑWÔW�
åŒK˜
¨TÐ2Ñ2Ô2Ð2ð(Ø—’˜JÐ;M�ÑNÔNÐNÐNøÝð (ð (ð (Ø—’˜JÑ'Ô'Ð'Ð'Ð'ð(øøøõ ˜V™œÔ/ˆIà×#Ò#Ð$;Ñ<Ô<ð CÝ œ[¨Ô3Ô<�
õ ! Ñ,Ô,µ°ZÑ0@Ô0@Ô0EÑF�	Ý”˜J¨	Ñ2Ô2Ð2õ $=¸ZÑ#HÔ#Hð 8ð 8�KÝ $ ZÑ 0Ô 0µD¸Ñ4EÔ4EÔ4JÑ K�IÝ”K ¨YÑ7Ô7Ð7Ð7ð  )Ÿš¨sÑ3Ô3°BÔ7ÐQÐQ½$¸v¹,¼,Ô:OÐQÐQ�	�	à(ÐBÐB­4°©<¬<Ô+@ÐBÐB�	à$'°½r¼w×?OÒ?OÐPZÑ?[Ô?[ÐenÐoÐoˆMØÔ!ð 8 d¨dÔ.@Ð&@Ð&@ÐW[ÔWiÐjnÔWoÐFoÀmÐ&@Ø*7�˜hÑ'Ø×!Ò! -Ñ0Ô0Ð0Ñ0å•"”'—,’,˜t ^Ñ4Ô4°cÀFÐKÑKÔKð 	6ÈtÝŒI�n d°1Ð5Ñ5Ô5Ð5ð	6ð 	6ð 	6ñ 	6ô 	6ð 	6ð 	6ð 	6ð 	6ð 	6ð 	6øøøð 	6ð 	6ð 	6ð 	6ð ð 	FØ×#Ò# D¨*°nÑEÔEÐEÐEÐEð	Fð 	Fs6   Á>B#Â#B'Â*B'Å/FÆF)Æ(F)ÍM/Í/M3Í6M3údict[str, Any]c                óh   — | j         t          t          j        t          j        dœ| j        | j        dœS )N)Úsentence_transformersÚtransformersÚpytorch)r2   r   r6   r7   )r2   r   rQ  r3   r6   r7   r¥   s    r[   r5  zBaseModel._get_model_configÂ  s<   € àœ/å)4Ý ,Ô 8Ý Ô,ðð ð
 ”|Ø#'Ô#;ð	
ð 	
ð 		
r]   c                ó:   — |                       |||||¬¦  «         dS )r&  ©r   r!  r"  r$  N)r:  )rˆ   rn   r   r!  r"  r$  s         r[   Úsave_pretrainedzBaseModel.save_pretrainedÎ  s8   € ð& 	�	Š	ØØ!Ø/Ø)Ø1ð 	ñ 	
ô 	
ð 	
ð 	
ð 	
r]   Ú
model_cardc                ó¬   — | j         j        rG|                     d| j        j        › d| j        › d�d| j        j        › d| j         j        › d�¦  «        }|S )z.Update the default model ID in the model card.zmodel = z("ú")r@   Úmodel_idÚreplacerŽ   r|   r1   )rˆ   rV  s     r[   Ú_update_default_model_idz"BaseModel._update_default_model_idé  sl   € àÔÔ(ð 	Ø#×+Ò+Ø^˜4œ>Ô2Ð^Ð^°dÔ6[Ð^Ð^Ð^ØV˜4œ>Ô2ÐVÐV°dÔ6JÔ6SÐVÐVÐVñô ˆJð Ðr]   Ú
deprecatedc                óZ  — |r;t          |¦  «        }|                     ¦   «         s| j        j        s|| j        _        || j        _        | j        r+d| j        j        vr| j        }|                      |¦  «        }nQ	 t          | ¦  «        }n@# t          $ r3 t                               dt          j        ¦   «         › d�¦  «         Y dS w xY wt          t          j                             |d¦  «        dd¬¦  «        5 }|                     |¦  «         ddd¦  «         dS # 1 swxY w Y   dS )	a�  
        Create an automatic model card and store it in the specified path.

        Args:
            path (str): The path where the model card will be stored.
            model_name (Optional[str], optional): The name of the model. Defaults to None.
            train_datasets (Optional[List[str]], optional): Deprecated argument, ignored.

        Returns:
            None
        Úgenerated_from_trainerz#Error while generating model card:
z‹Consider opening an issue on https://github.com/huggingface/sentence-transformers/issues with this traceback.
Skipping model card creation.Nú	README.mdr*  r+  r,  )r   Úexistsr@   rY  Úsave_dirrc   Útagsr[  r   Ú	Exceptionrg   ÚerrorÚ	tracebackÚ
format_excr6  rd   rn   r7  Úwrite)rˆ   rn   r   r"  rH  rV  rG  s          r[   rD  zBaseModel._create_model_cardò  s”  € ð ð 	;Ý˜jÑ)Ô)ˆJØ×$Ò$Ñ&Ô&ð ;¨tÔ/CÔ/Lð ;Ø0:�Ô$Ô-ð )-ˆÔÔ%ð Ô ð 	Ð%=ÀTÔEYÔE^Ð%^Ð%^ØÔ.ˆJØ×6Ò6°zÑBÔBˆJˆJðÝ0°Ñ6Ô6�
�
øÝð ð ð Ý—’ð4½9Ô;OÑ;QÔ;Qð 4ð 4ð 4ñô ð ð
 ��ðøøøõ •"”'—,’,˜t [Ñ1Ô1°3ÀÐHÑHÔHð 	#ÈDØ�JŠJ�zÑ"Ô"Ð"ð	#ð 	#ð 	#ñ 	#ô 	#ð 	#ð 	#ð 	#ð 	#ð 	#ð 	#ð 	#øøøð 	#ð 	#ð 	#ð 	#ð 	#ð 	#s$   Á=B Â9C
Ã	C
Ã=D Ä D$Ä'D$úAdd new model.Úrepo_idÚorganizationÚprivateúbool | NoneÚcommit_messageÚlocal_model_pathr(  Úreplace_model_cardc                óh  — t                                d¦  «         |ryd|vr)t                                d|› d|› d�¦  «         |› d|› �}nL|                     d¦  «        d         |k    rt          d¦  «        ‚t                                d|› d�¦  «         |                      ||||||||	|
¬¦	  «	        S )aY  
        DEPRECATED, use `push_to_hub` instead.

        Uploads all elements of this model to a new HuggingFace Hub repository.

        Args:
            repo_id (str): Repository name for your model in the Hub, including the user or organization.
            token (str, optional): An authentication token (See https://huggingface.co/settings/token)
            private (bool, optional): Set to true, for hosting a private model
            safe_serialization (bool, optional): If true, save the model using safetensors. If false, save the model the traditional PyTorch way
            commit_message (str, optional): Message to commit while pushing.
            local_model_path (str, optional): Path of the model locally. If set, this file path will be uploaded. Otherwise, the current model will be uploaded
            exist_ok (bool, optional): If true, saving to an existing repository is OK. If false, saving only to a new repository is possible
            replace_model_card (bool, optional): If true, replace an existing model card in the hub with the automatically created model card
            train_datasets (List[str], optional): Datasets used to train the model. If set, the datasets will be added to the model card in the Hub.

        Returns:
            str: The url of the commit of your model in the repository on the Hugging Face Hub.
        z¢The `save_to_hub` method is deprecated and will be removed in a future version of SentenceTransformers. Please use `push_to_hub` instead for future model uploads.rS   zQProviding an `organization` to `save_to_hub` is deprecated. Please use `repo_id="z"` instead.r   zYProviding an `organization` to `save_to_hub` is deprecated. Please use `repo_id` instead.)	ri  r<   rk  r$  rm  rn  r(  ro  r"  )rg   ri   rA  rz   Úpush_to_hub)rˆ   ri  rj  r<   rk  r$  rm  rn  r(  ro  r"  s              r[   Úsave_to_hubzBaseModel.save_to_hub  s  € õB 	�ŠðJñ	
ô 	
ð 	
ð
 ð 	Ø˜'Ð!Ð!Ý—’ð LÐhtð  Lð  LÐw~ð  Lð  Lð  Lñô ð ð *Ð5Ð5¨GÐ5Ð5��Ø—’˜sÑ#Ô# AÔ&¨,Ò6Ð6Ý Øoñô ð õ —’Ø|ÐhoÐ|Ð|Ð|ñô ð ð ×ÒØØØØ1Ø)Ø-ØØ1Ø)ð  ñ 

ô 

ð 
	
r]   Ú	create_prc                óò  — t          |¬¦  «        }|                     ||d|p|¬¦  «        }|j        }| j                             |¦  «         |
�|                     ||
d¬¦  «         |€>|                      ¦   «         }|dk    rd| j        j        › d�}nd| j        j        › d	|› d
�}d}|r(d| j        j        › d| › d|  	                    |¦  «        › �}|r | 
                    ||||r|nd||
¬¦  «        }nÒt          j        ¦   «         5 }|rd}ni	 t          |d||
d¬¦  «        }|du }nO# t          $ rB}t                               d|›dt#          |¦  «        j        › d|› d�¦  «         d}Y d}~nd}~ww xY w|                      ||||	|¬¦  «         | 
                    ||||r|nd||
¬¦  «        }ddd¦  «         n# 1 swxY w Y   |r)t                               d|j        › �¦  «         |j        S |j        S )az  
        Uploads all elements of this model to a HuggingFace Hub repository, creating it if it doesn't exist.

        Args:
            repo_id (str): Repository name for your model in the Hub, including the user or organization.
            token (str, optional): An authentication token (See https://huggingface.co/settings/token)
            private (bool, optional): Set to true, for hosting a private model
            safe_serialization (bool, optional): If true, save the model using safetensors. If false, save the model the traditional PyTorch way
            commit_message (str, optional): Message to commit while pushing.
            local_model_path (str, optional): Path of the model locally. If set, this file path will be uploaded. Otherwise, the current model will be uploaded
            exist_ok (bool, optional): If true, saving to an existing repository is OK. If false, saving only to a new repository is possible
            replace_model_card (bool, optional): If true, replace an existing model card in the hub with the
                automatically created model card. If false (default), keep the existing model card if one exists
                in the repository.
            train_datasets (List[str], optional): Datasets used to train the model. If set, the datasets will be added to the model card in the Hub.
            revision (str, optional): Branch to push the uploaded files to
            create_pr (bool, optional): If True, create a pull request instead of pushing directly to the main branch

        Returns:
            str: The url of the commit of your model in the repository on the Hugging Face Hub.
        )r<   N)ri  rk  Ú	repo_typer(  T)ri  Úbranchr(  r3   zAdd new r  z model with an z backendr�   zBHello!

This pull request has been automatically generated to add z1 compatibility.

## Full Model Architecture:
```
z
```

)ri  Úfolder_pathrm  Úcommit_descriptionrs  r:   r_  F)r<   r:   r;   z-Could not check for an existing README.md on ú (ú: zG). Skipping model card creation to avoid overwriting any existing card.rT  z#A pull request has been created at )r   Úcreate_repori  r@   Úset_model_idÚcreate_branchr¦   rŽ   r|   Ú_push_to_hub_usage_tipÚupload_folderÚtempfileÚTemporaryDirectoryr&   rc  rg   ri   r{   r:  rh   Úpr_urlÚ
commit_url)rˆ   ri  r<   rk  r$  rm  rn  r(  ro  r"  r:   rs  ÚapiÚrepo_urlrA   rx  Ú
folder_urlÚtmp_dirÚcreate_model_card_for_pathÚexisting_readmeÚexcs                        r[   rq  zBaseModel.push_to_hub\  sK  € õF ˜%Ð Ñ Ô ˆØ—?’?ØØØØÐ* ð	 #ñ 
ô 
ˆð Ô"ˆØÔ×)Ò)¨'Ñ2Ô2Ð2ØÐØ×Ò g°hÈÐÑNÔNÐNàÐ!Ø×&Ò&Ñ(Ô(ˆGØ˜'Ò!Ð!Ø!K¨D¬NÔ,CÐ!KÐ!KÐ!K��à!e¨D¬NÔ,CÐ!eÐ!eÐT[Ð!eÐ!eÐ!e�àÐØð 	*ð
"*ð <@¼>Ô;Rð
"*ð 
"*ð ð
"*ð 
"*ð ×Ò˜WÑ%Ô%ð
"*ð 
"*Ðð ð *	Ø×*Ò*ØØ,Ø-Ø9BÐ#LÐ#5Ð#5ÈØ#Ø!ð +ñ ô ˆJˆJõ Ô,Ñ.Ô.ð  °'Ø%ð ;Ø15Ð.Ð.ð

;Ý*8Ø# [¸ÈÐchð+ñ +ô +˜ð 6EÈÐ5LÐ2Ð2øÝ$ð ;ð ;ð ;ÝŸšðcÈGð cð cÕY]Ð^aÑYbÔYbÔYkð cð cÐorð cð cð cñô ð ð 6;Ð2Ð2Ð2Ð2Ð2Ð2øøøøð;øøøð —	’	ØØ&Ø&@Ø#1Ø'9ð ñ ô ð ð !×.Ò.Ø#Ø 'Ø#1Ø=FÐ'PÐ'9Ð'9ÈDØ'Ø%ð /ñ ô �
ð3 ð  ð  ñ  ô  ð  ð  ð  ð  ð  ð  øøøð  ð  ð  ð  ðD ð 	%Ý�KŠKÐQ¸jÔ>OÐQÐQÑRÔRÐRØÔ$Ð$àÔ$Ð$s<   ÄF<ÄD(Ä'F<Ä(
E4Ä28E/Å*F<Å/E4Å4<F<Æ<G ÇG úDtuple[list[nn.Module] | OrderedDict[str, nn.Module], dict[str, Any]]c
           	     óÖ  — ||||||||	dœ}
t          |d||||¬¦  «        }|€4t                               d|› d| j        › d�¦  «          | j        |fi |
¤ŽS |                      |||||¬¦  «        }|| j        k    r4t                               d| j        › d|› d	�¦  «          | j        |fi |
¤ŽS t                               d
|› d|› d| j        › d	�¦  «          | j        |fi |
¤d|i¤ŽS )NrU   r3  ©r<   r8   r:   r;   zNo modules.json found for z, initializing a new z model.zLoading z model from r’   zConverting z model z to r2   )r&   rg   rh   r2   Ú_load_default_modulesÚ_get_model_typeÚ_load_config_modulesÚ_load_converted_modules)rˆ   rB   r<   r8   r:   r9   r;   r=   r>   r?   Úload_kwargsÚmodules_json_pathÚmodel_type_being_loadeds                r[   rv   zBaseModel._load_modulesÒ  sz  € ð Ø(Ø Ø!2Ø 0Ø(Ø 0Ø*ð	
ð 	
ˆõ +ØØØØ%ØØ-ð
ñ 
ô 
Ðð Ð$Ý�KŠKÐvÐ5GÐvÐvÐ^bÔ^mÐvÐvÐvÑwÔwÐwØ-�4Ô-Ð.@ÐPÐPÀKÐPÐPÐPà"&×"6Ò"6ØØØ%ØØ-ð #7ñ #
ô #
Ðð # d¤oÒ5Ð5Ý�KŠKÐU 4¤?ÐUÐUÐ@RÐUÐUÐUÑVÔVÐVØ,�4Ô,Ð-?ÐOÐOÀ;ÐOÐOÐOå�ŠÐlÐ"9ÐlÐlÐBTÐlÐlÐZ^ÔZiÐlÐlÐlÑmÔmÐmØ+ˆtÔ+Ð,>ÐrÐrÀ+ÐrÐrÐZqÐrÐrÐrÐrr]   c
                ó   — dS )a  

        Args:
            model_name_or_path (str): The name or path of the pre-trained model.
            token (Optional[Union[bool, str]]): The token to use for the model.
            cache_folder (Optional[str]): The folder to cache the model.
            revision (Optional[str], optional): The revision of the model. Defaults to None.
            trust_remote_code (bool, optional): Whether to trust remote code. Defaults to False.
            local_files_only (bool, optional): Whether to use only local files. Defaults to False.
            model_kwargs (Optional[Dict[str, Any]], optional): Additional keyword arguments for the model. Defaults to None.
            processor_kwargs (Optional[Dict[str, Any]], optional): Additional keyword arguments for the processor/tokenizer. Defaults to None.
            config_kwargs (Optional[Dict[str, Any]], optional): Additional keyword arguments for the config. Defaults to None.

        Returns:
            List[nn.Module]: A list containing the transformer model and the pooling model.
        NrW   )
rˆ   rB   r<   r8   r:   r9   r;   r=   r>   r?   s
             r[   rŽ  zBaseModel._load_default_modules  s   € € € r]   c
                óÀ  — t          |d||||¬¦  «        }
|
�Ít          |
d¬¦  «        5 }t          j        |¦  «        }ddd¦  «         n# 1 swxY w Y   d|v rwd|d         v rmt	          j        |d         d         ¦  «        t	          j        t          ¦  «        k    r2t                               d|d         d         › d	t          › d
�¦  «         |  	                    |¦  «         	 t          |d||||¬¦  «        }nO# t          $ rB}t                               d|›dt          |¦  «        j        › d|› d�¦  «         d}Y d}~nd}~ww xY w|�T	 t          |d¬¦  «        5 }|                     ¦   «         | _        ddd¦  «         n# 1 swxY w Y   n# t          $ r Y nw xY wt          |d||||¬¦  «        }t          |d¬¦  «        5 }t          j        |¦  «        }ddd¦  «         n# 1 swxY w Y   t          ¦   «         }t          ¦   «         }|D �]º}|d         }|                      ||||||||¬¦  «        }t#          j        |j        ¦  «        }t'          |j        ¦  «        dk    �rt#          j        |j        ¦  «        }t-          |j        ¦  «        }h d£|z  }ddh|k    }|s|ršt/          j        ||d         ||||||||	| j        ¬¦  «        }ddddœ}|r8|s6|                     ¦   «         D ]!\  }}||v r|                     |¦  «        ||<   Œ"ddh}|D ]}||v r||vr|                     |¦  «         Œ  ||fi |¤Ž} n\t9          ||d         ||||¬¦  «        }!|                     |!¦  «        } n+|                     ||d         ||||||||	| j        ¬¦  «        } | ||d          <   |                     d!g ¦  «        ||d          <   �Œ¼|€ot=          |¦  «        }"t'          |"j        ¦  «        d"k    rHt=          |¦  «        j        d#         }#t'          |#¦  «        d$k    rtA          d%„ |#D ¦   «         ¦  «        r|#}|s| j!         "                    ||¬&¦  «         ||fS )'a‹  
        Loads a full model using the modules.json file.

        Args:
            model_name_or_path (str): The name or path of the pre-trained model.
            token (Optional[Union[bool, str]]): The token to use for the model.
            cache_folder (Optional[str]): The folder to cache the model.
            revision (Optional[str], optional): The revision of the model. Defaults to None.
            trust_remote_code (bool, optional): Whether to trust remote code. Defaults to False.
            local_files_only (bool, optional): Whether to use only local files. Defaults to False.
            model_kwargs (Optional[Dict[str, Any]], optional): Additional keyword arguments for the model. Defaults to None.
            processor_kwargs (Optional[Dict[str, Any]], optional): Additional keyword arguments for the processor/tokenizer. Defaults to None.
            config_kwargs (Optional[Dict[str, Any]], optional): Additional keyword arguments for the config. Defaults to None.

        Returns:
            Tuple[OrderedDict[str, nn.Module], OrderedDict[str, Any]]: An ordered dictionary containing the modules of the model and their kwargs.
        r)  r�  Nr+  r,  r   rP  z:This model was created with Sentence Transformers version z, but you're using version zD. Consider updating to the latest version to avoid potential issues.r_  zCould not fetch README.md from ry  rz  z(). Model will load without a model card.r3  r{   )r<   r8   r;   rT   >   Ú
model_argsÚconfig_argsÚtokenizer_argsr=   r?   rn   )
Ú	subfolderr<   r8   r:   r;   r9   r=   r>   r?   rA   r—  r™  r˜  )r=   r>   r?   Úmodality_configÚmodule_output_name)rB   rš  r<   r8   r:   r;   r2  rý   rÛ   éþÿÿÿé(   c              3  ó   K  — | ]}|d v V — Œ	dS )Ú0123456789abcdefNrW   )rX   Úcs     r[   r´   z1BaseModel._load_config_modules.<locals>.<genexpr>ä  s)   è è € Ð8mÐ8mÐUV¸Ð>PÐ9PÐ8mÐ8mÐ8mÐ8mÐ8mÐ8mr]   )r:   )#r&   r6  r8  Úloadr   Úparser   rg   ri   Ú_parse_model_configrc  r{   r|   Úreadrc   r   Ú_load_module_class_from_refÚinspectÚ	signaturery   r€   r~   r¼   r!   Ú_load_init_kwargsrA   r˜   r½   r%   rf   r   Úpartsr¶   r@   Úset_base_model)$rˆ   rB   r<   r8   r:   r9   r;   r=   r>   r?   Ú&config_sentence_transformers_json_pathÚfInÚmodel_configÚmodel_card_pathrŠ  r“  rE  r4   ra   rM  rI  Úmodule_classÚload_signaturer¨  Úinit_paramsÚuses_old_namesÚuses_new_namesÚinit_kwargsÚnew_to_old_name_mappingÚnew_nameÚold_nameÚoptional_paramsrZ   Ú
local_pathÚ
path_partsÚrevision_path_parts$                                       r[   r�  zBaseModel._load_config_modules"  sŸ  € õ< 2@ØØ/ØØ%ØØ-ð2
ñ 2
ô 2
Ð.ð 2Ð=ÝÐ<ÀvÐNÑNÔNð .ÐRUÝ#œy¨™~œ~�ð.ð .ð .ñ .ô .ð .ð .ð .ð .ð .ð .øøøð .ð .ð .ð .ð  Ð-Ð-Ø+¨|¸MÔ/JÐJÐJÝ”M ,¨}Ô"=Ð>UÔ"VÑWÔWÕZaÔZgÕhsÑZtÔZtÒtÐtå—’ðBÐQ]Ð^kÔQlð  nEô  RFð Bð BÝ0;ðBð Bð Bñô ð ð
 ×$Ò$ \Ñ2Ô2Ð2ð	#Ý,Ø"ØØØ)Ø!Ø!1ðñ ô ˆOˆOøõ ð 	#ð 	#ð 	#Ý�NŠNð8Ð2Dð 8ð 8Í$ÈsÉ)Ì)ÔJ\ð 8ð 8Ð`cð 8ð 8ð 8ñô ð ð #ˆOˆOˆOˆOˆOˆOøøøøð	#øøøð Ð&ðÝ˜/°FÐ;Ñ;Ô;ð 7¸sØ,/¯HªH©J¬J�DÔ)ð7ð 7ð 7ñ 7ô 7ð 7ð 7ð 7ð 7ð 7ð 7øøøð 7ð 7ð 7ð 7øøåð ð ð Ø�ðøøøõ +ØØØØ%ØØ-ð
ñ 
ô 
Ðõ Ð#¨fÐ5Ñ5Ô5ð 	,¸Ý!œY s™^œ^ˆNð	,ð 	,ð 	,ñ 	,ô 	,ð 	,ð 	,ð 	,ð 	,ð 	,ð 	,øøøð 	,ð 	,ð 	,ð 	,õ ‘-”-ˆÝ#™œˆØ+ð `	Sñ `	SˆMØ% fÔ-ˆIØ#'×#CÒ#CØØ"Ø!ØØØØ)Ø!1ð $Dñ 	$ô 	$ˆLõ %Ô.¨|Ô/@ÑAÔAˆNõ �>Ô,Ñ-Ô-°Ò2Ñ2Ý#Ô-¨lÔ.CÑDÔD�	õ " )Ô"6Ñ7Ô7�Ø!PÐ!PÐ!PÐS^Ñ!^�Ø"0°/Ð!BÀkÒ!Q�Ø!ð 0; ^ð 0;Ý"-Ô"?Ø*à"/°Ô"7Ø#Ø%1Ø!)Ø)9à*;Ø%1Ø)9Ø&3Ø $¤ð#ñ #ô #�Kð$ )5Ø,<Ø)6ð/ð /Ð+ð
 &ð R¨nð RØ2I×2OÒ2OÑ2QÔ2Qð Rð RÑ.˜H hØ'¨;Ð6Ð6Ø8C¿ºÈÑ8QÔ8Q ¨HÑ 5øð (9Ð:NÐ&O�OØ$3ð 6ð 6˜Ø# {Ð2Ð2°xÀ{Ð7RÐ7RØ'ŸOšO¨HÑ5Ô5Ð5øà)˜\Ð*<ÐLÐLÀÐLÐL�F�Fõ "/Ø+=Ø"/°Ô"7Ø#Ø%1Ø!)Ø)9ð"ñ "ô "�Jð *×.Ò.¨zÑ:Ô:�F�Fð
 &×*Ò*Ø&à+¨FÔ3ØØ!-Ø%Ø%5à&7Ø!-Ø%5Ø"/Ø œLð +ñ ô �ð  .4ˆG�M &Ô)Ñ*Ø3@×3DÒ3DÀXÈrÑ3RÔ3RˆM˜-¨Ô/Ñ0Ñ0àÐÝÐ/Ñ0Ô0ˆJÝ�:Ô#Ñ$Ô$¨Ò)Ð)Ý%)Ð*;Ñ%<Ô%<Ô%BÀ2Ô%FÐ"ÝÐ)Ñ*Ô*¨bÒ0Ð0µSÐ8mÐ8mÐZlÐ8mÑ8mÔ8mÑ5mÔ5mÐ0Ø1�HØð 	WØÔ ×/Ò/Ð0BÈXÐ/ÑVÔVÐVØ˜Ð%Ð%sq   ©A
Á
AÁAÃ&C< Ã<
EÄ8EÅEÅF ÅFÅ9F ÆF	Æ	F ÆF	ÆF Æ
FÆFÇG(Ç(G,Ç/G,r®  c                óê   — |                      di ¦  «                             ¦   «         D ]%\  }}|| j        vs| j        |         €
|| j        |<   Œ&| j        €|                      dd¦  «        | _        dS dS )aò  Parse model configuration and merge saved prompts/defaults with user-provided values.

        User-provided prompts and default_prompt_name take precedence over saved config values.
        Saved prompts are only used for keys not already present in ``self.prompts``, or where the
        current value is ``None`` (i.e. a default placeholder, not yet filled by the user or config).
        Empty string ``""`` is treated as an intentional user-provided value and will not be overwritten.
        r6   Nr7   )rf   r˜   r6   r7   )rˆ   r®  r    Úprompt_texts       r[   r¤  zBaseModel._parse_model_configê  sŠ   € ð )5×(8Ò(8¸ÀBÑ(GÔ(G×(MÒ(MÑ(OÔ(Oð 	8ð 	8Ñ$ˆK˜Ø $¤,Ð.Ð.°$´,¸{Ô2KÐ2SØ,7�”˜[Ñ)øØÔ#Ð+Ø'3×'7Ò'7Ð8MÈtÑ'TÔ'TˆDÔ$Ð$Ð$ð ,Ð+r]   c                ó>   — |                       |||||||||	¬¦	  «	        S )NrU   )rŽ  )rˆ   rB   r<   r8   r:   r9   r;   r=   r>   r?   r2   s              r[   r‘  z!BaseModel._load_converted_modulesù  s<   € ð ×)Ò)ØØØ%ØØ/Ø-Ø%Ø-Ø'ð *ñ 

ô 

ð 
	
r]   c                óÞ   — t          |d||||¬¦  «        }|€dS t          |d¬¦  «        5 }t          j        |¦  «        }|                     dd¦  «        cddd¦  «         S # 1 swxY w Y   dS )at  
        Retrieves the model_type from the config_sentence_transformers.json file.

        This is used to determine whether the model being loaded matches the current class
        (e.g., a SentenceTransformer model loaded with SentenceTransformer, or a SparseEncoder model
        loaded with SparseEncoder). When the model type doesn't match, we switch to a converted
        loading method to ensure compatibility.

        Defaults to "SentenceTransformer" if the config file is missing or has no "model_type" key,
        for backwards compatibility with older models.

        Args:
            model_name_or_path (str): The name or path of the pre-trained model.
            token (Optional[Union[bool, str]]): The token to use for the model.
            cache_folder (Optional[str]): The folder to cache the model.
            revision (Optional[str], optional): The revision of the model. Defaults to None.
            local_files_only (bool, optional): Whether to use only local files. Defaults to False.

        Returns:
            str: The model type, e.g. "SentenceTransformer", "SparseEncoder", or "CrossEncoder".
        r)  r�  NÚSentenceTransformerr+  r,  r2   )r&   r6  r8  r¢  rf   )	rˆ   rB   r<   r8   r:   r;   r¬  r­  rF  s	            r[   r�  zBaseModel._get_model_type  sá   € õ: 2@ØØ/ØØ%ØØ-ð2
ñ 2
ô 2
Ð.ð 2Ð9Ø(Ð(åÐ8À6ÐJÑJÔJð 	CÈcÝ”Y˜s‘^”^ˆFà—:’:˜lÐ,AÑBÔBð	Cð 	Cð 	Cð 	Cñ 	Cô 	Cð 	Cð 	Cð 	Cð 	Cð 	Cð 	Cøøøð 	Cð 	Cð 	Cð 	Cð 	Cð 	Cs   «*A"Á"A&Á)A&rI  ú	nn.Modulec	           
     ód   — |r|                      dd¦  «        nd}	t          |||||	|||¬¦  «        S )aÁ  
        Load a module class from a class reference string.

        Args:
            class_ref: The class reference string (e.g., "sentence_transformers.sentence_transformer.modules.Pooling")
            model_name_or_path: The model name or path
            trust_remote_code: Whether to trust remote code
            revision: The model revision
            model_kwargs: Additional model kwargs
            token: Hub auth token, required for private repos when fetching custom modeling files.
            cache_folder: Optional override for the Hub cache directory.
            local_files_only: Restrict to local cache (no Hub network calls).

        Returns:
            The module class
        Úcode_revisionN)rB   r9   r:   rÄ  r<   r8   r;   )r½   r$   )
rˆ   rI  rB   r9   r:   r=   r<   r8   r;   rÄ  s
             r[   r¦  z%BaseModel._load_module_class_from_ref@  sU   € ð6 DPÐY˜×(Ò(¨¸$Ñ?Ô?Ð?ÐUYˆÝ"ØØ1Ø/ØØ'ØØ%Ø-ð	
ñ 	
ô 	
ð 		
r]   Ú	evaluatorr   Úoutput_pathúdict[str, float] | floatc                óJ   — |�t          j        |d¬¦  «          || |¦  «        S )a?  
        Evaluate the model based on an evaluator

        Args:
            evaluator (BaseEvaluator): The evaluator used to evaluate the model.
            output_path (str, optional): The path where the evaluator can write the results. Defaults to None.

        Returns:
            The evaluation results.
        NTr'  )rd   r4  )rˆ   rÅ  rÆ  s      r[   ÚevaluatezBaseModel.evaluateg  s1   € ð Ð"ÝŒK˜¨dÐ3Ñ3Ô3Ð3Øˆy˜˜{Ñ+Ô+Ð+r]   Úgradient_checkpointing_kwargsc                óÒ   — |                       ¦   «         D ]Q}|| urKt          |d¦  «        r;	 |                     |¦  «         Œ-# t          $ r |                     ¦   «          Y ŒMw xY wŒRdS )z,Enable gradient checkpointing for the model.Úgradient_checkpointing_enableN)r4   rÁ   rÌ  r  )rˆ   rÊ  rZ   s      r[   rÌ  z'BaseModel.gradient_checkpointing_enablev  s‘   € ð —l’l‘n”nð 	;ð 	;ˆFØ˜TÐ!Ð!¥g¨fÐ6UÑ&VÔ&VÐ!ð;Ø×8Ò8Ð9VÑWÔWÐWÐWøÝ ð ;ð ;ð ;Ø×8Ò8Ñ:Ô:Ð:Ð:Ð:ð;øøøøð		;ð 	;s   ¬AÁA#Á"A#útorch.devicec                ó  — | j         x}�t          |d¦  «        r|j        S t          | j        ¦  «        rCt          | d         d¦  «        r-t          | d         j        d¦  «        r| d         j        j        S 	 t          |                      ¦   «         ¦  «        j        S # t          $ r` dd	„}|  	                    |¬
¦  «        }	 t          |¦  «        }|d         j        cY S # t          $ r t          j        d¦  «        cY cY S w xY ww xY w)z¡
        Get torch.device from module, assuming that the whole module has one device.
        In case there are no PyTorch parameters, fall back to CPU.
        Nr5   r   Ú
auto_modelrZ   rÂ  rJ   úlist[tuple[str, Tensor]]c                óL   — d„ | j                              ¦   «         D ¦   «         }|S )Nc                óD   — g | ]\  }}t          j        |¦  «        ¯||f‘ŒS rW   )r3   Ú	is_tensorr”   s      r[   r\   zDBaseModel.device.<locals>.find_tensor_attributes.<locals>.<listcomp>’  s0   € Ð[Ð[Ð[¡T Q¨ÍÌÐXYÑHZÔHZÐ[˜1˜a˜&Ð[Ð[Ð[r]   )Ú__dict__r˜   )rZ   Útupless     r[   Úfind_tensor_attributesz0BaseModel.device.<locals>.find_tensor_attributes‘  s(   € Ø[Ð[¨V¬_×-BÒ-BÑ-DÔ-DÐ[Ñ[Ô[�Ø�r]   )Úget_members_fnrT   Úcpu)rZ   rÂ  rJ   rÐ  )Útransformers_modelrÁ   r5   ry   rÌ   rÏ  r   r€   ÚStopIterationÚ_named_membersr3   )rˆ   rÙ  rÖ  ÚgenÚfirst_tuples        r[   r5   zBaseModel.device€  s@  € ð #'Ô"9Ð9ÐÐFÍ7ÐSeÐgoÑKpÔKpÐFØ%Ô,Ð,åˆtŒ}ÑÔð 	-¥'¨$¨q¬'°<Ñ"@Ô"@ð 	-ÅWÈTÐRSÌWÔM_ÐaiÑEjÔEjð 	-Ø˜”7Ô%Ô,Ð,ð	+Ý˜ŸšÑ)Ô)Ñ*Ô*Ô1Ð1øÝð 	+ð 	+ð 	+ðð ð ð ð ×%Ò%Ð5KÐ%ÑLÔLˆCð+Ý" 3™iœi�Ø" 1”~Ô,Ð,Ð,Ð,øÝ ð +ð +ð +Ý”| EÑ*Ô*Ð*Ð*Ð*Ð*Ð*ð+øøøð	+øøøs0   Á9%B Â$D	ÃC"ÃD	Ã"DÄ D	ÄDÄD	Útarget_devicesú2dict[Literal['input', 'output', 'processes'], Any]c           	     ó~  — |€¸t           j                             ¦   «         r6d„ t          t           j                             ¦   «         ¦  «        D ¦   «         }ndt          ¦   «         r6d„ t          t           j                             ¦   «         ¦  «        D ¦   «         }n t                               d¦  «         dgdz  }t                               dd 	                    t          t          |¦  «        ¦  «        › �¦  «         |                      d¦  «         |                      ¦   «          t          j        d	¦  «        }|                     ¦   «         }|                     ¦   «         }g }|D ]Q}|                     | j        j        || ||fd
¬¦  «        }|                     ¦   «          |                     |¦  «         ŒR|||dœS )aT  
        Starts a multi-process pool to infer with several independent processes.

        This method is recommended if you want to predict on multiple GPUs or CPUs. It is advised
        to start only one process per GPU. This method works together with predict and
        stop_multi_process_pool.

        Args:
            target_devices (List[str], optional): PyTorch target devices, e.g. ["cuda:0", "cuda:1", ...],
                ["npu:0", "npu:1", ...], or ["cpu", "cpu", "cpu", "cpu"]. If target_devices is None and CUDA/NPU
                is available, then all available CUDA/NPU devices will be used. If target_devices is None and
                CUDA/NPU is not available, then 4 CPU devices will be used.

        Returns:
            Dict[str, Any]: A dictionary with the target processes, an input queue, and an output queue.
        Nc                ó   — g | ]}d |› �‘ŒS )zcuda:rW   ©rX   Úis     r[   r\   z6BaseModel.start_multi_process_pool.<locals>.<listcomp>±  s   € Ð!XÐ!XÐ!X°! +¨! + +Ð!XÐ!XÐ!Xr]   c                ó   — g | ]}d |› �‘ŒS )znpu:rW   râ  s     r[   r\   z6BaseModel.start_multi_process_pool.<locals>.<listcomp>³  s   € Ð!VÐ!VÐ!V° *¨ * *Ð!VÐ!VÐ!Vr]   z1CUDA/NPU is not available. Starting 4 CPU workersrØ  é   z(Starting multi-process pool on devices: z, ÚspawnT)Útargetr  Údaemon)r÷   ÚoutputÚ	processes)r3   ÚcudaÚis_availableÚrangeÚdevice_countr   Únpurg   rh   r7  Úmapr0   r„   Úshare_memoryÚmpÚget_contextr   ÚProcessrŽ   Ú_multi_process_workerÚstartrC  )rˆ   rÞ  ÚctxÚinput_queueÚoutput_queuerê  Ú	device_idÚps           r[   Ústart_multi_process_poolz"BaseModel.start_multi_process_poolœ  s™  € ð& Ð!ÝŒz×&Ò&Ñ(Ô(ð -Ø!XÐ!Xµu½U¼Z×=TÒ=TÑ=VÔ=VÑ7WÔ7WÐ!XÑ!XÔ!X��Ý'Ñ)Ô)ð -Ø!VÐ!Vµe½E¼I×<RÒ<RÑ<TÔ<TÑ6UÔ6UÐ!VÑ!VÔ!V��å—’ÐOÑPÔPÐPØ"' ¨1¡�å�ŠÐd¸t¿yºyÍÍSÐR`ÑIaÔIaÑ?bÔ?bÐdÐdÑeÔeÐeð 	�Š�‰ŒˆØ×ÒÑÔÐÝŒn˜WÑ%Ô%ˆØ—i’i‘k”kˆØ—y’y‘{”{ˆØˆ	à'ð 	 ð 	 ˆIØ—’Ø”~Ô;Ø  {°LÐAØð ñ ô ˆAð
 �GŠG‰IŒIˆIØ×Ò˜QÑÔÐÐà$°È9ÐUÐUÐUr]   Úpoolc                ó  — | d         D ]}|                      ¦   «          Œ| d         D ]*}|                     ¦   «          |                     ¦   «          Œ+| d                              ¦   «          | d                              ¦   «          dS )zí
        Stops all processes started with start_multi_process_pool.

        Args:
            pool (Dict[str, object]): A dictionary containing the input queue, output queue, and process list.

        Returns:
            None
        rê  r÷   ré  N)Ú	terminater7  Úclose)rý  rû  s     r[   Ústop_multi_process_poolz!BaseModel.stop_multi_process_poolÎ  s‰   € ð �kÔ"ð 	ð 	ˆAØ�KŠK‰MŒMˆMˆMà�kÔ"ð 	ð 	ˆAØ�FŠF‰HŒHˆHØ�GŠG‰IŒIˆIˆIàˆWŒ×ÒÑÔÐØˆXŒ×ÒÑÔÐÐÐr]   c                ó    — t          d¦  «        ‚)Nú0This method should be implemented in subclasses.©ÚNotImplementedError)rˆ   r  rý   s      r[   Ú_multi_processzBaseModel._multi_processã  s   € Ý!Ð"TÑUÔUÐUr]   Útarget_deviceÚmodelrø  r   Úresults_queuec                ó    — t          d¦  «        ‚)af  Worker function for multi-process inference. Must be overridden by subclasses.

        This is called as the target function in each spawned process by
        :meth:`start_multi_process_pool`. Subclasses should implement this to
        read from ``input_queue``, run inference on ``target_device``, and write
        results to ``results_queue``.
        r  r  )r  r  rø  r	  s       r[   rõ  zBaseModel._multi_process_workeræ  s   € õ "Ð"TÑUÔUÐUr]   c                ó   — | d         j         S )zJ
        Property to get the tokenizer that is used by this model
        r   )Ú	tokenizerr¥   s    r[   r  zBaseModel.tokenizerö  ó   € ð
 �AŒwÔ Ð r]   c                ó–   — 	 || d         _         dS # t          $ r- t          dt          | d         ¦  «        j        › d�¦  «        d‚w xY w)zQ
        Property to set the tokenizer that should be used by this model
        r   zThe first module (z() does not have a 'tokenizer' attribute.N)r  r  r{   r|   ©rˆ   rœ   s     r[   r  zBaseModel.tokenizerý  sd   € ð
	Ø %ˆD�ŒGÔÐÐøÝð 	ð 	ð 	Ý Øe¥T¨$¨q¬'¡]¤]Ô%;ÐeÐeÐeñô àðð	øøøs	   ‚ ‘7Ac                ó   — | d         j         S )zJ
        Property to get the processor that is used by this model
        r   )Ú	processorr¥   s    r[   r  zBaseModel.processor	  r  r]   c                ó0   — t          | d         dd¦  «        S )zÓ
        Returns the maximal input sequence length for the model. Longer inputs will be truncated.

        Returns:
            Optional[int]: The maximal input sequence length, or None if not defined.
        r   rÈ   Nr«   r¥   s    r[   rÈ   zBaseModel.max_seq_length  s   € õ �t˜A”wÐ 0°$Ñ7Ô7Ð7r]   c                ó    — || d         _         dS )zs
        Property to set the maximal input sequence length for the model. Longer inputs will be truncated.
        r   NrÇ   r  s     r[   rÈ   zBaseModel.max_seq_length  s   € ð
 "'ˆˆQŒÔÐÐr]   úPreTrainedModel | Nonec                ó¢   — |                       ¦   «         D ]9}t          |t          ¦  «        r	|j        c S t          |t          ¦  «        r|c S Œ:dS )a¦  
        Property to get the underlying transformers PreTrainedModel instance, if it exists.
        Note that it's possible for a model to have multiple underlying transformers models, but this property
        will return the first one it finds in the module hierarchy.

        .. note::

            This property can also return e.g. ORTModelForFeatureExtraction or OVModelForFeatureExtraction instances
            from the optimum-intel and optimum-onnx libraries, if the model is loaded using ``backend="onnx"`` or
            ``backend="openvino"``.

        Returns:
            PreTrainedModel or None: The underlying transformers model or None if not found.
        N)r4   rw   r!   r  r   )rˆ   rZ   s     r[   rÙ  zBaseModel.transformers_model!  s`   € ð  —l’l‘n”nð 	ð 	ˆFå˜&¥+Ñ.Ô.ð $Ø”|Ð#Ð#Ð#Ý˜&¥/Ñ2Ô2ð Ø���ðàˆtr]   úPretrainedConfig | Nonec                ó2   — | j         }t          |dd¦  «        S )ad  The transformers ``PretrainedConfig`` of the underlying model.

        Several integrations (most notably Deepspeed and ``transformers.Trainer``) read
        ``model.config.hidden_size`` directly. Without this delegation those integrations
        crash with ``AttributeError: 'SentenceTransformer' object has no attribute 'config'``
        because :class:`BaseModel` is an ``nn.Sequential`` rather than a ``PreTrainedModel``.

        Returns the config of :attr:`transformers_model`, or ``None`` when no underlying
        transformers model can be located (e.g. a pure StaticEmbedding-only setup).
        rF  N)rÙ  r¬   )rˆ   Ú
underlyings     r[   rF  zBaseModel.config9  s   € ð Ô,ˆ
Ý�z 8¨TÑ2Ô2Ð2r]   rœ   r)   c                ó*   — | j         }|�	||_        dS dS )z…Sets the config on the underlying transformer model.
        Has no effect if the model has no underlying transformer model.
        N)rÙ  rF  )rˆ   rœ   r  s      r[   rF  zBaseModel.configH  s(   € ð
 Ô,ˆ
ØÐ!Ø %ˆJÔÐÐð "Ð!r]   c                óz   — t                                d| j        j        › d| j        j        › d�¦  «         | j        S )Nú`z2._target_device` has been deprecated. Please use `z.device` instead.)rg   ri   rŽ   r|   r5   r¥   s    r[   Ú_target_devicezBaseModel._target_deviceQ  sV   € å�Šð F�”Ô'ð  Fð  FÐ[_Ô[iÔ[rð  Fð  Fð  Fñ	
ô 	
ð 	
ð Œ{Ðr]   úint | str | torch.device | Nonec                ó€   — t                                d| j        j        › d�¦  «         |                      |¦  «         d S )Nr  zF._target_device` has been deprecated. Please use `to(device)` instead.)rg   ri   rŽ   r|   r„   )rˆ   r5   s     r[   r  zBaseModel._target_deviceX  s@   € å�ŠØo�”Ô'ÐoÐoÐoñ	
ô 	
ð 	
ð 	�Š�‰Œˆˆˆr]   útorch.dtype | Nonec                ór   — 	 t          |                      ¦   «         ¦  «        j        S # t          $ r Y dS w xY w)zw
        `torch.dtype`: The dtype of the module (assuming that all the module parameters have the same dtype).
        N)r   r€   r�   rÚ  r¥   s    r[   r�   zBaseModel.dtype_  sD   € ð
	Ý˜ŸšÑ)Ô)Ñ*Ô*Ô0Ð0øÝð 	ð 	ð 	Ø�4�4ð	øøøs   ‚%( ¨
6µ6c                ó   — g S )zc
        Return the list of modules that should not be split when using model parallelism.
        rW   r¥   s    r[   Ú_no_split_moduleszBaseModel._no_split_modulesi  ó	   € ð
 ˆ	r]   c                ó   — g S )zJ
        Return the list of keys to ignore when saving the model.
        rW   r¥   s    r[   Ú_keys_to_ignore_on_savez!BaseModel._keys_to_ignore_on_savep  r#  r]   c           	     ó`   — | j         j        }|                      ¦   «         }d|› d|› d|› d|› d�	S )zšReturn a usage tip snippet for the push_to_hub PR description.

        Subclasses can override this to provide model-type-specific example code.
        z·## Testing this pull request
You can test this pull request before merging by loading the model from this PR with the `revision` argument:
```python
from sentence_transformers import zO

# NOTE: Update this to the number of your pull request
pr_number = 2
model = z(
    "z5",
    revision=f"refs/pr/{pr_number}",
    backend="z	",
)
```
)rŽ   r|   r¦   )rˆ   ri  Ú
class_namerA   s       r[   r~  z BaseModel._push_to_hub_usage_tipw  sj   € ð
 ”^Ô,ˆ
Ø×"Ò"Ñ$Ô$ˆðð $.ð	ð ð 
ðð ð ðð ð ðð ð ð 	r]   r±   ) rB   r,   r4   rC   r5   r,   r6   rD   r7   r,   r8   r,   r9   rE   r:   r,   r;   rE   r<   rF   r=   rG   r>   rG   r?   rG   r@   rH   rA   rI   rJ   rK   )rJ   rK   )rŸ   r,   r    r,   rJ   r,   )rJ   rI   )rJ   r§   )r­   r   rJ   rE   )rJ   r¸   )rJ   rÅ   )rJ   rÊ   )rJ   rE   )rØ   rÙ   rJ   rÙ   )rJ   rá   )r÷   rø   rJ   rø   )r  r  rŸ   r,   rJ   r  )r  r  rJ   rø   )r  r
   rJ   rE   )NTNT)rn   r0   r   r,   r!  rE   r"  r#  r$  rE   rJ   rK   )rJ   rN  )rV  r0   rJ   r0   )Nr\  )rn   r0   r   r,   r"  r#  rJ   rK   )	NNNTrh  NFFN)ri  r0   rj  r,   r<   r,   rk  rl  r$  rE   rm  r0   rn  r,   r(  rE   ro  rE   r"  r#  rJ   r0   )
NNTNNFFNNF)ri  r0   r<   r,   rk  rl  r$  rE   rm  r,   rn  r,   r(  rE   ro  rE   r"  r#  r:   r,   rs  rE   rJ   r0   )NFFNNN)rB   r0   r<   rF   r8   r,   r:   r,   r9   rE   r;   rE   r=   rG   r>   rG   r?   rG   rJ   r‹  )r®  rN  rJ   rK   )NFFNNNN)rB   r0   r<   rF   r8   r,   r:   r,   r9   rE   r;   rE   r=   rG   r>   rG   r?   rG   r2   r,   rJ   r‹  )NF)rB   r0   r<   rF   r8   r,   r:   r,   r;   rE   rJ   r0   )NNF)rI  r0   rB   r0   r9   rE   r:   r,   r=   rG   r<   rF   r8   r,   r;   rE   rJ   rÂ  )rÅ  r   rÆ  r,   rJ   rÇ  )rÊ  rG   rJ   rK   )rJ   rÍ  )rÞ  r#  rJ   rß  )rý  rß  rJ   rK   )
r  r0   r  r+   rø  r   r	  r   rJ   rK   )rJ   r
   )rJ   r  )rJ   r  )rœ   r)   rJ   rK   )r5   r  rJ   rK   )rJ   r  )ri  r0   rJ   r0   )Ar|   r;  Ú__qualname__Ú__doc__r   r`   r-   Ú__annotations__r.   r1   r~   r†   r£   r¦   Úpropertyr©   r·   rÄ   rÉ   rÎ   rÑ   r×   Ústaticmethodrà   ræ   rþ   r   r  r  r  r:  r5  rU  r[  rD  r'   rr  rq  rv   r   rŽ  r�  r¤  r‘  r�  r¦  rÉ  rÌ  r5   rü  r  r  rõ  r  Úsetterr  rÈ   rÙ  rF  r  r�   r"  r%  r~  Ú__classcell__)rŽ   s   @r[   r+   r+   2   s[  ø€ € € € € € ðð ð" .Ðà37Ð$Ð7Ð7Ð7Ñ7ð /1ÐÐ0Ð0Ð0Ñ0à,LÐ$ÐLÐLÐLÑLð €O€O�Oð *.ð{2ð IMØ!Ø)-Ø*.Ø#'Ø"'Ø#Ø!&Ø#'Ø.2Ø26Ø/3Ø+/Ø8?ð#{2ð {2ð {2ð {2ð {2ð {2ð {2ð {2ðzð ð ð ð,ð ð ð ð6ð ð ð ð ð8ð 8ð 8ñ „Xð8ð ð  ð  ð  ðD$ð $ð $ð $ð<#ð #ð #ð #ð8ð 8ð 8ð 8ð<ð <ð <ð <ðð ð ð ð$ ðð ð ñ „\ðð  ð/ð /ð /ñ „\ð/ðbð ð ð ð$0ð 0ð 0ð 0ð 0ð 0ð$ "ð8ð 8ð 8ð 8ð 8ðt7ð 7ð 7ð 7ðð ð ð ð6 "&Ø"&Ø+/Ø#'ðNFð NFð NFð NFð NFð`

ð 

ð 

ð 

ð "&Ø"&Ø+/Ø#'ð
ð 
ð 
ð 
ð 
ð6ð ð ð ð \hð'#ð '#ð '#ð '#ð '#ðR  ð $(Ø Ø#Ø#'Ø.Ø'+ØØ#(Ø+/ð>
ð >
ð >
ð >
ñ  Ôð>
ðF !Ø#Ø#'Ø%)Ø'+ØØ#(Ø+/Ø#Øðt%ð t%ð t%ð t%ð t%ðv  $Ø"'Ø!&Ø.2Ø26Ø/3ð0sð 0sð 0sð 0sð 0sðd ð  $Ø"'Ø!&Ø.2Ø26Ø/3ðð ð ð ñ „^ððD  $Ø"'Ø!&Ø.2Ø26Ø/3ðF&ð F&ð F&ð F&ð F&ðPUð Uð Uð Uð(  $Ø"'Ø!&Ø.2Ø26Ø/3Ø!%ð
ð 
ð 
ð 
ð 
ð<  $Ø!&ð,Cð ,Cð ,Cð ,Cð ,Cðj $(Ø#'Ø!&ð%
ð %
ð %
ð %
ð %
ðN,ð ,ð ,ð ,ð ,ð;ð ;ð ;ð ;ð ;ð ð+ð +ð +ñ „Xð+ð8 26ð0Vð 0Vð 0Vð 0Vð 0Vðd ðð ð ñ „\ðð(Vð Vð Vð ðVð Vð Vñ „\ðVð ð!ð !ð !ñ „Xð!ð Ôð	ð 	ð 	ñ Ôð	ð ð!ð !ð !ñ „Xð!ð ð8ð 8ð 8ñ „Xð8ð Ôð'ð 'ð 'ñ Ôð'ð ðð ð ñ „Xðð. ð3ð 3ð 3ñ „Xð3ð „]ð&ð &ð &ñ „]ð&ð ðð ð ñ „Xðð Ôðð ð ð ñ Ôðð ðð ð ñ „Xðð ðð ð ñ „Xðð ðð ð ñ „Xððð ð ð ð ð ð ð r]   r+   )NÚ
__future__r   rj   r§  r8  rd   r?  r=  r€  re  Úabcr   r   Úcollectionsr   Úmultiprocessingr   Úpathlibr   Útypingr	   r
   r   ÚnumpyrÝ   r3   Útorch.multiprocessingrò  rQ  Úhuggingface_hubr   r   Ú	packagingr   r   r   r   r   r   Ú!transformers.dynamic_module_utilsr   Útransformers.utilsr   Útransformers_loggingrP  r   Ú%sentence_transformers.base.evaluationr   Ú#sentence_transformers.base.modalityr   r   Ú)sentence_transformers.base.modality_typesr   r   r   Ú%sentence_transformers.base.model_cardr   r   Ú"sentence_transformers.base.modulesr   r    r!   Ú%sentence_transformers.base.peft_mixinr"   Úsentence_transformers.utilr#   r$   r%   r&   r'   Úsentence_transformers.util.miscr(   r)   Ú
get_loggerr|   rg   Ú
Sequentialr+   rW   r]   r[   ú<module>rF     s÷  ðØ "Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ø €€€Ø €€€Ø 	€	€	€	Ø €€€Ø 
€
€
€
Ø €€€Ø Ð Ð Ð Ø #Ð #Ð #Ð #Ð #Ð #Ð #Ð #Ø #Ð #Ð #Ð #Ð #Ð #Ø !Ð !Ð !Ð !Ð !Ð !Ø Ð Ð Ð Ð Ð Ø .Ð .Ð .Ð .Ð .Ð .Ð .Ð .Ð .Ð .à Ð Ð Ð Ø €€€Ø "Ð "Ð "Ð "Ð "Ð "Ø Ð Ð Ð Ø +Ð +Ð +Ð +Ð +Ð +Ð +Ð +Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ð Ð Ø WÐ WÐ WÐ WÐ WÐ WÐ WÐ WÐ WÐ WØ GÐ GÐ GÐ GÐ GÐ GØ >Ð >Ð >Ð >Ð >Ð >à -Ð -Ð -Ð -Ð -Ð -Ø ?Ð ?Ð ?Ð ?Ð ?Ð ?Ø fÐ fÐ fÐ fÐ fÐ fÐ fÐ fØ VÐ VÐ VÐ VÐ VÐ VÐ VÐ VÐ VÐ VØ XÐ XÐ XÐ XÐ XÐ XÐ XÐ XØ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JØ BÐ BÐ BÐ BÐ BÐ Bðð ð ð ð ð ð ð ð ð ð ð ð ð ð HÐ GÐ GÐ GÐ GÐ Gàð .Ø-Ð-Ð-Ð-Ð-Ð-à	(Ð	Ô	(¨Ñ	2Ô	2€ðZð Zð Zð Zð Z�”Ð/°ñ Zô Zð Zð Zð Zr]   