-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lasertagger Colab Notebook request #1
Comments
Start on a colab notebook |
Looks like one needs to store the data on Google Cloud bucket in order to be able to use Google's TPU. E.g., for the BERT data:*
And for the output data:
(*) Assuming the data was previously stored locally, e.g.,
|
The notebook has been updated to support TPU, via writing all data to a cloud bucket. Note: the prediction step - predict_main.py doesn't have flags for using a TPU. It's currently running very slowly, roughly 1 example per second. Is this expected? I1107 15:31:14.475278 139814862706560 predict_main.py:89] 0 examples processed, 0 converted to tf.Example. |
Hi and sorry for the slow reply! Having a Colab would indeed be very useful but atm I don't have time to do that. However, if you'd like to create a pull request, I'd be very happy to review it. Regarding slow inference: This is indeed an issue and the expected behavior when you run the code as such. Internally, we heavily parallelize inference so it's not an issue in that case. To make it faster, one should ideally increase the batch size (currently it's 1 [*]) which requires small code changes. A quicker fix is to use LaserTaggerFF by setting use_t2t_decoder to false in configs/lasertagger_config.json. This should already make prediction about 40 times faster (at least on GPU). This may hurt the accuracy slightly but not radically at least in our experiments. [*] https://github.com/google-research/lasertagger/blob/master/predict_utils.py#L57 |
The goal is to run lasertagger in a Google Colab notebook, similar to the BERT finetuning notebooks.
A few issues involved:
The text was updated successfully, but these errors were encountered: