A .tflite file is a FlatBuffers buffer with the file identifier
TFL3, defined by
schema.fbs
in the TensorFlow source (the same file is in LiteRT), read 2026-11-12. FlatBuffers
stores tables with offsets and a vtable, little-endian; fields are listed here in
schema order.
Model
| Field | Type | Meaning |
|---|---|---|
version | uint | Schema version, 3 (the schema’s comments list revisions 3a to 3d as compatible with 3). |
operator_codes | [OperatorCode] | Every operator kind used. |
subgraphs | [SubGraph] | The first is the main graph. |
description | string | A description of the model. |
buffers | [Buffer] | Buffer 0 is always empty. |
metadata_buffer | [int] | Deprecated. |
metadata | [Metadata] | Name and buffer index. |
signature_defs | [SignatureDef] | Optional named entry points with their input and output tensors. |
external_buffer_groups, external_buffers | [ExternalBufferGroup], [ExternalBuffer] | Version 3d: weights kept in external files, grouped by file or URI; each external buffer has an id, group index, offset, length and packing. |
Other tables
| Table | Fields |
|---|---|
| OperatorCode | deprecated_builtin_code (byte, used for codes below 127, PLACEHOLDER_FOR_GREATER_OP_CODES), custom_code, version (default 1), builtin_code (used for larger codes). |
| SubGraph | tensors, inputs, outputs (tensor indexes), operators, name, debug_metadata_index (default −1). |
| Tensor | shape, type, buffer (index; 0 means no constant data), name, quantization, is_variable, sparsity, shape_signature (−1 for unknown sizes), has_rank, variant_tensors, external_buffer. |
| Operator | opcode_index, inputs, outputs (−1 for an omitted optional input), builtin_options (a union by operator), custom_options, custom_options_format (FlexBuffers), mutating_variable_inputs, intermediates, large_custom_options_offset, large_custom_options_size, builtin_options_2, debug_metadata_index. |
| Buffer | data (bytes, aligned to 16), or, in a model larger than 2 GB, offset (from the start of the file, valid only if over 1) and size of data stored outside the FlatBuffer. |
| QuantizationParameters | min, max, scale, zero_point (per tensor or per channel), details, quantized_dimension. Real value = scale × (q − zero_point). |
Tensor types
| Code | Type | Code | Type |
|---|---|---|---|
| 0 | FLOAT32 | 10 | FLOAT64 |
| 1 | FLOAT16 | 11 | COMPLEX128 |
| 2 | INT32 | 12 | UINT64 |
| 3 | UINT8 | 13 | RESOURCE |
| 4 | INT64 | 14 | VARIANT |
| 5 | STRING | 15 | UINT32 |
| 6 | BOOL | 16 | UINT16 |
| 7 | INT16 | 17 | INT4 |
| 8 | COMPLEX64 | 18 | BFLOAT16 |
| 9 | INT8 | 19 | INT2 |
| 20 | UINT4 |
Builtin operators
The first codes of BuiltinOperator; the list continues past 200 and
is defined in schema.fbs; this page does not repeat it.
| Code | Operator | Code | Operator |
|---|---|---|---|
| 0 | ADD | 17 | MAX_POOL_2D |
| 1 | AVERAGE_POOL_2D | 18 | MUL |
| 2 | CONCATENATION | 19 | RELU |
| 3 | CONV_2D | 20 | RELU_N1_TO_1 |
| 4 | DEPTHWISE_CONV_2D | 21 | RELU6 |
| 5 | DEPTH_TO_SPACE | 22 | RESHAPE |
| 6 | DEQUANTIZE | 23 | RESIZE_BILINEAR |
| 7 | EMBEDDING_LOOKUP | 24 | RNN |
| 8 | FLOOR | 25 | SOFTMAX |
| 9 | FULLY_CONNECTED | 26 | SPACE_TO_DEPTH |
| 10 | HASHTABLE_LOOKUP | 27 | SVDF |
| 11 | L2_NORMALIZATION | 28 | TANH |
| 12 | L2_POOL_2D | 29 | CONCAT_EMBEDDINGS |
| 13 | LOCAL_RESPONSE_NORMALIZATION | 30 | SKIP_GRAM |
| 14 | LOGISTIC | 31 | CALL |
| 15 | LSH_PROJECTION | 32 | CUSTOM |
| 16 | LSTM |