CQCL / lambeq

A high-level Python library for Quantum Natural Language Processing
https://cqcl.github.io/lambeq-docs
Apache License 2.0
451 stars 108 forks source link

Feature Request : GPU-based dedicated environment to run the Lambeq models #22

Closed ACE07-Sev closed 2 years ago

ACE07-Sev commented 2 years ago

Motivation: Given none of the currently existing platforms support the Lambeq packages, it would nice if there was a dedicated environment with GPU-enabled compiler to allow the user(s) to train models using TKET and have WSL interpreter for running WebParser. This environment would have the imports pre-installed by default and allow for .txt or .csv file imports for the dataset.

Downloadable Checkpoints: This manner user(s) can train the models based on preference with high speed, and eliminate any variability given different IDEs and/or interpreters which may potentially disrupt the model. This would allow users to outsource the training process to a GPU-based environment and simply download the model.lt checkpoint to use locally. Given the necessity of a WSL interpreter for running WebParser, the user could also download .pkl format of Webparsed diagrams to be used on locally as an additional feature as well.

Error Suggestion : There could also be a suggestion system based on errors, like TypeError : Ty('p') which essentially indicates the need for an AtomicType.PREPOSITIONAL_PHRASE, or the trainer operand issue which indicates an issue with some diagrams having different number of output wires and provide suggestions for changing the dataset accordingly.

Proposed Feature Summary: Given how each online environment requires users to pip install the libraries and currently this is the issue with platforms such as Colab and Deepnote, the environment would have the Lambeq and DiscoPY packages pre-installed, and run on Linux OS with WSL being the default interpreter. Since TKET is currently very slow for intermediate scale models, GPU feature would be incredibly useful. And lastly having a function to generate downloadable files for the model.lt and Webparser diagrams.