Questions tagged [simpletransformers]

72 questions
12
votes
5 answers

why is my fastapi or uvicorn getting shutdown?

I am trying to run a service that uses simple transformers Roberta model to do classification. the inferencing script/function itself is working as expected when tested. when i include that with fast api its shutting down the…
8
votes
1 answer

Error while loading fine-tuned simpletransformer model in Docker Container

I am saving and loading a model using torch.save() and torch.load() commands. While loading a fine-tuned simple transformer model in Docker Container, I am facing this error which I am not able to resolve: Traceback (most recent call last): File…
SK Singh
  • 153
  • 1
  • 1
  • 14
4
votes
1 answer

cannot import name 'T5Tokenizer' from 'transformers.models.t5'

As you see in the following python console, I can import T5Tokenizer from transformers. However, for simpletransformers.t5 I get an error: >>> from transformers import T5Model, T5Tokenizer >>> from simpletransformers.t5 import T5Model, T5Args …
Ahmad
  • 8,811
  • 11
  • 76
  • 141
4
votes
0 answers

wandb - RuntimeError: CUDA out of memory

I'm trying to run the model given in the hyperparameter optimization example from the simple transformers documentation, but while searching for hyperparameters after a certain number of iterations, a CUDA out of memory error occurs. Also during the…
4
votes
2 answers

How do you load a simpletransformers model from a checkpoint?

I'm using simpletransformers (https://github.com/ThilinaRajapakse/simpletransformers) for a work project. After training a model, I get a bunch of files dumped to the output folder. I was wondering, if you wanted to load in a previously trained…
Hart
  • 63
  • 1
  • 5
3
votes
1 answer

How to get probability of an answer using BERT model and is there a way to ask multiple questions for a context

I am new to AI models and currently experimenting with the QandA model. Particularly I am interested in following 2 models. 1. from transformers import BertForQuestionAnswering 2. from simpletransformers.question_answering import…
3
votes
2 answers

unable to mmap 1024 bytes - Cannot allocate memory - even though there is more than enough ram

I'm currently working on a seminar paper on nlp, summarization of sourcecode function documentation. I've therefore created my own dataset with ca. 64000 samples (37453 is the size of the training dataset) and I want to fine tune the BART model. I…
ThyR4n
  • 75
  • 1
  • 7
3
votes
1 answer

How to get top generated text of T5 transformers?

I trained a T5 transformer using simpletransformers library. Here is a code to get the predictions: pred_values = model.predict(input_values) However, it just returns the top or greedy prediction, how can I get 10 top results?
Ahmad
  • 8,811
  • 11
  • 76
  • 141
2
votes
1 answer

use_cuda is set True even though it was specified as False T5

I am trying to train a T5 model using simpletransformers. Here is my code: from simpletransformers.t5 import T5Model model_args = { "max_seq_length": MAX_LEN, "train_batch_size": 8, "eval_batch_size": 8, "num_train_epochs": 1, …
Wanderer
  • 1,065
  • 5
  • 18
  • 40
2
votes
0 answers

How can I use NER Model from Simple Transformers with phrases instead of words, and startchar_endchar (mapping to text) instead of sentence_id?

My data is in BRAT annotation format and I would like to use NER_Model from SimpleTransformers to test performance on this data with a variety of models. Is it possible to reshape my data in a way that can utilize NER_Model? Any suggestions or logic…
2
votes
1 answer

Simple Transformers producing nothing?

I have a simple transformers script looking like this. from simpletransformers.seq2seq import Seq2SeqModel, Seq2SeqArgs args = Seq2SeqArgs() args.num_train_epoch=5 model = Seq2SeqModel( "roberta", "roberta-base", …
DevDog
  • 111
  • 2
  • 9
2
votes
1 answer

reporting other metrics during training evaluation simpletransformers

I am training a text classification model over a large set of data and I am using bert classifier (bert-base-uncased) of simpletransformer library. Simpletransformer retports by default mcc and eval_loss for evaluation during training and the…
2
votes
0 answers

Adding 'decoder_start_token_id' with SimpleTransformers

Training MBART in Seq2Seq with SimpleTransformers but getting an error I am not seeing with BART: TypeError: shift_tokens_right() missing 1 required positional argument: 'decoder_start_token_id' So far I've tried various combinations…
2
votes
1 answer

Default SimpleTransformers setup fails with ValueError str

I'm trying to use SimpleTransformers default setup to do multi-task learning. I am using the example from their website here The code looks like below: import logging import pandas as pd from simpletransformers.t5 import T5Model,…
brettfazio
  • 1,136
  • 10
  • 25
2
votes
2 answers

'google.protobuf.descriptor' has no attribute '_internal_create_key'

I get the following error when trying to import simpletransformers: Traceback (most recent call last): File "...py", line 106, in from simpletransformers.classification import ClassificationModel, ClassificationArgs File…
Mutlu Simsek
  • 1,088
  • 14
  • 22
1
2 3 4 5