---
title: "encodeBatch"
sidebar_label: "encodeBatch"
description: "Kotlin binding reference: encodeBatch."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Tokenizer](index.md)/[encodeBatch](encodeBatch.md)

# encodeBatch

[common]\
fun [encodeBatch](encodeBatch.md)(texts: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)&gt;, options: [EncodeOptions](../EncodeOptions/index.md) = EncodeOptions()): [Encoded](../Encoded/index.md)

Encode a batch of texts into tensor form: a padded `[B, S]` matrix by default, or one flat row plus the offset table with [EncodeOptions.varlen](../EncodeOptions/varlen.md).