RepositoryPython
deeppavlov

deeppavlov/DeepPavlov

An open source library for deep learning end-to-end dialog systems and chatbots.

7.0kstars
1.2kforks
34issues
5views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: slot-filling

#1 Repository of the week

1
TINIX TRENDING·Topic: chitchat

#1 Repository of the week

1
TINIX TRENDING·Topic: entity-extraction

#1 Repository of the week

DeepPavlov 1.0

License Apache 2.0 Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 Downloads Static Badge Static Badge

DeepPavlov 1.0 is an open-source NLP framework built on PyTorch and transformers. DeepPavlov 1.0 is created for modular and configuration-driven development of state-of-the-art NLP models and supports a wide range of NLP model applications. DeepPavlov 1.0 is designed for practitioners with limited knowledge of NLP/ML.

nameDescription
⭐️ DemoCheck out our NLP models in the online demo
📚 DocumentationHow to use DeepPavlov 1.0 and its features
🚀 Model ListFind the NLP model you need in the list of available models
🪐 Contribution GuidePlease read the contribution guidelines before making a contribution
🎛 IssuesIf you have an issue with DeepPavlov, please let us know
⏩ ForumPlease let us know if you have a problem with DeepPavlov
📦 BlogsRead about our current development
🦙 Extended colab tutorialsCheck out the code tutorials for our models
🌌 Docker HubCheck out the Docker images for rapid deployment
👩‍🏫 FeedbackPlease leave us your feedback to make DeepPavlov better

Installation

  1. DeepPavlov supports Linux, Windows 10+ (through WSL/WSL2), MacOS (Big Sur+) platforms, Python 3.6, 3.7, 3.8, 3.9 and 3.10. Depending on the model used, you may need from 4 to 16 GB RAM.

  2. Create and activate a virtual environment:

    • Linux
    python -m venv env
    source ./env/bin/activate
    
  3. Install the package inside the environment:

    pip install deeppavlov
    

QuickStart

There is a bunch of great pre-trained NLP models in DeepPavlov. Each model is determined by its config file.

List of models is available on the doc page in the deeppavlov.configs (Python):

from deeppavlov import configs

When you're decided on the model (+ config file), there are two ways to train, evaluate and infer it:

GPU requirements

By default, DeepPavlov installs models requirements from PyPI. PyTorch from PyPI could not support your device CUDA capability. To run supported DeepPavlov models on GPU you should have CUDA compatible with used GPU and PyTorch version required by DeepPavlov models. See docs for details. GPU with Pascal or newer architecture and 4+ GB VRAM is recommended.

Command line interface (CLI)

To get predictions from a model interactively through CLI, run

python -m deeppavlov interact <config_path> [-d] [-i]
  • -d downloads required data - pretrained model files and embeddings (optional).
  • -i installs model requirements (optional).

You can train it in the same simple way:

python -m deeppavlov train <config_path> [-d] [-i]

Dataset will be downloaded regardless of whether there was -d flag or not.

To train on your own data you need to modify dataset reader path in the train config doc. The data format is specified in the corresponding model doc page.

There are even more actions you can perform with configs:

python -m deeppavlov <action> <config_path> [-d] [-i]
  • <action> can be
    • install to install model requirements (same as -i),
    • download to download model's data (same as -d),
    • train to train the model on the data specified in the config file,
    • evaluate to calculate metrics on the same dataset,
    • interact to interact via CLI,
    • riseapi to run a REST API server (see doc),
    • predict to get prediction for samples from stdin or from <file_path> if -f <file_path> is specified.
  • <config_path> specifies path (or name) of model's config file
  • -d downloads required data
  • -i installs model requirements

Python

To get predictions from a model interactively through Python, run

from deeppavlov import build_model

model = build_model(<config_path>, install=True, download=True)

# get predictions for 'input_text1', 'input_text2'
model(['input_text1', 'input_text2'])

where

  • install=True installs model requirements (optional),
  • download=True downloads required data from web - pretrained model files and embeddings (optional),
  • <config_path> is model name (e.g. 'ner_ontonotes_bert_mult'), path to the chosen model's config file (e.g. "deeppavlov/configs/ner/ner_ontonotes_bert_mult.json"), or deeppavlov.configs attribute (e.g. deeppavlov.configs.ner.ner_ontonotes_bert_mult without quotation marks).

You can train it in the same simple way:

from deeppavlov import train_model 

model = train_model(<config_path>, install=True, download=True)

To train on your own data you need to modify dataset reader path in the train config doc. The data format is specified in the corresponding model doc page.

You can also calculate metrics on the dataset specified in your config file:

from deeppavlov import evaluate_model 

model = evaluate_model(<config_path>, install=True, download=True)

DeepPavlov also allows to build a model from components for inference using Python.

License

DeepPavlov is Apache 2.0 - licensed.

Citation

@inproceedings{savkin-etal-2024-deeppavlov,
    title = "DeepPavlov 1.0: Your Gateway to Advanced NLP Models Backed by Transformers and Transfer Learning",
    author = "Savkin Maksim and Voznyuk Anastasia and Ignatov Fedor and Korzanova Anna and Karpov Dmitry and Popov Alexander and Konovalov Vasily"
    editor = "Hernandez Farias and Delia Irazu and Hope Tom and Li Manling",
    booktitle = "Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing: System Demonstrations",
    month = nov,
    year = "2024",
    address = "Miami, Florida, USA",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2024.emnlp-demo.47",
    pages = "465--474",
    abstract = "We present DeepPavlov 1.0, an open-source framework for using Natural Language Processing (NLP) models by leveraging transfer learning techniques. DeepPavlov 1.0 is created for modular and configuration-driven development of state-of-the-art NLP models and supports a wide range of NLP model applications. DeepPavlov 1.0 is designed for practitioners with limited knowledge of NLP/ML. DeepPavlov is based on PyTorch and supports HuggingFace transformers. DeepPavlov is publicly released under the Apache 2.0 license and provides access to an online demo.",
}

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
hankcs/HanLP

Natural Language Processing for the next decade. Tokenization, Part-of-Speech Tagging, Named Entity Recognition, Syntactic & Semantic Dependency Parsing, Document Classification

36.5k
Nov 7, 2026
RepositoryPython
python-telegram-bot/python-telegram-bot

We have made you a wrapper you can't refuse

29.6k
Dec 1, 2026
RepositoryPython
RasaHQ/rasa

💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants

21.4k
Jul 24, 2026
RepositoryPython
gunthercox/ChatterBot

ChatterBot is a machine learning, conversational dialog engine for creating chat bots

14.5k
Nov 27, 2026
RepositoryPython
flairNLP/flair

A very simple framework for state-of-the-art Natural Language Processing (NLP)

14.4k
Oct 19, 2026
RepositoryPython
PaddlePaddle/PaddleNLP

Easy-to-use and powerful LLM and SLM library with awesome model zoo.

13.0k
May 23, 2026
RepositoryPython
chiphuyen/stanford-tensorflow-tutorials

This repository contains code examples for the Stanford's course: TensorFlow for Deep Learning Research.

10.4k
Dec 22, 2020
RepositoryPython
sfyc23/EverydayWechat

微信助手:1.每日定时给好友(女友)发送定制消息。2.机器人自动回复好友。3.群助手功能(例如:查询垃圾分类、天气、日历、电影实时票房、快递物流、PM2.5等)

10.4k
Jun 22, 2021
RepositoryPython
qq547276542/Agriculture_KnowledgeGraph

农业知识图谱(AgriKG):农业领域的信息检索,命名实体识别,关系抽取,智能问答,辅助决策

4.4k
Feb 11, 2025