--- id: keras-nlp version: "0.31.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # keras-nlp — Pretrained models for Keras. License: permissive · Maintenance: active · Downloads: 287.0K/mo ## What it is and what it does Keras-NLP is a library of pretrained models and utilities for natural language processing, built on top of Keras 3. It allows you to use the same high-level Keras API across multiple deep learning backends—JAX, TensorFlow, PyTorch, or OpenVINO—without rewriting code. You configure your backend before importing, then build and train NLP models using Keras abstractions that work identically regardless of which backend engine runs them underneath. The library is designed for developers who want to avoid framework lock-in while building production NLP systems. It supports computer vision, audio, timeseries, and other tasks through the broader Keras ecosystem, but focuses specifically on pretrained model access and NLP workflows. Since it depends on keras-hub as its runtime foundation, it inherits Keras 3's multi-backend architecture and the ability to scale from laptops to distributed GPU/TPU clusters. Use it for: - Fine-tune pretrained language models on custom text classification or sequence labeling tasks using your choice of backend. - Build NLP inference pipelines that run on OpenVINO for edge deployment while developing on JAX or PyTorch. - Migrate existing tf.keras NLP code to run on JAX for performance gains without rewriting custom layers. - Combine Keras NLP models with PyTorch data loaders or TensorFlow datasets in the same training loop. - Prototype NLP experiments rapidly by swapping backends to find the fastest one for your model architecture. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Keras-NLP provides pretrained models and utilities for natural language processing tasks built on Keras 3, supporting multiple backends (JAX, TensorFlow, PyTorch, OpenVINO). Yes, with conditions. Install if you need pretrained NLP models and want multi-backend flexibility without framework lock-in, or if you're already using Keras 3. The low install friction, active maintenance, and permissive license support this. However, the Alpha development status means the API may change; verify that the specific models and tasks you need are available in version 0.31.0 before committing to production use. ## Install pip install keras-nlp uv add keras-nlp poetry add keras-nlp ## Installing keras-nlp Before you install: Low install friction with a pure-Python wheel. Active maintenance with recent release (6 days old) and strong repository signals (64228 stars, last commit 2026-08-14). Requires Keras 3 as a runtime dependency. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions, making it suitable for most production and research contexts. Quickstart: pip install keras-nlp import keras_nlp # Configure backend before importing keras import os os.environ["KERAS_BACKEND"] = "jax" import keras Requires Python >= 3.10 and a Keras 3 backend (TensorFlow 2.16.1+, JAX 0.4.20+, PyTorch 2.1.0+, or OpenVINO 2026.2.0+) to be installed separately. Verify before relying: - Specific pretrained model architectures and task coverage available in version 0.31.0 - Performance benchmarks for NLP tasks compared to other frameworks - API stability guarantees given 'Alpha' development status ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 287.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pretrained nlp models, keras natural language processing, transformer models keras, text classification deep learning, language model inference, nlp with keras 3, multi-backend nlp framework, multi-backend, pretrained-models, nlp [View on SkillFed](https://skillfed.io/packages/keras-nlp) · [View on PyPI](https://pypi.org/project/keras-nlp/)