Picking the right tool, with reasons
Framework choice should be driven by project requirements, not internet vibes. Use this decision tree as a starting point — it's not exhaustive, but it covers the 80% case.
Choose TensorFlow when:
- You will deploy to mobile, edge, or microcontrollers (LiteRT/TFLite has no real PyTorch equivalent at this maturity).
- You're shipping a REST/gRPC API at scale and want a battle-tested server (TF Serving).
- Your training scale needs Cloud TPUs.
- The team's existing infra is TF — switching costs more than it gains.
- You need a TF-native specialty library (TF Probability, TF Recommenders, TF-Agents).
- You want browser-side inference via TF.js without spinning up a backend.
Consider PyTorch when:
- You're implementing a research paper from the last 12 months — the official code is almost certainly PyTorch.
- Your work depends on HuggingFace Transformers natively.
- You need fully dynamic graphs (irregular structures, recursion, learned graph topologies).
Consider JAX when:
- You need maximum TPU performance for large-scale training.
- You want functional transforms (
jit,vmap,pmap,grad) as composable primitives. - You're inside Google DeepMind, or working on a research codebase that's already JAX.
Pippa's heuristic: Train where the ecosystem is friendliest, deploy where the runtime is most mature. The two answers don't have to be the same framework — the
jax2tf bridge and ONNX exist precisely so you don't have to choose.