Yes, it is possible and actually it is crucial to make max. usage of your VRAM and to speed up embeddings. All you need to do is use elmo.predict_on_batches( List[ List[str] ]). It takes a list of lists as input, with the inner list being a list of words/amino acids.
You can check the official implementation here: https://github.com/allenai/allennlp/blob/master/allennlp/commands/elmo.py
Yes, it is possible and actually it is crucial to make max. usage of your VRAM and to speed up embeddings. All you need to do is use elmo.predict_on_batches( List[ List[str] ]). It takes a list of lists as input, with the inner list being a list of words/amino acids. You can check the official implementation here: https://github.com/allenai/allennlp/blob/master/allennlp/commands/elmo.py