> For the complete documentation index, see [llms.txt](https://utca.knowledgator.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://utca.knowledgator.com/predictors/tokensearcherpredictor.md).

# TokenSearcherPredictor

Predictor for knowledgator/UTC models

This predictor is specifically build for [**knowledgator**](https://huggingface.co/knowledgator)**/**[**UTC**](https://huggingface.co/collections/knowledgator/universal-token-classification-65a3a5d3f266d20b2e05c34d) models. For more details about models, see:

{% embed url="<https://huggingface.co/knowledgator/UTC-DeBERTa-large>" %}

{% embed url="<https://huggingface.co/collections/knowledgator/universal-token-classification-65a3a5d3f266d20b2e05c34d>" %}

About use cases and more, see:

{% embed url="<https://blog.knowledgator.com/as-gpt4-but-for-token-classification-61afbc85afe5>" %}

Try it on our Hugging Face space:

{% embed url="<https://huggingface.co/spaces/knowledgator/0-shot-NER>" %}

Subclass of [**TransformersPipeline**](/predictors/transformers-predictors.md#transformerspipeline)**.**

## Module: [implementation](/framework-structure.md#implementation).predictors

## Methods and properties

Main methods and properties

***

### <mark style="color:blue;">\_\_init\_\_</mark>

#### Arguments:

* <mark style="color:orange;">**cfg**</mark>**&#x20;(Optional\[**[**TransformersPipelineConfig**](/predictors/transformers-predictors.md#transformerspipelineconfig)**], optional):** Configuration for predictor. If value equals to None, default [**TokenSearcherPredictorConfig** ](#tokensearcherpredictorconfig)configuration will be used. Defaults to None.&#x20;
* <mark style="color:orange;">**input\_class**</mark>**&#x20;(Type\[**[**Input**](/core/schemas.md#input)**], optional):** Class for input validation. Defaults to [**TokenSearcherPredictorInput**](#tokensearcherpredictorinput)**.**
* <mark style="color:orange;">**output\_class**</mark>**&#x20;(Type\[**[**Output**](/core/schemas.md#output)**], optional):** Class for output validation. Defaults to [**TokenSearcherPredictorOutput**](#tokensearcherpredictoroutput)**.**
* <mark style="color:orange;">**name**</mark>**&#x20;(Optional\[str], optional):** Name for identification. If equals to None, class name will be used. Defaults to None.

***

***

***

## <mark style="color:green;">**TokenSearcherPredictorConfig**</mark>

Prebuild configuration that describes default parameters for [**knowledgator**](https://huggingface.co/knowledgator)**/**[**UTC**](https://huggingface.co/collections/knowledgator/universal-token-classification-65a3a5d3f266d20b2e05c34d) models pipeline. Subclass of [**TransformersPipelineConfig**](/predictors/transformers-predictors.md#transformerspipelineconfig)**.** It contains all parameters described in [**TransformersPipelineConfig**](/predictors/transformers-predictors.md#transformerspipelineconfig) but overwrites some default values that described here.

***

### <mark style="color:blue;">\_\_init\_\_</mark>

#### Arguments:

* <mark style="color:orange;">**task**</mark>**&#x20;(Optional\[str], optional):** Pipeline task. Defaults to **"ner"**.
* <mark style="color:orange;">**model**</mark>**&#x20;(Optional\[Union\[str,** [**PreTrainedModel**](https://huggingface.co/docs/transformers/main_classes/model#transformers.PreTrainedModel)**,** [**TFPreTrainedModel**](https://huggingface.co/docs/transformers/v4.40.1/en/main_classes/model#transformers.TFPreTrainedModel)**]], optional):** Model that will be used. Defaults to **"knowledgator/UTC-DeBERTa-small"**.
* <mark style="color:orange;">**kwargs**</mark>**&#x20;(Optional\[Dict\[str, Any]], optional):** Extra parameters. Defaults to

```python
{
    "aggregation_strategy": "first", 
    "batch_size": 12
}
```

* ...

#### For other parameters, see [**TransformersPipelineConfig**](/predictors/transformers-predictors.md#transformerspipelineconfig)**.**

***

***

***

## <mark style="color:green;">TokenSearcherPredictorInput</mark>

Subclass of [**TransformersBasicInput**](/predictors/transformers-schemas.md#transformersbasicinput)**.**

***

### <mark style="color:blue;">\_\_init\_\_</mark>

#### Arguments:

* <mark style="color:orange;">**inputs**</mark>**&#x20;(List\[str]):** Text inputs.

***

***

***

## <mark style="color:green;">TokenSearcherPredictorOutput</mark>

Subclass of [**TransformersBasicOutput**](/predictors/transformers-schemas.md#transformersbasicinput)**.**

***

### <mark style="color:blue;">\_\_init\_\_</mark>

#### Arguments:

* <mark style="color:orange;">**output**</mark>**&#x20;(List\[List\[Dict\[str, Any]]]):** Entities of corresponding inputs.

***

***
