@@ -33,8 +33,6 @@ class AbsEmbedder(ABC):
3333 batch_size (int, optional): Batch size for inference. Defaults to :data:`256`.
3434 query_max_length (int, optional): Maximum length for query. Defaults to :data:`512`.
3535 passage_max_length (int, optional): Maximum length for passage. Defaults to :data:`512`.
36- instruction (Optional[str], optional): Instruction for embedding with :attr:`instruction_format`. Defaults to :data:`None`.
37- instruction_format (str, optional): Instruction format when using :attr:`instruction`. Defaults to :data:`"{}{}"`.
3836 convert_to_numpy (bool, optional): If True, the output embedding will be a Numpy array. Otherwise, it will be a Torch Tensor.
3937 Defaults to :data:`True`.
4038 kwargs (Dict[Any], optional): Additional parameters for HuggingFace Transformers config or children classes.
@@ -139,10 +137,10 @@ def encode_queries(
139137
140138 Args:
141139 queries (Union[List[str], str]): Input queries to encode.
142- batch_size (Optional[int], optional): Number of sentences for each iter. Defaults to None.
143- max_length (Optional[int], optional): Maximum length of tokens. Defaults to None.
140+ batch_size (Optional[int], optional): Number of sentences for each iter. Defaults to :data:` None` .
141+ max_length (Optional[int], optional): Maximum length of tokens. Defaults to :data:` None` .
144142 convert_to_numpy (Optional[bool], optional): If True, the output embedding will be a Numpy array. Otherwise, it will
145- be a Torch Tensor. Defaults to None.
143+ be a Torch Tensor. Defaults to :data:` None` .
146144
147145 Returns:
148146 Union[torch.Tensor, np.ndarray]: Return the embedding vectors in a numpy array or tensor.
@@ -173,10 +171,10 @@ def encode_corpus(
173171
174172 Args:
175173 corpus (Union[List[str], str]): Input corpus to encode.
176- batch_size (Optional[int], optional): Number of sentences for each iter. Defaults to None.
177- max_length (Optional[int], optional): Maximum length of tokens. Defaults to None.
174+ batch_size (Optional[int], optional): Number of sentences for each iter. Defaults to :data:` None` .
175+ max_length (Optional[int], optional): Maximum length of tokens. Defaults to :data:` None` .
178176 convert_to_numpy (Optional[bool], optional): If True, the output embedding will be a Numpy array. Otherwise, it will
179- be a Torch Tensor. Defaults to None.
177+ be a Torch Tensor. Defaults to :data:` None` .
180178
181179 Returns:
182180 Union[torch.Tensor, np.ndarray]: Return the embedding vectors in a numpy array or tensor.
@@ -212,12 +210,12 @@ def encode(
212210
213211 Args:
214212 sentences (Union[List[str], str]): Input sentences to encode.
215- batch_size (Optional[int], optional): Number of sentences for each iter. Defaults to None.
216- max_length (Optional[int], optional): Maximum length of tokens. Defaults to None.
213+ batch_size (Optional[int], optional): Number of sentences for each iter. Defaults to :data:` None` .
214+ max_length (Optional[int], optional): Maximum length of tokens. Defaults to :data:` None` .
217215 convert_to_numpy (Optional[bool], optional): If True, the output embedding will be a Numpy array. Otherwise, it will
218- be a Torch Tensor. Defaults to None.
219- instruction (Optional[str], optional): The text of instruction. Defaults to None.
220- instruction_format (Optional[str], optional): Format for instruction. Defaults to None.
216+ be a Torch Tensor. Defaults to :data:` None` .
217+ instruction (Optional[str], optional): The text of instruction. Defaults to :data:` None` .
218+ instruction_format (Optional[str], optional): Format for instruction. Defaults to :data:` None` .
221219
222220 Returns:
223221 Union[torch.Tensor, np.ndarray]: return the embedding vectors in a numpy array or tensor.
0 commit comments