Skip to content
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

Improve XR-Transformer memory efficiency #128

Merged

Conversation

jiong-zhang
Copy link
Contributor

@jiong-zhang jiong-zhang commented Mar 31, 2022

Issue #, if available:

Description of changes:

  • Add XMCTextDataset, a dataset for XMC problem that tokenizes input text at batch generation time. This avoids pre-tokenizing the whole training corpus which could lead to OOM when number of instances is big.
  • Deprecated --save-emb-dir argument in pecos.xmc.xtransformer.train. Embeddings should be obtained through pecos.xmc.xtransformer.encode.
  • Deprecated --steps-scale argument in pecos.xmc.xtransformer.train. Setting different training steps for each layer should be done through setting custom max_steps in the TransformerMatcher.TrainParams

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jiong-zhang jiong-zhang force-pushed the xr-transformer-realtime-tokenizer branch from 1ab9a78 to d6a9d4f Compare April 1, 2022 02:04
@jiong-zhang jiong-zhang force-pushed the xr-transformer-realtime-tokenizer branch from b2d9761 to f64878e Compare April 1, 2022 02:31
@jiong-zhang jiong-zhang changed the title Add XR-Transformer realtime tokenizer Improve XR-Transformer memory efficiency Apr 1, 2022
@jiong-zhang jiong-zhang merged commit 685a098 into amzn:mainline Apr 1, 2022
@jiong-zhang jiong-zhang deleted the xr-transformer-realtime-tokenizer branch April 14, 2022 18:02
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.

2 participants