liveBook · Manning

JAX2TF

As explained in Deep Learning with JAX

A converter that translates JAX models or computations to TensorFlow format for interoperability.

Need to move a JAX model into production infrastructure? JAX2TF converts a JAX model into a TensorFlow SavedModel, connecting JAX development with TensorFlow’s deployment ecosystem. section 2.8 section 12.1.3

A converted model can support several workflows:

  • Serve inference on a server with TF Serving, on a device with TFLite, or on the web with TensorFlow.js. section 2.8 section 12.1.3
  • Continue fine-tuning a JAX-trained model in TensorFlow with existing training data and setup. section 2.8
  • Combine components trained with JAX and TensorFlow in a fused model. section 12.1.3

From JAX training to serving

Train a model in JAX, convert it to a TensorFlow SavedModel with JAX2TF, and deploy inference through TF Serving, TFLite, or TensorFlow.js. Remember that a saved checkpoint may contain only model weights, so the prediction function and its code still need to be reproduced or incorporated into the deployment workflow. section 2.8 section 12.1.3

How Deep Learning with JAX covers it

How deep it goes
Defines SavedModel conversion and deployment uses but defers conversion implementation and production infrastructure details.
Examples
Uses server inference, device inference, web inference, continued TensorFlow fine-tuning, and JAX–TensorFlow model fusion.
What it assumes
Assumes a JAX model and prediction code, while distinguishing saved parameters from the functions required for inference.
What you can do after
Operate/configure deployment by exporting JAX models for TF Serving, TFLite, TensorFlow.js, or TensorFlow-based training.
How it connects
Links JAX with TensorFlow SavedModel, TF Serving, TFLite, TensorFlow.js, and model fine-tuning.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Deep Learning with JAX. The section links point to the parts of the book it draws on.