---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.5
alternate:
  - https://catboost.ai/docs/en/references/training-parameters/quantization.md
  - href: en/references/training-parameters/quantization.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://catboost.ai/docs/en/llms.txt

# Quantization settings

## target_border {#target_border}

Command-line: `--target-border`

#### Description

If set, defines the border for converting target values to 0 and 1.

Depending on the specified value:

- $target\_value \le border\_value$ the target is converted to 0
- $target\_value > border\_value$ the target is converted to 1

**Type**

float

**Default value**

{% cut "Python package, R package" %}

None

{% endcut %}

{% cut "Command line" %}

The value is not set

{% endcut %}

**Supported processing units**

CPU and GPU

## border_count {#border_count}

Command-line: `-x`, `--border-count`

_Alias:_ `max_bin`

#### Description

The number of splits for numerical features. Allowed values are integers from 1 to 65535 inclusively.

**Type**

int

**Default value**

<!-- source: en/_includes/work_src/reusage-default-values/border_count.md -->
The default value depends on the processing unit type and other parameters:

- CPU: 254
- GPU in PairLogitPairwise and YetiRankPairwise modes: 32
- GPU in all other modes: 128
<!-- endsource: en/_includes/work_src/reusage-default-values/border_count.md -->

**Supported processing units**

CPU and GPU

## feature_border_type {#feature_border_type}

Command-line: `--feature-border-type`

#### Description

The [quantization mode](https://catboost.ai/docs/en/concepts/quantization.md) for numerical features.

Possible values:
- Median
- Uniform
- UniformAndQuantiles
- MaxLogSum
- MinEntropy
- GreedyLogSum

**Type**

string

**Default value**

GreedyLogSum

**Supported processing units**

CPU and GPU

## per_float_feature_quantization {#per_float_feature_quantization}

Command-line: `--per-float-feature-quantization`

#### Description

The quantization description for the specified feature or list of features.

Description format for a single feature:
```
FeatureId[:border_count=BorderCount][:nan_mode=BorderType][:border_type=border_selection_method]
```

Examples:

- ```
    per_float_feature_quantization='0:border_count=1024'
    ```

  In this example, the feature indexed 0 has 1024 borders.

- ```python
    per_float_feature_quantization=['0:border_count=1024', '1:border_count=1024']
    ```

  In this example, features indexed 0 and 1 have 1024 borders.

**Type**

- string
- list of strings

**Default value**

{% cut "Python package, R package" %}

None

{% endcut %}

{% cut "Command-line" %}

Ommited

{% endcut %}

**Supported processing units**

CPU and GPU
