transformers/templates/adding_a_new_example_script
Sam Shleifer 45e26125de
save_pretrained: mkdir(exist_ok=True) (#5258)
* all save_pretrained methods mkdir if not os.path.exists
2020-06-28 14:53:47 -04:00
..
README.md GPU text generation: mMoved the encoded_prompt to correct device 2020-01-06 15:11:12 +01:00
run_xxx.py save_pretrained: mkdir(exist_ok=True) (#5258) 2020-06-28 14:53:47 -04:00
utils_xxx.py Apply quality and style requirements once again 2020-01-29 12:06:13 -05:00

README.md

How to add a new example script in 🤗Transformers

This folder provide a template for adding a new example script implementing a training or inference task with the models in the 🤗Transformers library.

Currently only examples for PyTorch are provided which are adaptations of the library's SQuAD examples which implement single-GPU and distributed training with gradient accumulation and mixed-precision (using NVIDIA's apex library) to cover a reasonable range of use cases.