transformers/templates/adding_a_new_example_script
Victor SANH 6b1ff25084
fix n_gpu count when no_cuda flag is activated (#3077)
* fix n_gpu count when no_cuda flag is activated

* someone was left behind
2020-03-02 10:20:21 -05:00
..
README.md GPU text generation: mMoved the encoded_prompt to correct device 2020-01-06 15:11:12 +01:00
run_xxx.py fix n_gpu count when no_cuda flag is activated (#3077) 2020-03-02 10:20:21 -05:00
utils_xxx.py Apply quality and style requirements once again 2020-01-29 12:06:13 -05:00

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.