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

Question About Hidden Space Tokenization Decoding #4

Open
Lingy12 opened this issue Dec 19, 2024 · 1 comment
Open

Question About Hidden Space Tokenization Decoding #4

Lingy12 opened this issue Dec 19, 2024 · 1 comment

Comments

@Lingy12
Copy link

Lingy12 commented Dec 19, 2024

hidden_states, outputs = model.generate(**{'input_ids':inputs.input_ids, 'max_new_tokens':64})

I am trying to reproduce the token analysis of layers' hidden embedding. I have done the following:

  1. Install according to requirements.txt
  2. Replace the generation and models folder of transformers with the one in the repository

However, the output of the line is just the decoded token ids, no hidden_states (as normal generate).

May I ask is there any thing I am missing? Thank you very much.

@daoyangl
Copy link

Hello, did you solve this problem? I also have the same question about test_layer.py code.

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