Questions tagged [allennlp]

An open-source NLP research library, built on PyTorch

An Apache 2.0 NLP research library, built on PyTorch, for developing state-of-the-art deep learning models on a wide variety of linguistic tasks.

Quick Links

210 questions
0
votes
1 answer

How to train a textual entailment model with my own training set?

I'd like to train the decomposable attention + ELMo; SNLI model on the demo with my own dataset. I'm new to nlp. After going through the guide, I still have no idea of how to start off with my own training set consisting of plain text premise,…
0
votes
1 answer

Access field values of an instance in AllenNLP

I´m using AllenNLP for a combined classifier (one of its task is NER tagging), and while designing some tests, I've come across this doubt: how do I access the values of the different fields of my AllenNLP instance? I want to compared them with the…
ignacioct
  • 325
  • 1
  • 12
0
votes
1 answer

Building a Pipline Model using allennlp

I am pretty new to allennlp and I am struggling with building a model that does not seem to fit perfectly in the standard way of building model in allennlp. I want to build a pipeline model using NLP. The pipeline consists basically of two models,…
0
votes
1 answer

allennlp.predictors.predictor.get_gradients got error RuntimeError: Expected object of backend CUDA but got backend CPU for argument #3 'index'

I tried to use allennlp.predictors.Predictor.get_gradients to get the gradients of an instance. allennlp==0.8.5 The main code: for instance in targeted_dev_data: #model is locally trained on GPU #instance is from…
0
votes
1 answer

Does allennlp textual entailment model work when hypothesis and premise both involve multiple sentences?

On allennlp textual entailment demo website, the hypothesis and premise in examples always only consist of one sentence. Does allennlp textual entailment model work when hypothesis and premise both include multiple sentences? Is it theoretically…
0
votes
1 answer

How to train semantic role labeling with allennlp?

Where is the training config file? The link on this page is dead https://demo.allennlp.org/semantic-role-labeling Training The SRL model was evaluated on the CoNLL 2012 dataset. Unfortunately we cannot release this data due to licensing…
1t3a
  • 31
  • 3
0
votes
1 answer

How to improve Allen NLP question answering performance

I am trying out Allen NLP pre-trained models for Q&A. The online demo is here : https://demo.allennlp.org/reading-comprehension I have created a python script to try out various models. python script script output Here is the benchmark summary on…
Sujee Maniyam
  • 1,093
  • 1
  • 9
  • 15
0
votes
1 answer

Parsing nested dictionary (allen nlp hierplane_tree)

I am trying to parse the JSON object that gets returned by the allennlp predictor. I was able to find a helpful function to find all of the children values, but what I really want to do with the dependencies, is given an entity "man" can I get the…
scarpacci
  • 8,957
  • 16
  • 79
  • 144
0
votes
1 answer

Unable to use Allennlp biaffine parser model

I am trying to use allennlp predictor for biaffine parser. Here is the code:- from allennlp.predictors.predictor import Predictor predictor =…
Ankit Garg
  • 11
  • 1
0
votes
1 answer

Problem loading "decomposable-attention-elmo" with `Predictor.from_path`

I'm trying to load the decomposable attention model proposed in this paper The decomposable attention model (Parikh et al, 2017) combined with ELMo embeddings trained on SNLI., and used the code suggested as the demo website described: predictor =…
yunyy
  • 1
  • 1
0
votes
1 answer

what is the role of RNNLanguageModel's forward method?

i'm reading a tutorial about character based neural networks using AllenNlp framework, the goal is building a model which can complete a sentence. there is a step of instances building after that i want to train my model. i have the code below, i…
zizou123
  • 23
  • 4
0
votes
1 answer

How to disable model/weight serialization fully with AllenNLP settings?

I wish disable serializing all model/state weights in standard AllenNLP model training via the use of jsonnet config files. The reason for this is that I am running automatic hyperparameter optimization using Optuna. Testing dozens of models fills…
GJacobs
  • 109
  • 1
  • 10
0
votes
1 answer

pass loss function and metrics in config

In the official example, both metrics and loss function are hard coded. I am wondering if we can pass those in the config jsonnet, so I can reuse my model in different datasets with different metrics.
0
votes
1 answer

Calculate loss in train epoch function

in train_epoch function we have three kinds of losses loss batch_loss train_loss as I understand loss is a tensor, batch loss is the value of the tensor , train_loss is the accumulative value of the batch_loss this is ok for me. my question is why…
Arij Aladel
  • 356
  • 1
  • 3
  • 10
0
votes
1 answer

Is there a way to differentiate validation and evaluation in AllenNLP?

Sometimes we may want some minor different behaviors during validation (i.e, validation on dev set during training) and final evaluation. I am not sure whether there is a simple way to inform our model whether it's called by a train command or a…
Yu Gu
  • 2,382
  • 5
  • 18
  • 33
1 2 3
13
14