question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can´t use ELMO in DeepLearning Train

See original GitHub issue
  • What is your OS and architecture? Ubuntu 22.04

  • What is your Java version (java --version)? openjdk version “1.8.0_342”

Hi @kermitt2, I have success to Train a citation model using DELFT but when I try to use ELMO y get this error message…

Loading data... Error: either provide a path to a directory with the ELMo model individual options and weight file or to the model in a ZIP archive. 10000 total sequences 9000 train sequences 1000 validation sequences ELMo weights used: /media/lopez/T51/embeddings/elmo_2x4096_512_2048cnn_2xhighway_5.5B/elmo_2x4096_512_2048cnn_2xhighway_5.5B_weights.hdf5

Where can I found this file and how can I change the path ?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kermitt2commented, Sep 23, 2022

Hi @rodyoukai

Yes you need to download manually the config and weights file for ELMo. Contrary to transformers and static embeddings, the automatic download is not written yet ! (my fault, I forgot to add it 😃

The two url are still working, so you just need to download and move these files in the path you indicated.

ELMo is working very well for sequence labeling ! (and almost as fast as transformers in the last version of DeLFT)

1reaction
lfoppianocommented, Sep 21, 2022

Dear @rodyoukai, You have to configure the ELMO embeddings under delft/delft/resource-registry.json, See the file: https://github.com/kermitt2/delft/blob/master/delft/resources-registry.json

change the path near this section:

"embeddings-contextualized": [
        {
            "name": "elmo-en",
            "path-config": "/media/lopez/T51/embeddings/elmo_2x4096_512_2048cnn_2xhighway_5.5B/elmo_2x4096_512_2048cnn_2xhighway_5.5B_options.json",
            "path_weights": "/media/lopez/T51/embeddings/elmo_2x4096_512_2048cnn_2xhighway_5.5B/elmo_2x4096_512_2048cnn_2xhighway_5.5B_weights.hdf5",
            "path-vocab": "data/models/ELMo/en/vocab.txt",
            "path-cache": "data/models/ELMo/en/",
            "cache-training": true,
            "lang": "en",
            "url_config": "https://s3-us-west-2.amazonaws.com/allennlp/models/elmo/2x4096_512_2048cnn_2xhighway_5.5B/elmo_2x4096_512_2048cnn_2xhighway_5.5B_options.json",
            "url_weights": "https://s3-us-west-2.amazonaws.com/allennlp/models/elmo/2x4096_512_2048cnn_2xhighway_5.5B/elmo_2x4096_512_2048cnn_2xhighway_5.5B_weights.hdf5"
        },

Are you using docker?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Transfer Learning using ELMO Embeddings
Basically, Transfer Learning is the process of training a model on a large-scale dataset and then using that pre-trained model to process ...
Read more >
What is ELMo | ELMo For text Classification in Python
ELMo is one of the best state-of-the-art frameworks to extract features from text. Learn what is ELMo and how to use ELMo for...
Read more >
Named Entity Recognition using Deep Learning(ELMo ...
Named-entity recognition (NER) (also known as entity identification, entity chunking and entity extraction) is a subtask of information ...
Read more >
How to Use ELMo Word Vectors for Spam Classification
This is a tutorial on how to use TensorFlow Hub to get the ELMo word vectors module into Keras. This an example of...
Read more >
NLP-ELMo for Extracting Features from Text - YouTube
ELMo was developed by Allen NLP and stands for embedding from language . ... Stanford CS224N: Natural Language Processing with Deep Learning ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found