The Wayback Machine - https://web.archive.org/web/20210814004619/https://github.com/topics/pytorch-transformers
Skip to content
#

pytorch-transformers

Here are 20 public repositories matching this topic...

transformers
willfrey
willfrey commented Jul 19, 2021

https://github.com/huggingface/transformers/blob/546dc24e0883e5e9f5eb06ec8060e3e6ccc5f6d7/src/transformers/models/gpt2/modeling_gpt2.py#L698

Assertions can't be relied upon for control flow because they can be disabled, as per the following:

$ python --help
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
...
-O     : remove assert and __debug__-dependent statem
pytorch-original-transformer

My implementation of the original transformer model (Vaswani et al.). I've additionally included the playground.py file for visualizing otherwise seemingly hard concepts. Currently included IWSLT pretrained models.
  • Updated Dec 27, 2020
  • Jupyter Notebook
raghavmecheri
raghavmecheri commented Sep 14, 2020

Feature Request

Description of Problem:

We've taken a fairly risky/bad approach by just resorting to setting function params to arbitrary defaults when they aren't passed in. While this works sometimes, I think we've overused this approach and should really trim parts of it down.

Potential Solutions:

Eliminate optional parameters in any non-public function, and actually throw ex

Improve this page

Add a description, image, and links to the pytorch-transformers topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the pytorch-transformers topic, visit your repo's landing page and select "manage topics."

Learn more