Skip to content

Conversation

mattdangerw
Copy link
Member

The code developed here all lives on in the new sampler API!

The code developed here all lives on in the new sampler API!
@mattdangerw
Copy link
Member Author

/gcbrun

Copy link
Contributor

@chenmoneygithub chenmoneygithub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

import time

import tensorflow as tf
from tensorflow import keras
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to update this README with new metrics: https://github.com/keras-team/keras-nlp/blob/master/benchmarks/README.md

@jbischof
Copy link
Contributor

jbischof commented Apr 3, 2023

Love the work thank you!

```

On running this script on Google Colab (with Tesla T4 GPU, and TensorFlow 2.10.0),
On running this script on Google Colab (with 3090 GPU, and TensorFlow 2.11.0),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should probably upgrade my PC 🛩️

@abheesht17
Copy link
Collaborator

Minor comment, but this change will break this example (after release): https://keras.io/examples/nlp/neural_machine_translation_with_keras_nlp/. Considering this example is kinda popular, we should open a "contributions welcome" issue for this.

Comment on lines +19 to +22
| Greedy Search | 470.23 | 61.79 |
| Beam Search | 530.13 | 189.61 |
| Top-k Search | 374.05 | 62.87 |
| Top-p Search | 401.97 | 260.31 |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, crazy speedup!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit apples to oranges. Switched hardware. We should consider updating this to a "cached" version. That will be a huge speedup.

@mattdangerw
Copy link
Member Author

Minor comment, but this change will break this example (after release): https://keras.io/examples/nlp/neural_machine_translation_with_keras_nlp/. Considering this example is kinda popular, we should open a "contributions welcome" issue for this.

Yeah absolutely. Was going to file a contributor issue to do this as #896 lands. Doesn't make too much sense to do while we are still tweaking the sampler interface.

@mattdangerw
Copy link
Member Author

/gcbrun

1 similar comment
@mattdangerw
Copy link
Member Author

/gcbrun

@mattdangerw mattdangerw merged commit 41af012 into keras-team:master Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants