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

One-hot encoded input? #7

Closed
matthew-jurewicz opened this issue Jul 14, 2020 · 4 comments
Closed

One-hot encoded input? #7

matthew-jurewicz opened this issue Jul 14, 2020 · 4 comments

Comments

@matthew-jurewicz
Copy link

I'm looking through the code, and I'm not seeing the token IDs being converted to one-hot encoded vectors. Is the input to the language model with autoregressive wrapper the token IDs?

@lucidrains
Copy link
Owner

@matthew-jurewicz Hi Matthew! Yup, you just to pass the token ids and make sure you instantiate the language model with the num_tokens set to the maximum of the ids! The token embedding are fetched from the embedding table here https://github.com/lucidrains/routing-transformer/blob/master/routing_transformer/routing_transformer.py#L523

@matthew-jurewicz
Copy link
Author

Excellent! I'm a big fan of your work!

@lucidrains
Copy link
Owner

This was an implementation of someone else's research https://openreview.net/forum?id=B1gjs6EtDr Hope you find it useful!

@matthew-jurewicz
Copy link
Author

What I mean is, as far as I know, no one's written the code for a fully-functional sparse transformer, much less this.

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

No branches or pull requests

2 participants