# What value should the sequence\_length parameter be when converting to TFLite

**URL:** <https://discuss.huggingface.co/t/what-value-should-the-sequence-length-parameter-be-when-converting-to-tflite/101756>\
**Category:** 🤗Optimum\
**Created:** [August 10, 2024, 10:47am UTC](https://discuss.huggingface.co/t/what-value-should-the-sequence-length-parameter-be-when-converting-to-tflite/101756 "2024-08-10T10:47:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ADarkDividedGem](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@ADarkDividedGem](https://discuss.huggingface.co/u/ADarkDividedGem)\
**Post date:** [August 10, 2024, 10:47am UTC](https://discuss.huggingface.co/t/what-value-should-the-sequence-length-parameter-be-when-converting-to-tflite/101756/1 "2024-08-10T10:47:27Z")

</div>

I am converting a model hosted by HuggingFace to a TensorFlow Lite model by using HuggingFace’s Optimum exporter.

In their [documentation](https://huggingface.co/docs/transformers/en/tflite) they use the following example:

```
optimum-cli export tflite --model google-bert/bert-base-uncased --sequence_length 128 bert_tflite/

```

As you can see they specify `sequence_length` as `128` which the [help output](https://huggingface.co/docs/optimum/main/en/exporters/tflite/usage_guides/export_a_model) describes as:

> Sequence length that the TFLite exported model will be able to take as input.

When converting another model what `sequence_length` should I use? Should it not simply match the sequence length of the original model and if so how do you find that value?
