What tool do you use to get the token prediction of each layer of large language models for Figure 2?
frankdarkluo opened this issue · comments
frankdarkluo commented
Yung-Sung Chuang commented
I simply use matplotlib to make a table for figure 2!
frankdarkluo commented
Thanks for the reply! But I am not asking about the drawing. I am curious how do you get the probability distribution from the middle (not output) layers? Thanks.
Yung-Sung Chuang commented
Just insert some code to the transformers package (modeling_llama.py
and generation/utils.py
) and get the predictions along the decoding steps. It makes the code ugly but it works. I didn't use any tools for that.