o
    
Û¾iB  ã                   @   s~   d dl mZmZ d dlmZ d dlZd dlmZ d dlm	Z	 d dl
mZ d dlmZ ddlmZ G d	d
„ d
ejeƒZd
gZdS )é    )ÚABCÚabstractmethod)ÚSetN)ÚPoolingTask)ÚPoolerOutput)ÚPoolingMetadataé   ©ÚPoolingParamsUpdatec                   @   sT   e Zd ZdZedee fdd„ƒZdedefdd„Z	ede
jd	edefd
d„ƒZdS )ÚPoolerzFThe interface required for all poolers used in pooling models in vLLM.Úreturnc                 C   ó   t ‚)z,Determine which pooling tasks are supported.©ÚNotImplementedError)Úself© r   ú^/home/ubuntu/.local/lib/python3.10/site-packages/vllm/model_executor/layers/pooler/abstract.pyÚget_supported_tasks   s   zPooler.get_supported_tasksÚtaskc                 C   s   t ƒ S )zW
        Construct the updated pooling parameters to use for a supported task.
        r	   )r   r   r   r   r   Úget_pooling_updates   s   zPooler.get_pooling_updatesÚhidden_statesÚpooling_metadatac                 C   r   )Nr   )r   r   r   r   r   r   Úforward   s   zPooler.forwardN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r
   r   ÚtorchÚTensorr   r   r   r   r   r   r   r      s    þýür   )Úabcr   r   Úcollections.abcr   r   Útorch.nnÚnnÚ
vllm.tasksr   Úvllm.v1.outputsr   Úvllm.v1.pool.metadatar   Úcommonr
   ÚModuler   Ú__all__r   r   r   r   Ú<module>   s   
