# Package com.codename1.ai.inference

package com.codename1.ai.inference

Reusable on-device inference sessions for `.tflite` models.

Android uses LiteRT. iOS uses TensorFlow Lite Objective-C and may select the Core ML delegate. The builder links the runtime only when an application references `InferenceSession`. Other targets expose the same API with an explicit unsupported fallback.

- Related Packages
  Package
  Description
  com.codename1.ai
  Codename One's AI / LLM client surface plus the value types, streaming primitives, and chat-binding helpers that sit on top of it.
  com.codename1.ai.language
  Vendor-neutral on-device language identification, translation, and smart reply.
  com.codename1.ai.vision
  Vendor-neutral on-device vision APIs for still images and live camera frames: barcodes and QR codes, OCR, faces, image labels, body pose, person segmentation, and document correction.
- Class
  Description
  InferenceException
  Reports model validation, delegate selection, allocation, or invocation failures from the portable inference API.
  InferenceOptions
  Configures how a reusable `InferenceSession` is created.
  InferenceOptions.Accelerator
  Execution targets understood by the portable inference API.
  InferenceSession
  Reusable, native on-device session for a TensorFlow Lite model.
  ModelCache
  Downloads a large model into app-private storage and exposes it as a file-backed `ModelSource`.
  ModelSource
  Describes where an `InferenceSession` should obtain a `.tflite` model.
  Tensor
  Immutable named tensor passed to or returned from an inference session.
  TensorInfo
  Immutable metadata for one model input or output.
  TensorType
  Tensor element types supported by the portable LiteRT contract.