Data Type Table

Data Type Table

AI/ML numeric data type and tensor specification table

Installation

npx @ravikumarsurya/mdx-ui add data-type-table

Usage

import { DataTypeTable } from "@/components/mdx/data-type-table";
 
<DataTypeTable
  rows={[
    {
      type: "INT8",
      bits: 8,
      range: "-128 to 127",
      quantized: true,
      description: "Inference optimised integer",
    },
    {
      type: "FP16",
      bits: 16,
      range: "±65504",
      quantized: false,
      description: "Half-precision float",
    },
    {
      type: "FP32",
      bits: 32,
      range: "±3.4e38",
      quantized: false,
      description: "Full-precision float",
    },
  ]}
/>;

Examples

TypeBitsRangeQuantizedNotes
INT88-128 to 127Inference-optimised integer
FP1616±65504Half-precision float
BF1616±3.39 × 10³⁸Brain float 16
FP3232±3.4 × 10³⁸Full-precision float

Common AI/ML numeric data types

QAIRT supported types

<DataTypeTable
  rows={[
    {
      type: "INT4",
      bits: 4,
      range: "-8 to 7",
      quantized: true,
      description: "Ultra-low bit weight compression",
    },
    {
      type: "INT8",
      bits: 8,
      range: "-128 to 127",
      quantized: true,
      description: "Standard inference integer",
    },
    {
      type: "FP16",
      bits: 16,
      range: "±65504",
      quantized: false,
      description: "Half-precision IEEE 754",
    },
    {
      type: "BF16",
      bits: 16,
      range: "±3.39e38",
      quantized: false,
      description: "Brain float — wider exponent than FP16",
    },
    {
      type: "FP32",
      bits: 32,
      range: "±3.4e38",
      quantized: false,
      description: "Full-precision training format",
    },
  ]}
  caption="Qualcomm AI Runtime (QAIRT) — supported data types"
/>

With tensor shapes

<DataTypeTable
  rows={[
    { type: "Scalar", shape: "( )", description: "Single value" },
    { type: "Vector", shape: "(N)", description: "1-D tensor" },
    { type: "Matrix", shape: "(M, N)", description: "2-D tensor" },
    {
      type: "Tensor",
      shape: "(B, C, H, W)",
      description: "4-D batch of feature maps",
    },
  ]}
/>

Quantization support only

Columns are omitted when no row has data for them.

<DataTypeTable
  rows={[
    { type: "INT8", quantized: true },
    { type: "FP16", quantized: false },
    { type: "FP32", quantized: false },
  ]}
/>

Props

DataTypeTable

PropTypeDefaultDescription
rowsDataTypeRow[]Array of data type rows (required)
captionstringOptional caption below the table
classNamestringAdditional CSS classes

DataTypeRow

FieldTypeDescription
typestringType name, e.g. "INT8", "FP16" (required)
bitsnumberBit width
rangestringNumeric range, e.g. "-128 to 127"
shapestringTensor shape description
quantizedbooleanWhether this type supports quantization
descriptionstringProse note