Source code of transformers models

I’d like to know if the code for PyTorch is available for all models in the huggingface transformers library.

For instance, models show a pytorch_model.bin in their tree (e.g. openai-community/gpt2-xl at main). Is there a way to access the source code of this binary?

The source code for all the models is here. For example, you can find GPT2 source code there.

.bin files themselves don’t have “source code” per se because that file is just a dump of the model’s weights (it’s just a bunch of numbers for the model parameters and a data structure for organizing them).

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.