Swift for TensorFlow died in 2021, but reshaped the language
An attempt to build automatic differentiation so deeply into Swift that it became a compiler feature, not a library trick.

What it does Swift for TensorFlow was an experiment to treat machine learning as a language-level concern rather than a framework add-on. It embedded automatic differentiation directly into the Swift compiler, added a Keras-like deep learning API, and shipped with Jupyter support and Python interoperability before the maintainers archived the project in February 2021.
The interesting bit The lasting output was compiler infrastructure, not a framework. The team upstreamed differentiable programming into the official Swift compiler and pushed four Swift Evolution proposals through to acceptance. The repository also served as an incubator for spinoffs that outlived it, including PythonKit, swift-jupyter, and SwiftFusion for probabilistic graphical models.
Key highlights
- Native autodiff via the
Differentiableprotocol, generalized toFloat,Double, SIMD vectors, and custom data structures. - A mutable-value-semantics-oriented deep learning API and a model garden hosting more than 30 models.
- Direct Python interoperability, allowing calls to libraries like
numpywithout leaving Swift syntax. - X10, an XLA-based backend for accelerating tensor operations.
- Four accepted Swift Evolution proposals, including
@dynamicMemberLookupandAdditiveArithmetic.
Caveats
- Archived in February 2021 and explicitly frozen; the site receives no further updates.
- The README itself warns that documentation is “slightly out of date,” and several technology deep-dives are marked outdated in the repo’s own status table.
Verdict Language designers and compiler enthusiasts should treat this as a blueprint for integrating ML primitives into a type-safe language; working ML engineers should skip it in favor of actively maintained toolchains.
Frequently asked
- What is tensorflow/swift?
- An attempt to build automatic differentiation so deeply into Swift that it became a compiler feature, not a library trick.
- Is swift open source?
- Yes — tensorflow/swift is open source, released under the Apache-2.0 license.
- What language is swift written in?
- tensorflow/swift is primarily written in Jupyter Notebook.
- How popular is swift?
- tensorflow/swift has 6.1k stars on GitHub.
- Where can I find swift?
- tensorflow/swift is on GitHub at https://github.com/tensorflow/swift.