huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
135.45k stars 27.11k forks source link

matrix multiplication #34686

Open LidaMsv opened 2 weeks ago

LidaMsv commented 2 weeks ago

Hello everyone.

Can someone please tell me where and in which files of the generation folder the matrix multiplication is happening? I'm having a hard time finding that. I need specific and detailed answers. Thank you all in advance

LysandreJik commented 1 week ago

The matrix multiplication? What matrix multiplication? There are many, many, many matrix multiplication happening.

LysandreJik commented 1 week ago

I need specific and detailed answers

We are first going to need specific and details questions if we are to help you

LidaMsv commented 1 week ago

Sure. I apologize for not being more specific. My code uses the Generate's _beam_search function and it's confusing for me to find the matrix multiplication of the eos_tokens of my input data. I mean the calculated score for the eos data. Is it in the beam_search.py file? If yes, which part of it exactly?

I also want to know the format of the matrix multiplication cause I don't think it's using matmul from torch library. If you could just give me some insights about where and how are one of these matrix multiplications?

Thank you very much for your time.