PlayTorch screenshot

What is PlayTorch?

PlayTorch is a free, open-source framework from Meta for building AI-powered mobile prototypes that run machine learning models on-device. It pairs a React Native SDK (torchlive) with the PyTorch Mobile runtime so developers can run vision and language models directly on iOS and Android without a server. The project shipped a companion mobile app and a Snack-style workflow for testing JavaScript code on a phone in minutes. Note that the project was archived by Meta in October 2023 and is no longer actively maintained, though the code and documentation remain available under the MIT licence.

Key Features

On-device inference

Runs PyTorch Mobile models directly on the phone for vision and language tasks, with no server round trip.

React Native SDK (torchlive)

Exposes torch, torchvision and media modules to JavaScript so models can be called from React Native code.

PlayTorch mobile app and Snacks

A companion app lets developers scan a QR code and test JavaScript snippets on a real device in minutes.

Camera and Canvas views

Built-in CameraView and CanvasView components capture frames and render results such as bounding boxes overlaid on the camera feed.

Text tokenizers

Includes BasicTokenizer and WordpieceTokenizer modules for natural language processing pipelines.

Ready-made demos

Ships examples for image classification, object detection (YOLOv5), question answering, AnimeGAN style transfer and a French translator.

Custom model preparation

Tooling to package and optimise your own PyTorch models for mobile deployment.

Pros & Cons

Advantages

  • It is fully free and open source under the MIT licence, with no usage fees or commercial restrictions.
  • Models run entirely on-device, which keeps user data local and avoids inference server costs and latency.
  • The React Native and Snack workflow lets web and mobile developers prototype AI features without deep native or PyTorch experience.
  • Bundled demos for classification, detection, translation and generative models give clear, runnable starting points.
  • Backed by the wider PyTorch and Meta open-source ecosystem, so the underlying runtime is well documented.

Limitations

  • The project was archived by Meta in October 2023 and is no longer actively maintained, so there are no bug fixes or new features.
  • Compatibility with current React Native, Expo and mobile OS versions is not guaranteed and may require manual fixes.
  • It targets developers only and assumes familiarity with React Native and PyTorch model preparation.
  • On-device performance is limited by phone hardware, so large models may run slowly or not at all.

Use Cases

Mobile developers prototyping image classification or object detection features that run offline on the device.

Researchers and students demonstrating PyTorch models on phones without building a custom native app.

Hackathon and proof-of-concept teams wanting to test an AI idea on a real device in minutes via the PlayTorch app.

React Native engineers adding on-device language tasks such as question answering or translation to an app.

Educators teaching on-device machine learning concepts using the ready-made demo snacks.