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

Overview

License Apache 2.0 Python 3.6, 3.7 Downloads

DeepPavlov is an open-source conversational AI library built on TensorFlow, Keras and 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 | Slot filling

Intent/Sentence Classification | Question Answering over Text (SQuAD)

Knowledge Base Question Answering

Sentence Similarity/Ranking | TF-IDF Ranking

Morphological tagging | Syntactic parsing

Automatic Spelling Correction | ELMo training and fine-tuning

Speech recognition and synthesis (ASR and TTS) based on NVIDIA NeMo

Entity Linking | Multitask BERT

Skills

Goal(Task)-oriented Bot | Seq2seq Goal-Oriented bot

Open Domain Questions Answering | eCommerce Bot

Frequently Asked Questions Answering | Pattern Matching

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 with Evolutionary Algorithm

Integrations

REST API | Socket API | Yandex Alice

Telegram | Microsoft Bot Framework

Amazon Alexa | Amazon AWS

Installation

  1. We support Linux and Windows platforms, Python 3.6 and Python 3.7

    • Python 3.5 is not supported!
    • installation for Windows requires Git(for example, git) and Visual Studio 2015/2017 with C++ build tools installed!
  2. Create and activate a virtual environment:

    • Linux
    python -m venv env
    source ./env/bin/activate
    
    • Windows
    python -m venv env
    .\env\Scripts\activate.bat
    
  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

To run supported DeepPavlov models on GPU you should have CUDA 10.0 installed on your host machine and TensorFlow with GPU support (tensorflow-gpu) installed in your python environment. Current supported TensorFlow version is 1.15.2. Run

pip install tensorflow-gpu==1.15.2

before installing model's package requirements to install supported tensorflow-gpu version.

Before making choice of an interface, install model's package requirements (CLI):

python -m deeppavlov install <config_path>
  • where <config_path> is path to the chosen model's config file (e.g. deeppavlov/configs/ner/slotfill_dstc2.json) or just name without .json extension (e.g. slotfill_dstc2)

Command line interface (CLI)

To get predictions from a model interactively through CLI, run

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

You can train it in the same simple way:

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

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]
  • <action> can be
    • 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),
    • telegram to run as a Telegram bot (see doc),
    • msbot to run a Miscrosoft Bot Framework 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

Python

To get predictions from a model interactively through Python, run

from deeppavlov import build_model

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

# get predictions for 'input_text1', 'input_text2'
model(['input_text1', 'input_text2'])
  • where download=True downloads required data from web -- pretrained model files and embeddings (optional),
  • <config_path> is 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>, download=True)
  • download=True downloads pretrained model, therefore the pretrained model will be, first, loaded and then train (optional).

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.

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

from deeppavlov import evaluate_model 

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

There are also available integrations with various messengers, see Telegram Bot doc page and others in the Integrations section for more info.

Breaking Changes

Breaking changes in version 0.7.0

Breaking changes in version 0.6.0

  • REST API:
    • all models default endpoints were renamed to /model
    • by default model arguments names are taken from chainer.in configuration parameter instead of pre-set names from a settings file
    • swagger api endpoint moved from /apidocs to /docs
  • when using "max_proba": true in a proba2labels component for classification, it will return single label for every batch element instead of a list. One can set "top_n": 1 to get batches of single item lists as before

Breaking changes in version 0.5.0

  • dependencies have to be reinstalled for most pipeline configurations
  • models depending on tensorflow require CUDA 10.0 to run on GPU instead of CUDA 9.0
  • scikit-learn models have to be redownloaded or retrained

Breaking changes in version 0.4.0!

  • default target variable name for neural evolution was changed from MODELS_PATH to MODEL_PATH.

Breaking changes in version 0.3.0!

  • component option fit_on_batch in configuration files was removed and replaced with adaptive usage of the fit_on parameter.

Breaking changes in version 0.2.0!

  • utils module was moved from repository root in to deeppavlov module
  • ms_bot_framework_utils,server_utils, telegram utils modules was renamed to ms_bot_framework, server and telegram correspondingly
  • rename metric functions exact_match to squad_v2_em and squad_f1 to squad_v2_f1
  • replace dashes in configs name with underscores

Breaking changes in version 0.1.0!

  • As of version 0.1.0 all models, embeddings and other downloaded data for provided configurations are by default downloaded to the .deeppavlov directory in current user's home directory. This can be changed on per-model basis by modifying a ROOT_PATH variable or related fields one by one in model's configuration file.

  • In configuration files, for all features/models, dataset readers and iterators "name" and "class" fields are combined into the "class_name" field.

  • deeppavlov.core.commands.infer.build_model_from_config() was renamed to build_model and can be imported from the deeppavlov module directly.

  • The way arguments are passed to metrics functions during training and evaluation was changed and documented.

License

DeepPavlov is Apache 2.0 - licensed.

The Team

DeepPavlov is built and maintained by Neural Networks and Deep Learning Lab at MIPT.

Comments
  • Regarding Spelling Error model

    Regarding Spelling Error model

    Thanks for amazing toolkit :) Can you please share your views on below questions

    1. How does correct_prior & incorrect_prior calculation done in Error model ?
    2. How do we incorporate "count" with incorrect-correct pair e.g. if training data is in form of (intended_word, observed_word, count).
    3. Is there any other way we can combine LM score & EM score in LM beam search method ?

    Thanks a lot !!

    opened by smilenrhyme 26
  • Error while trying to get the probablities of the predicted entities using ontonotes_bert ner model

    Error while trying to get the probablities of the predicted entities using ontonotes_bert ner model

    Deeppavlov version: 0.12.1 Python version: 3.7.7 "return_probas"set to true in ner_ontonotes_bert config json Command: python -m deeppavlov interact F:\miniconda3\envs\ute_query_params_service\Lib\site-packages\deeppavlov\configs\ner\ner_ontonotes_bert.js Command string: London is in England. Full Traceback: [nltk_data] Downloading package punkt to [nltk_data] C:\Users\User\AppData\Roaming\nltk_data... [nltk_data] Package punkt is already up-to-date! [nltk_data] Downloading package stopwords to [nltk_data] C:\Users\User\AppData\Roaming\nltk_data... [nltk_data] Package stopwords is already up-to-date! [nltk_data] Downloading package perluniprops to [nltk_data] C:\Users\User\AppData\Roaming\nltk_data... [nltk_data] Package perluniprops is already up-to-date! [nltk_data] Downloading package nonbreaking_prefixes to [nltk_data] C:\Users\User\AppData\Roaming\nltk_data... [nltk_data] Package nonbreaking_prefixes is already up-to-date! WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\bert_dp\tokenization.py:125: The name tf.gfile.GFile is deprecated. Please use tf.io.gfile.GFile instead.

    2020-11-30 21:37:31.122 INFO in 'deeppavlov.core.data.simple_vocab'['simple_vocab'] at line 115: [loading vocabulary from C:\Users\User.deeppavlov\models\ner_ontonotes_bert\tag.dict] WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\models\tf_model.py:37: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

    WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\models\tf_model.py:222: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

    WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\models\tf_model.py:222: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.

    WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\models\tf_model.py:193: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead.

    WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\models\bert\bert_sequence_tagger.py:236: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

    WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\models\bert\bert_sequence_tagger.py:314: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.

    WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\bert_dp\modeling.py:178: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.

    WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\bert_dp\modeling.py:418: The name tf.get_variable is deprecated. Please use tf.compat.v1.get_variable instead.

    WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\bert_dp\modeling.py:499: The name tf.assert_less_equal is deprecated. Please use tf.compat.v1.assert_less_equal instead.

    WARNING:tensorflow: The TensorFlow contrib module will not be included in TensorFlow 2.0. For more information, please see:

    • https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
    • https://github.com/tensorflow/addons
    • https://github.com/tensorflow/io (for I/O related ops) If you depend on functionality not listed there, please file an issue.

    WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\bert_dp\modeling.py:366: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version. Instructions for updating: Please use rate instead of keep_prob. Rate should be set to rate = 1 - keep_prob. WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\bert_dp\modeling.py:680: dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.Dense instead. WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\tensorflow_core\python\layers\core.py:187: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version. Instructions for updating: Please use layer.__call__ method instead. WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\bert_dp\modeling.py:283: The name tf.erf is deprecated. Please use tf.math.erf instead.

    WARNING:tensorflow:Variable *= will be deprecated. Use var.assign(var * other) if you want assignment to the variable value or x = x * y if you want a new python Tensor object. WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\models\bert\bert_sequence_tagger.py:75: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.where in 2.0, which has the same broadcast rule as np.where WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\tensorflow_core\contrib\crf\python\ops\crf.py:213: dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version. Instructions for updating: Please use keras.layers.RNN(cell), which is equivalent to this API WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\models\tf_model.py:234: The name tf.train.AdadeltaOptimizer is deprecated. Please use tf.compat.v1.train.AdadeltaOptimizer instead.

    WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\models\tf_model.py:131: The name tf.get_collection is deprecated. Please use tf.compat.v1.get_collection instead.

    WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\models\tf_model.py:131: The name tf.GraphKeys is deprecated. Please use tf.compat.v1.GraphKeys instead.

    WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\models\tf_model.py:94: The name tf.global_variables is deprecated. Please use tf.compat.v1.global_variables instead.

    WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\tensorflow_core\python\training\moving_averages.py:433: Variable.initialized_value (from tensorflow.python.ops.variables) is deprecated and will be removed in a future version. Instructions for updating: Use Variable.read_value. Variables in 2.X are initialized automatically both in eager and graph (inside tf.defun) contexts. WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\models\bert\bert_sequence_tagger.py:671: The name tf.assign is deprecated. Please use tf.compat.v1.assign instead.

    WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\models\bert\bert_sequence_tagger.py:244: The name tf.global_variables_initializer is deprecated. Please use tf.compat.v1.global_variables_initializer instead.

    WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\models\bert\bert_sequence_tagger.py:249: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version. Instructions for updating: Use standard file APIs to check for files with this prefix. 2020-11-30 21:40:57.982 INFO in 'deeppavlov.core.models.tf_model'['tf_model'] at line 51: [loading model from C:\Users\User.deeppavlov\models\ner_ontonotes_bert\model] WARNING:tensorflow:From f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\models\tf_model.py:54: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.

    x::London is in England. Traceback (most recent call last): File "f:\miniconda3\envs\ute_query_params_service\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "f:\miniconda3\envs\ute_query_params_service\lib\runpy.py", line 85, in run_code exec(code, run_globals) File "f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov_main.py", line 4, in main() File "f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\deep.py", line 89, in main interact_model(pipeline_config_path) File "f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\commands\infer.py", line 89, in interact_model pred = model(*args) File "f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\common\chainer.py", line 207, in call return self._compute(*args, param_names=self.in_x, pipe=self.pipe, targets=self.out_params) File "f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\common\chainer.py", line 230, in _compute res = component.call(*x) File "f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\data\simple_vocab.py", line 92, in call looked_up_batch = [self(sample, is_top=False) for sample in batch] File "f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\data\simple_vocab.py", line 92, in looked_up_batch = [self(sample, is_top=False) for sample in batch] File "f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\data\simple_vocab.py", line 92, in call looked_up_batch = [self(sample, is_top=False) for sample in batch] File "f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\data\simple_vocab.py", line 92, in looked_up_batch = [self(sample, is_top=False) for sample in batch] File "f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\data\simple_vocab.py", line 92, in call looked_up_batch = [self(sample, is_top=False) for sample in batch] File "f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\data\simple_vocab.py", line 92, in looked_up_batch = [self(sample, is_top=False) for sample in batch] File "f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\data\simple_vocab.py", line 94, in call return self[batch] File "f:\miniconda3\envs\ute_query_params_service\lib\site-packages\deeppavlov\core\data\simple_vocab.py", line 161, in getitem raise NotImplementedError("not implemented for type {}".format(type(key))) NotImplementedError: not implemented for type <class 'numpy.float32'>

    I would like to get the probablities of predicted entities. Is return_probas is the way to go? Please help. Thanks in advance.

    • Ravishankar
    opened by ravishpankar 20
  • Data set creation routine for gobot DSTC 2 format

    Data set creation routine for gobot DSTC 2 format

    Hi,

    I want to create data set creation routine for gobot DSTC 2 format. I know that that there is an on going refactoring of the codebase for the Goal-oriented bot (gobot).

    Also, there is a new DSTC 8 challenge and Alexa Prize socialbot which is to be open sourced.

    So I want to ask if this feature would be needed or is it duplication of work?

    Ideally, I want to pull the routine to the deeppavlov repo, so I need some guidance/advice before jumping into the implementation.

    Things I want to clarify:

    1. Is this routine needed to be developed? Or is it already underway and it would be duplication of work?
    2. What format would be best (DSTC 2 json, DSTC 8, etc)?
    3. I want to create CLI with python, is it good?

    Anything else you think might be appropriate.

    feature request 
    opened by Eugen2525 17
  • NER fine-tuninng using pretrained using ner_ontonotes_bert_mult

    NER fine-tuninng using pretrained using ner_ontonotes_bert_mult

    I am trying to use Bert for NER recognition of standard and some custom entities. For instance, I have the following entities: 'financial_instrument', 'amount', 'percent', 'hashtag', 'exchange', 'number', 'sector', 'period', 'location', 'media_type', 'analyst', 'ticker', 'person', 'price_movement', 'rating_agency', 'product', 'amount_price_target', 'financial_topic', 'publication', 'company', 'event' and some of them I can map to the existing ones in BIO format, such as: EVENT, PERCENT, NUMBER, GPE, PERIOD, NORG, etc. However, some of my entities are new and cannot be mapped. I was wondering if I can use the pretrained ner_ontonotes_bert_mult and just add my specific entities to fine-tune the model? Is this possible and could you provide to me sample code?

    Tnx

    opened by igormis 17
  • deeppavlov.core.common.errors.ConfigError: 'Given fasttext model does NOT match fasttext model used previously to train loaded model'

    deeppavlov.core.common.errors.ConfigError: 'Given fasttext model does NOT match fasttext model used previously to train loaded model'

    I goy the following error

    Traceback (most recent call last): File "deep.py", line 63, in main() File "deep.py", line 55, in main interact_model_by_telegram(pipeline_config_path, token) File "/home/mdixie/.conda/envs/deeppavlov/lib/python3.6/site-packages/deeppavlov-0.0.1-py3.6.egg/telegram_utils/telegram_ui.py", line 57, in interact_model_by_telegram model = build_model_from_config(config) File "/home/mdixie/.conda/envs/deeppavlov/lib/python3.6/site-packages/deeppavlov-0.0.1-py3.6.egg/deeppavlov/core/commands/infer.py", line 34, in build_model_from_config model = from_params(REGISTRY[model_name], model_config, vocabs=vocabs, mode=mode) File "/home/mdixie/.conda/envs/deeppavlov/lib/python3.6/site-packages/deeppavlov-0.0.1-py3.6.egg/deeppavlov/core/common/params.py", line 49, in from_params mode=kwargs['mode']) File "/home/mdixie/.conda/envs/deeppavlov/lib/python3.6/site-packages/deeppavlov-0.0.1-py3.6.egg/deeppavlov/core/common/params.py", line 52, in from_params model = cls(**dict(config_params, **kwargs)) File "/home/mdixie/.conda/envs/deeppavlov/lib/python3.6/site-packages/deeppavlov-0.0.1-py3.6.egg/deeppavlov/core/models/tf_backend.py", line 47, in call obj.init(*args, **kwargs) File "/home/mdixie/.conda/envs/deeppavlov/lib/python3.6/site-packages/deeppavlov-0.0.1-py3.6.egg/deeppavlov/core/models/tf_backend.py", line 28, in _wrapped return func(*args, **kwargs) File "/home/mdixie/.conda/envs/deeppavlov/lib/python3.6/site-packages/deeppavlov-0.0.1-py3.6.egg/deeppavlov/models/classifiers/intents/intent_model.py", line 138, in init "Given fasttext model does NOT match fasttext model used previously to train loaded model") deeppavlov.core.common.errors.ConfigError: 'Given fasttext model does NOT match fasttext model used previously to train loaded model'

    opened by dixiematt8 16
  • Bert for classification

    Bert for classification

    Здравствуйте! Я новичок в deep learning, хотела бы претренированную модель руберт использовать для своих данных. Задача обычная классификация русских текстов - 5 классов. Работаю на гугл колаб. Есть ли у вас туториалы пошагово как применять bert от deeppavlov для собаственных данных? как менять конфиг файл? Для примера взяла rusentiment_bert.json, но не могу разобраться как привести свои данные в тот формат, который требуется для MODELS_PATH. Спасибо!

    opened by Aygera 15
  • building go-bot in russian

    building go-bot in russian

    Hi! I want to build a go-bot using DeepPavlov in russian. The task of gobot is to output phone number of requested employee by his name, surname, fathers name. I plan to use tutorial03 as a reference. And the main idea is using instead of DSTC2 data set a new one, which i gonna generate in DSTC2 format. Has the described aproach a right to exist?

    help wanted 
    opened by vitalyuf 15
  • Upgrading Tensorflow to 1.15.4 in tf.txt

    Upgrading Tensorflow to 1.15.4 in tf.txt

    What problem are we trying to solve?:

    There are many security risks around TensorFlow version 1.15.2. These issues have been fixed in version 1.15.4 and newer versions. Newer versions have also been optimized better than 1.15.2.
    

    How can we solve it?:

    Upgrading the TensorFlow to 1.15.4 in the deeppavlov>>requirements>>tf.txt from tensorflow==1.15.2 to tensorflow==1.15.4.
    

    Are there other issues that block this solution?:

    Missing out on the optimization and security enhancements.
    

    Any important aspect to consider?:

    Making sure that upgrading the TensorFlow to 1.15.4 causes no issue in syntaxes and yields the same results as 1.15.2.
    
    enhancement 
    opened by Rajmehta123 12
  • Library does't see GPU

    Library does't see GPU

    Hi everyone, thanks for your library! I use several BERT models, but I can't train them using GPU. I describe all process:

    1. I install Deeppavlov package into docker container
    2. I install tensorflow-gpu: pip install tensorflow-gpu==1.14.0
    3. I install model’s package requirements and download model
    4. I move docker container to another machine with acсess to GPU. This machine has CUDA and cudnn. But when I train model, it uses CPU. I try to check access to GPU using this command: tf.test_is_gpu_avalaible. It returns me False( May be there is a mistake in this sequence of actions?
    opened by ostreech1997 12
  • feat: Imdb sentiment dataset reader

    feat: Imdb sentiment dataset reader

    This PR implements a dataset reader for the IMDb sentiment classification dataset. It also includes a json configuration for BERT (en, cased) which is mostly the same as the configuration for rusentiment except for the max seq length and batch size (which I set to values such that I don't get out-of-memory on my hardware).

    This PR also includes a fix for the sets_accuracy metric which should now correctly work for string labels (i.e. wrap them into sets instead converting them to sets). Also I added reporting of cached files in download_decompress.

    opened by sgrechanik-h 12
  • ODQA inference speed very very slow

    ODQA inference speed very very slow

    Running the default configuration and model on a EC2 p2.xlarge instance (60~GB Ram and Nvidia K80 GPU) and inference for simple questions take 40 seconds to 5 minutes.

    Sometimes, no result even after 10 minutes.

    MobaXterm_2019-05-27_16-36-13
    opened by shubhank008 12
  • add fusion in decoder

    add fusion in decoder

    Файл c кодом модели полностью перекопирован из репозитория FiD, мне показалось что ради одного файла добавлять целый репозиторий не стоит, но мне не очевдно насколько это правильное решение

    opened by LogicZMaksimka 0
  • 👩‍💻📞DeepPavlov Community Call #18

    👩‍💻📞DeepPavlov Community Call #18

    Привет, друзья!

    Мы рады вернуться в этом месяце с DeepPavlov Community Call на русском языке. На предстоящем вебинаре к нам придет приглашенный гость Борис Галицкий, ассоциированный сотрудник лаборатории Интеллектуальных систем и структурного анализа НИУ ВШЭ, основатель нескольких стартапов в области ИИ, профессор ANECA, а также бывший сотрудник Oracle, представит доклад на тему “Дискурсивный анализ текста для организации диалога”.

    Сделать диалог с чат-ботом логичным и интересным — важнейшая задача области Conversational AI. Для этого применяются самые разные подходы, и один из них — дискурсивный анализ текста. Его идея состоит в том, чтобы чат-бот помог пользователю сфокусироваться лишь на каком-либо предложении из всего текста. В дискурсивном дереве текст разбивается на части, связанные логическими отношениями, и чат-бот направляет по ним пользователя, развивая диалог. Например, это могут быть временные (temporal) отношения, когда пользователя наверняка заинтересует, что будет после описанного события или что было до него. На нашем вебинаре Борис Галицкий подробно расскажет о способе управления ходом диалога в чат-боте на основе дискурсивного анализа текста.

    DeepPavlov Community Call #11, Русская версия (27 июля, 2022) Мы проведем следующий звонок 27 июля 2022 в 19.00 по Московскому времени (19 MSK). Добавьте напоминание в календарь: http://bit.ly/MonthlyDPCommunityCall2021Ru

    Повестка DeepPavlov Community Call #18, Русская версия:

    7:00pm–7:10pm | Приветствие 7:10 –7:45pm | Борис Галицкий: Дискурсивный анализ текста для организации диалога 7:45pm–8:00pm | Вопросы и ответы с Борисом Галицким и командой инженеров DeepPavlov

    В случае, если вы пропустили Community Calls ранее, вы всегда их можете найти в плейлисте.

    Мы приглашаем вас присоединиться к нам, чтобы сообщить, что вы думаете о последних изменениях, поделиться своими ожиданиями от предстоящей версии библиотеки и рассказать, как DeepPavlov помогает вам в ваших проектах!

    Оставьте отзыв о библиотеке DeepPavlov

    Мы хотим услышать вас. Вы можете заполнить форму ниже, чтобы сообщить нам, как вы используете DeepPavlov Library, что вы хотите, чтобы мы добавили или улучшили! http://bit.ly/DPLibrary2021Survey

    Заинтересовались? Не упускайте шанс и присоединяйтесь к нам! Этот Call открыт для всех энтузиастов в области Conversational AI.

    discussion 
    opened by PolinaMrdv 0
Releases(1.0.1)
Owner
Neural Networks and Deep Learning lab, MIPT
Neural Networks and Deep Learning lab, MIPT
Easy-to-use CPM for Chinese text generation

CPM 项目描述 CPM(Chinese Pretrained Models)模型是北京智源人工智能研究院和清华大学发布的中文大规模预训练模型。官方发布了三种规模的模型,参数量分别为109M、334M、2.6B,用户需申请与通过审核,方可下载。 由于原项目需要考虑大模型的训练和使用,需要安装较为复杂

382 Jan 07, 2023
تولید اسم های رندوم فینگیلیش

karafs کرفس تولید اسم های رندوم فینگیلیش installation ➜ pip install karafs usage دو زبانه ➜ karafs -n 10 توت فرنگی بی ناموس toot farangi-ye bi_namoos

Vaheed NÆINI (9E) 36 Nov 24, 2022
Korean extractive summarization. 2021 AI 텍스트 요약 온라인 해커톤 화성갈끄니까팀 코드

korean extractive summarization 2021 AI 텍스트 요약 온라인 해커톤 화성갈끄니까팀 코드 Leaderboard Notice Text Summarization with Pretrained Encoders에 나오는 bertsumext모델(ext

3 Aug 10, 2022
硕士期间自学的NLP子任务,供学习参考

NLP_Chinese_down_stream_task 自学的NLP子任务,供学习参考 任务1 :短文本分类 (1).数据集:THUCNews中文文本数据集(10分类) (2).模型:BERT+FC/LSTM,Pytorch实现 (3).使用方法: 预训练模型使用的是中文BERT-WWM, 下载地

12 May 31, 2022
Anuvada: Interpretable Models for NLP using PyTorch

Anuvada: Interpretable Models for NLP using PyTorch So, you want to know why your classifier arrived at a particular decision or why your flashy new d

EDGE 102 Oct 01, 2022
A high-level Python library for Quantum Natural Language Processing

lambeq About lambeq is a toolkit for quantum natural language processing (QNLP). Documentation: https://cqcl.github.io/lambeq/ Getting started Prerequ

Cambridge Quantum 315 Jan 01, 2023
NL-Augmenter 🦎 → 🐍 A Collaborative Repository of Natural Language Transformations

NL-Augmenter 🦎 → 🐍 The NL-Augmenter is a collaborative effort intended to add transformations of datasets dealing with natural language. Transformat

684 Jan 09, 2023
This is a Prototype of an Ai ChatBot "Tea and Coffee Supplier" using python.

Ai-ChatBot-Python A chatbot is an intelligent system which can hold a conversation with a human using natural language in real time. Due to the rise o

1 Oct 30, 2021
An attempt to map the areas with active conflict in Ukraine using open source twitter data.

Live Action Map (LAM) An attempt to use open source data on Twitter to map areas with active conflict. Right now it is used for the Ukraine-Russia con

Kinshuk Dua 171 Nov 21, 2022
Yet Another Sequence Encoder - Encode sequences to vector of vector in python !

Yase Yet Another Sequence Encoder - encode sequences to vector of vectors in python ! Why Yase ? Yase enable you to encode any sequence which can be r

Pierre PACI 12 Aug 19, 2021
뉴스 도메인 질의응답 시스템 (21-1학기 졸업 프로젝트)

뉴스 도메인 질의응답 시스템 본 프로젝트는 뉴스기사에 대한 질의응답 서비스 를 제공하기 위해서 진행한 프로젝트입니다. 약 3개월간 ( 21. 03 ~ 21. 05 ) 진행하였으며 Transformer 아키텍쳐 기반의 Encoder를 사용하여 한국어 질의응답 데이터셋으로

TaegyeongEo 4 Jul 08, 2022
nlpcommon is a python Open Source Toolkit for text classification.

nlpcommon nlpcommon, Python Text Tool. Guide Feature Install Usage Dataset Contact Cite Reference Feature nlpcommon is a python Open Source

xuming 3 May 29, 2022
NLP made easy

GluonNLP: Your Choice of Deep Learning for NLP GluonNLP is a toolkit that helps you solve NLP problems. It provides easy-to-use tools that helps you l

Distributed (Deep) Machine Learning Community 2.5k Jan 04, 2023
Tokenizer - Module python d'analyse syntaxique et de grammaire, tokenization

Tokenizer Le Tokenizer est un analyseur lexicale, il permet, comme Flex and Yacc par exemple, de tokenizer du code, c'est à dire transformer du code e

Manolo 1 Aug 15, 2022
Text classification is one of the popular tasks in NLP that allows a program to classify free-text documents based on pre-defined classes.

Deep-Learning-for-Text-Document-Classification Text classification is one of the popular tasks in NLP that allows a program to classify free-text docu

Happy N. Monday 2 Mar 17, 2022
Paddlespeech Streaming ASR GUI

Paddlespeech-Streaming-ASR-GUI Introduction A paddlespeech Streaming ASR GUI. Us

Niek Zhen 3 Jan 05, 2022
A PyTorch implementation of the Transformer model in "Attention is All You Need".

Attention is all you need: A Pytorch Implementation This is a PyTorch implementation of the Transformer model in "Attention is All You Need" (Ashish V

Yu-Hsiang Huang 7.1k Jan 05, 2023
This is the code for the EMNLP 2021 paper AEDA: An Easier Data Augmentation Technique for Text Classification

The baseline code is for EDA: Easy Data Augmentation techniques for boosting performance on text classification tasks

Akbar Karimi 81 Dec 09, 2022
ACL22 paper: Imputing Out-of-Vocabulary Embeddings with LOVE Makes Language Models Robust with Little Cost

Imputing Out-of-Vocabulary Embeddings with LOVE Makes Language Models Robust with Little Cost LOVE is accpeted by ACL22 main conference as a long pape

Lihu Chen 32 Jan 03, 2023
Application to help find best train itinerary, uses speech to text, has a spam filter to segregate invalid inputs, NLP and Pathfinding algos.

T-IAI-901-MSC2022 - GROUP 18 Gestion de projet Notre travail a été organisé et réparti dans un Trello. https://trello.com/b/X3s2fpPJ/ia-projet Install

1 Feb 05, 2022