output_hidden_states
#132
by
wegwerf
- opened
Hi,
I have a simple question. How to get the hidden states of the output?
I want to do some clustering tasks and use the embeddings.
Hi, did you ever find a solution?
Edit:
Fixed!
They are in the output dict after specifying "output_hidden_states".
outputs = model.generate(
**inputs,
max_new_tokens=300,
output_hidden_states=True,
return_dict_in_generate=True,
num_beams=1)