• Stars
    star
    6,646
  • Rank 5,952 (Top 0.2 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created almost 7 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

License Apache 2.0 Python 3.6, 3.7, 3.8, 3.9, 3.10 Downloads

DeepPavlov is an open-source conversational AI library built on PyTorch.

DeepPavlov is designed for

  • development of production ready chat-bots and complex conversational systems,
  • research in the area of NLP and, particularly, of dialog systems.

Quick Links

Please leave us your feedback on how we can improve the DeepPavlov framework.

Models

Named Entity Recognition | Intent/Sentence Classification |

Question Answering over Text (SQuAD) | Knowledge Base Question Answering

Sentence Similarity/Ranking | TF-IDF Ranking

Automatic Spelling Correction | Entity Linking

Open Domain Questions Answering | Russian SuperGLUE

Embeddings

BERT embeddings for the Russian, Polish, Bulgarian, Czech, and informal English

ELMo embeddings for the Russian language

FastText embeddings for the Russian language

Auto ML

Tuning Models

Integrations

REST API | Socket API

Amazon AWS

Installation

  1. We support Linux platform, Python 3.6, 3.7, 3.8, 3.9 and 3.10

    • Python 3.5 is not supported!
  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.

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.

More Repositories

1

ner

Named Entity Recognition
Python
328
star
2

tdl

Course "Theories of Deep Learning"
Jupyter Notebook
196
star
3

question_generation

It is a question-generator model. It takes text and an answer as input and outputs a question.
Python
173
star
4

dream

DeepPavlov Dream is a free, open-source Multiskill AI Assistant Platform built using DeepPavlov Conversational AI Stack. It is built on top of DeepPavlov Agent running as container in Docker. It runs on x86_64 machines, and prefers having NVIDIA GPUs on the machine.
Python
170
star
5

deep-nlp-seminars

Materials for deep NLP course
Jupyter Notebook
118
star
6

dlschl

Jupyter Notebook
109
star
7

intent_classifier

Python
84
star
8

Slavic-BERT-NER

Shared BERT model for 4 languages of Bulgarian, Czech, Polish and Russian. Slavic NER model.
Python
72
star
9

dp-agent

DeepPavlov Agent
Python
64
star
10

dp_notebooks

Jupyter Notebook
63
star
11

ru_sentence_tokenizer

A simple and fast rule-based sentence segmentation. Tested on OpenCorpora and SynTagRus datasets.
Python
52
star
12

ConvAI-baseline

ConvAI baseline solution
Python
51
star
13

tdl2

Theoretical Deep Learning: generalization ability
Jupyter Notebook
46
star
14

dp_tutorials

Jupyter Notebook
31
star
15

chatsky

Chatsky is a free and open-source software stack for creating chatbots, released under the terms of Apache License 2.0.
Python
31
star
16

deep-rl-seminars

Materials for Deep RL seminars.
Jupyter Notebook
29
star
17

kpi2017

Open Source framework for developing Dialog Agents
Python
20
star
18

dialog_flow_engine

Dialog Flow Engine (DFE) allows you to write conversational services. The service is written by defining a special dialog graph that describes the behavior of the dialog service. The dialog graph contains the dialog script. DFE offers a specialized language (DSL) for quickly writing dialog graphs. You can use it in such services for writing skills for Amazon Alexa and etc, chat-bots for social networks, websites call-centers and etc.
Python
18
star
19

dialog_flow_framework_info

This repository can help to navigate DeepPavlov Dialog Flow Framework projects. Dialog Flow Framework is a free and open-source software stack for creating chatbots, released under the terms of Apache License 2.0.
15
star
20

dp-dream-demos

Most basic AI Assistant demo derived from the DeepPavlov Dream AI Assistant.
Python
13
star
21

dl-frameworks-course

Jupyter Notebook
13
star
22

expected_bleu

Differentiable lower bound for BLEU score.
Jupyter Notebook
12
star
23

NLPCourseBot

Telegram-bot for NLP/RL courses
Python
12
star
24

hcn-dialogue-manager

Hybrid Code Network dialogue manager
Python
11
star
25

RDLS_NLP_2022

Jupyter Notebook
10
star
26

demo-cisco

HTML
8
star
27

research

Ongoing and published research, papers and code.
Jupyter Notebook
8
star
28

deepPavlovEval

Sentence embeddings evaluation for russian tasks
Jupyter Notebook
8
star
29

turing-data

Data from Turing.DeepHack
Jupyter Notebook
8
star
30

Allen_HCN

An open source library for building end-to-end dialog systems and training chatbots.
Python
7
star
31

demo

JavaScript
6
star
32

babel-baseline

Baseline solution for DeepHack.Babel
Shell
6
star
33

tagging_tool_js

Lightweight tool for sentence tagging (i.e. NER markup) on JavaScript
JavaScript
6
star
34

raai_summer_school_nlp_2021

6
star
35

stand_kubernetes_cluster

Dockerfile
5
star
36

demo2

iPavlov demo site for DeepPavlov lib.
TypeScript
5
star
37

diff_beam_search

Python
5
star
38

seq2seq_scg

Optimization seq2seq model.
Python
5
star
39

char-language-model

A collection of sources implementing encoding of user's messages.
Jupyter Notebook
5
star
40

dialog_flow_sdk

Dialog Flow SDK
Python
5
star
41

fewshot_NER

Jupyter Notebook
5
star
42

AutoIntent

An open source tool for automatic configuration of a text classification pipeline for intent prediction
Jupyter Notebook
5
star
43

learning-to-learn

Python
4
star
44

chatsky-ui

Dialog Flow Designer is GUI for Dialog Flow Framework, that is a free and open-source software stack for creating chatbots, released under the terms of Apache License 2.0.
TypeScript
4
star
45

lm

Bi-directional Language Model
Python
4
star
46

dd-idde

DD-IDDE - Discourse-Driven Integrated Dialog Development Environment.
TypeScript
4
star
47

infinite-width_nets

Jupyter Notebook
4
star
48

deeppavlov-gsoc-ideas

HTML
4
star
49

explainable_qa

Services for explainable QA
Python
4
star
50

neural-state-machines

Python
4
star
51

ipavlov.ai

JavaScript
3
star
52

h-elmo

Python
3
star
53

deeppavlov_annotation_tools

Data annotation tools for NLP tasks
Python
3
star
54

dialog_flow_demo

Python
3
star
55

dialog_flow_designer_prototype

DF Designer
TypeScript
3
star
56

convai_router_bot

ConvAI Router Bot
Python
3
star
57

dp_aiml_speller_chat_bot

Simple AIML Chat Bot with Spell Corrector on DeepPavlov
Jupyter Notebook
2
star
58

sberdemo

Python
2
star
59

convai_sample_bot

Python
2
star
60

ner-meta

Python
2
star
61

dream-builder

Python
2
star
62

convai-testing-system

Scala
2
star
63

EasyIntentCacther

Administrative tool for managing datasets of IntentCacther
Python
2
star
64

deeppavlov_dreamtools

Development Tools for DeepPavlov Dream
Python
2
star
65

audio-captioning-dcase

Python
1
star
66

stand_squad_en

Python
1
star
67

stand_squad_ru

Python
1
star
68

dream-landing

Landing and demo page for Dream social bot
TypeScript
1
star
69

dff_sphinx_theme

Sphinx theme for dialog flow framework distributed website
SCSS
1
star
70

Deepy1000

dp-dream-deepy
C#
1
star
71

convai_router_bot_poller

Python
1
star
72

sbrf_bot

Python
1
star
73

kb

Knowledge Bases
1
star
74

stand_ner_en_ontonotes

Python
1
star
75

stand_ranking_en

Shell
1
star
76

dialog_flow_tutorials

Jupyter Notebook
1
star
77

p_srv

Paraphraser microservice
Python
1
star
78

qa_metrics

Python
1
star
79

rus_ner_dataset

Jupyter Notebook
1
star
80

stand_docker_base

Dockerfile
1
star
81

deepreply

Python
1
star
82

entity_extraction_svc

Entity Extraction Service
Jupyter Notebook
1
star
83

custom_kg_svc

API to work with knowledge bases at runtime
Python
1
star
84

survey-bot

Jupyter Notebook
1
star
85

kgbot

Bot for kudago.com
C#
1
star
86

translation-enru

Python
1
star
87

dialog_flow_db_connector

Dialog Flow DB Connector is an addon for the Dialog Flow Framework and allows you to to save and retrieve user dialogue states (in the form of a `Context` object) using various database backends.
Python
1
star
88

dream-messenger

Dream Messenger
TypeScript
1
star
89

neuron-correlation

Experiments for measurement of neurons mutual correlation
Jupyter Notebook
1
star
90

chatsky-template

A template repository for DFF projects.
Python
1
star