Overview
biLM-TF is a TensorFlow implementation of the bi-directional language model used to compute ELMo (Embeddings from Language Models) representations. It allows for both training biLMs from scratch and using pre-trained models for prediction. The architecture utilizes a character-based approach, processing raw text input to generate contextualized word embeddings. It supports various methods for integrating ELMo representations into downstream tasks, including on-the-fly computation from raw text, pre-computing and caching token representations, and pre-computing representations for the entire dataset. The tool includes functionalities for handling vocabulary, batching, and writing intermediate layers to files, optimizing performance for different use cases and dataset sizes. It uses a Bidirectional Language Model to produce intermediate layers for final ELMo representation computation.