{
  "$schema": "https://ambiqai.github.io/helia-ui/schema/reference-model-1.json",
  "generatedFrom": {
    "sourceCommit": "f341fb11f7f5d77a4974ba8273c4cd55d67c21f0",
    "tool": "pyref",
    "version": "1.7.3"
  },
  "language": "python",
  "modules": [
    {
      "description": "Typed export specification; importable without Keras or a training backend.",
      "name": "spec",
      "path": "helia_edge.export.spec",
      "submodules": [],
      "summary": "Typed export specification; importable without Keras or a training backend.",
      "symbols": [
        {
          "description": "",
          "examples": [],
          "id": "helia_edge.export.spec.VALID_IO",
          "kind": "constant",
          "language": "python",
          "members": [],
          "name": "VALID_IO",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "VALID_IO: dict[Precision, frozenset[IODType]] = {Precision.FP32: frozenset({IODType.FLOAT32}), Precision.FP16: frozenset({IODType.FLOAT16}), Precision.A8W8: frozenset({IODType.INT8, IODType.FLOAT32}), Precision.A16W8: frozenset({IODType.INT16, IODType.FLOAT32})}",
          "source": {
            "line": 71,
            "path": "helia_edge/export/spec.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L71"
          },
          "summary": ""
        },
        {
          "description": "",
          "examples": [],
          "id": "helia_edge.export.spec.CALIBRATED",
          "kind": "constant",
          "language": "python",
          "members": [],
          "name": "CALIBRATED",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "CALIBRATED: frozenset[Precision] = frozenset({Precision.A8W8, Precision.A16W8})",
          "source": {
            "line": 78,
            "path": "helia_edge/export/spec.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L78"
          },
          "summary": ""
        },
        {
          "description": "Numeric format of an exported graph.",
          "examples": [],
          "id": "helia_edge.export.spec.Precision",
          "kind": "class",
          "language": "python",
          "members": [
            {
              "description": "float32 weights and compute.",
              "examples": [],
              "id": "helia_edge.export.spec.Precision.FP32",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "FP32",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "FP32 = 'fp32'",
              "source": {
                "line": 21,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L21"
              },
              "summary": ""
            },
            {
              "description": "native float16 graph; inputs, weights, activations and outputs are float16.",
              "examples": [],
              "id": "helia_edge.export.spec.Precision.FP16",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "FP16",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "FP16 = 'fp16'",
              "source": {
                "line": 22,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L22"
              },
              "summary": ""
            },
            {
              "description": "int8 activations and weights, calibrated.",
              "examples": [],
              "id": "helia_edge.export.spec.Precision.A8W8",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "A8W8",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "A8W8 = 'a8w8'",
              "source": {
                "line": 23,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L23"
              },
              "summary": ""
            },
            {
              "description": "int16 activations and int8 weights, calibrated.",
              "examples": [],
              "id": "helia_edge.export.spec.Precision.A16W8",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "A16W8",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "A16W8 = 'a16w8'",
              "source": {
                "line": 24,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L24"
              },
              "summary": ""
            }
          ],
          "name": "Precision",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "Precision()",
          "source": {
            "line": 11,
            "path": "helia_edge/export/spec.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L11"
          },
          "summary": "Numeric format of an exported graph."
        },
        {
          "description": "Element type of an exported model's inputs and outputs.",
          "examples": [],
          "id": "helia_edge.export.spec.IODType",
          "kind": "class",
          "language": "python",
          "members": [
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.export.spec.IODType.FLOAT32",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "FLOAT32",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "FLOAT32 = 'float32'",
              "source": {
                "line": 30,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L30"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.export.spec.IODType.FLOAT16",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "FLOAT16",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "FLOAT16 = 'float16'",
              "source": {
                "line": 31,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L31"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.export.spec.IODType.INT8",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "INT8",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "INT8 = 'int8'",
              "source": {
                "line": 32,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L32"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.export.spec.IODType.INT16",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "INT16",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "INT16 = 'int16'",
              "source": {
                "line": 33,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L33"
              },
              "summary": ""
            }
          ],
          "name": "IODType",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "IODType()",
          "source": {
            "line": 27,
            "path": "helia_edge/export/spec.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L27"
          },
          "summary": "Element type of an exported model's inputs and outputs."
        },
        {
          "description": "How the Keras model is traced for conversion.",
          "examples": [],
          "id": "helia_edge.export.spec.ConversionMode",
          "kind": "class",
          "language": "python",
          "members": [
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.export.spec.ConversionMode.KERAS",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "KERAS",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "KERAS = 'keras'",
              "source": {
                "line": 39,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L39"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.export.spec.ConversionMode.SAVED_MODEL",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "SAVED_MODEL",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "SAVED_MODEL = 'saved_model'",
              "source": {
                "line": 40,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L40"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.export.spec.ConversionMode.CONCRETE",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "CONCRETE",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "CONCRETE = 'concrete'",
              "source": {
                "line": 41,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L41"
              },
              "summary": ""
            }
          ],
          "name": "ConversionMode",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "ConversionMode()",
          "source": {
            "line": 36,
            "path": "helia_edge/export/spec.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L36"
          },
          "summary": "How the Keras model is traced for conversion."
        },
        {
          "description": "Role of a model input or output.",
          "examples": [],
          "id": "helia_edge.export.spec.TensorRole",
          "kind": "class",
          "language": "python",
          "members": [
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.export.spec.TensorRole.SIGNAL",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "SIGNAL",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "SIGNAL = 'signal'",
              "source": {
                "line": 47,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L47"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.export.spec.TensorRole.STATE",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "STATE",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "STATE = 'state'",
              "source": {
                "line": 48,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L48"
              },
              "summary": ""
            },
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.export.spec.TensorRole.AUX",
              "kind": "constant",
              "language": "python",
              "members": [],
              "name": "AUX",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "AUX = 'aux'",
              "source": {
                "line": 49,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L49"
              },
              "summary": ""
            }
          ],
          "name": "TensorRole",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "TensorRole()",
          "source": {
            "line": 44,
            "path": "helia_edge/export/spec.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L44"
          },
          "summary": "Role of a model input or output."
        },
        {
          "description": "Name of the input of state pair ``k``.",
          "examples": [],
          "id": "helia_edge.export.spec.state_input_name",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "state_input_name",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "state_input_name(k: int) -> str",
          "source": {
            "line": 55,
            "path": "helia_edge/export/spec.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L55"
          },
          "summary": "Name of the input of state pair k."
        },
        {
          "description": "Name of the output of state pair ``k``.",
          "examples": [],
          "id": "helia_edge.export.spec.state_output_name",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "state_output_name",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "state_output_name(k: int) -> str",
          "source": {
            "line": 60,
            "path": "helia_edge/export/spec.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L60"
          },
          "summary": "Name of the output of state pair k."
        },
        {
          "description": "``(\"in\", k)`` or ``(\"out\", k)`` for a state tensor name, otherwise None.",
          "examples": [],
          "id": "helia_edge.export.spec.state_pair",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "state_pair",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "state_pair(name: str) -> tuple[str, int] | None",
          "source": {
            "line": 65,
            "path": "helia_edge/export/spec.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L65"
          },
          "summary": "(\"in\", k) or (\"out\", k) for a state tensor name, otherwise None."
        },
        {
          "description": "What to export. ``precision``, ``io_dtype`` and ``mode`` have no defaults.",
          "examples": [],
          "id": "helia_edge.export.spec.ExportSpec",
          "kind": "class",
          "language": "python",
          "members": [
            {
              "description": "",
              "examples": [],
              "id": "helia_edge.export.spec.ExportSpec.model_config",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "model_config",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "model_config = ConfigDict(frozen=True, extra='forbid')",
              "source": {
                "line": 97,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L97"
              },
              "summary": ""
            },
            {
              "description": "Export format: ``litert``, a ``.tflite`` flatbuffer (the only one).",
              "examples": [],
              "id": "helia_edge.export.spec.ExportSpec.format",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "format",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "format: Literal['litert'] = 'litert'",
              "source": {
                "line": 99,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L99"
              },
              "summary": ""
            },
            {
              "description": "Numeric format of the graph.",
              "examples": [],
              "id": "helia_edge.export.spec.ExportSpec.precision",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "precision",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "precision: Precision",
              "source": {
                "line": 100,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L100"
              },
              "summary": ""
            },
            {
              "description": "Input and output element type; must be valid for ``precision`` (``VALID_IO``).",
              "examples": [],
              "id": "helia_edge.export.spec.ExportSpec.io_dtype",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "io_dtype",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "io_dtype: IODType",
              "source": {
                "line": 101,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L101"
              },
              "summary": ""
            },
            {
              "description": "How the model is traced for conversion.",
              "examples": [],
              "id": "helia_edge.export.spec.ExportSpec.mode",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "mode",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "mode: ConversionMode",
              "source": {
                "line": 102,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L102"
              },
              "summary": ""
            },
            {
              "description": "For calibrated precisions, refuse operators without an integer kernel instead of\nfalling back to float operators. Defaults to True; it does not affect float precisions.",
              "examples": [],
              "id": "helia_edge.export.spec.ExportSpec.strict",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "strict",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "strict: StrictBool = True",
              "source": {
                "line": 103,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L103"
              },
              "summary": ""
            },
            {
              "description": "For calibrated precisions with integer I/O, export gives each state pair\n(``state_in_k``, ``state_out_k``) one scale and zero point covering both tensors' ranges, and\nrefuses when that scale differs from either original by more than this fraction of it (at\nmost 0.5). Models without state pairs ignore it.",
              "examples": [],
              "id": "helia_edge.export.spec.ExportSpec.state_tie_tolerance",
              "kind": "attribute",
              "language": "python",
              "members": [],
              "name": "state_tie_tolerance",
              "params": [],
              "raises": [],
              "returns": [],
              "signature": "state_tie_tolerance: StrictFloat = Field(default=0.01, ge=0.0, le=0.5)",
              "source": {
                "line": 104,
                "path": "helia_edge/export/spec.py",
                "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L104"
              },
              "summary": ""
            }
          ],
          "name": "ExportSpec",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "ExportSpec()",
          "source": {
            "line": 81,
            "path": "helia_edge/export/spec.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L81"
          },
          "summary": "What to export."
        },
        {
          "description": "The active Keras backend cannot export: LiteRT export needs the TensorFlow backend.",
          "examples": [],
          "id": "helia_edge.export.spec.BackendUnavailable",
          "kind": "class",
          "language": "python",
          "members": [],
          "name": "BackendUnavailable",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "BackendUnavailable()",
          "source": {
            "line": 117,
            "path": "helia_edge/export/spec.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L117"
          },
          "summary": "The active Keras backend cannot export: LiteRT export needs the TensorFlow backend."
        },
        {
          "description": "Refuse state resets that are not increasing steps from 1 to ``steps - 1`` of a streaming model.",
          "examples": [],
          "id": "helia_edge.export.spec.check_resets",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "check_resets",
          "params": [],
          "raises": [
            {
              "description": "If ``resets`` are given for a model without state, or are not increasing steps within\nthe sequence (step 0 always starts from zero states).",
              "type": "ValueError"
            }
          ],
          "returns": [],
          "signature": "check_resets(resets: Collection[int], steps: int, stateful: bool, what: str) -> None",
          "source": {
            "line": 121,
            "path": "helia_edge/export/spec.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/export/spec.py#L121"
          },
          "summary": "Refuse state resets that are not increasing steps from 1 to steps - 1 of a streaming model."
        }
      ]
    }
  ],
  "name": "helia_edge"
}
