> For the complete documentation index, see [llms.txt](https://boinc-ai.gitbook.io/tokenizers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://boinc-ai.gitbook.io/tokenizers/api/decoders.md).

# Decoders

## Decoders

PythonRustNode

### BPEDecoder

#### class tokenizers.decoders.BPEDecoder

( suffix = '\</w>' )

Parameters

* **suffix** (`str`, *optional*, defaults to `</w>`) — The suffix that was used to caracterize an end-of-word. This suffix will be replaced by whitespaces during the decoding

BPEDecoder Decoder

### ByteLevel

#### class tokenizers.decoders.ByteLevel

( )

ByteLevel Decoder

This decoder is to be used in tandem with the [ByteLevel](https://huggingface.co/docs/tokenizers/v0.13.4.rc2/en/api/pre-tokenizers#tokenizers.pre_tokenizers.ByteLevel) [PreTokenizer](https://huggingface.co/docs/tokenizers/v0.13.4.rc2/en/api/pre-tokenizers#tokenizers.pre_tokenizers.PreTokenizer).

### CTC

#### class tokenizers.decoders.CTC

( pad\_token = '\<pad>'word\_delimiter\_token = '|'cleanup = True )

Parameters

* **pad\_token** (`str`, *optional*, defaults to `<pad>`) — The pad token used by CTC to delimit a new token.
* **word\_delimiter\_token** (`str`, *optional*, defaults to `|`) — The word delimiter token. It will be replaced by a
* **cleanup** (`bool`, *optional*, defaults to `True`) — Whether to cleanup some tokenization artifacts. Mainly spaces before punctuation, and some abbreviated english forms.

CTC Decoder

### Metaspace

#### class tokenizers.decoders.Metaspace

( )

Parameters

* **replacement** (`str`, *optional*, defaults to `▁`) — The replacement character. Must be exactly one character. By default we use the *▁* (U+2581) meta symbol (Same as in SentencePiece).
* **add\_prefix\_space** (`bool`, *optional*, defaults to `True`) — Whether to add a space to the first word if there isn’t already one. This lets us treat *hello* exactly like *say hello*.

Metaspace Decoder

### WordPiece

#### class tokenizers.decoders.WordPiece

( prefix = '##'cleanup = True )

Parameters

* **prefix** (`str`, *optional*, defaults to `##`) — The prefix to use for subwords that are not a beginning-of-word
* **cleanup** (`bool`, *optional*, defaults to `True`) — Whether to cleanup some tokenization artifacts. Mainly spaces before punctuation, and some abbreviated english forms.

WordPiece Decoder


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://boinc-ai.gitbook.io/tokenizers/api/decoders.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
