Fix canonical model --model_type in examples (#30480)
Fix --model_type in examples
This commit is contained in:
@@ -17,7 +17,7 @@ limitations under the License.
|
||||
|
||||
We host a wide range of example scripts for multiple learning frameworks. Simply choose your favorite: [TensorFlow](https://github.com/huggingface/transformers/tree/main/examples/tensorflow), [PyTorch](https://github.com/huggingface/transformers/tree/main/examples/pytorch) or [JAX/Flax](https://github.com/huggingface/transformers/tree/main/examples/flax).
|
||||
|
||||
We also have some [research projects](https://github.com/huggingface/transformers/tree/main/examples/research_projects), as well as some [legacy examples](https://github.com/huggingface/transformers/tree/main/examples/legacy). Note that unlike the main examples these are not actively maintained, and may require specific older versions of dependencies in order to run.
|
||||
We also have some [research projects](https://github.com/huggingface/transformers/tree/main/examples/research_projects), as well as some [legacy examples](https://github.com/huggingface/transformers/tree/main/examples/legacy). Note that unlike the main examples these are not actively maintained, and may require specific older versions of dependencies in order to run.
|
||||
|
||||
While we strive to present as many use cases as possible, the example scripts are just that - examples. It is expected that they won't work out-of-the-box on your specific problem and that you will be required to change a few lines of code to adapt them to your needs. To help you with that, most of the examples fully expose the preprocessing of the data, allowing you to tweak and edit them as required.
|
||||
|
||||
@@ -97,16 +97,16 @@ and run the example command as usual afterward.
|
||||
|
||||
## Running the Examples on Remote Hardware with Auto-Setup
|
||||
|
||||
[run_on_remote.py](./run_on_remote.py) is a script that launches any example on remote self-hosted hardware,
|
||||
with automatic hardware and environment setup. It uses [Runhouse](https://github.com/run-house/runhouse) to launch
|
||||
on self-hosted hardware (e.g. in your own cloud account or on-premise cluster) but there are other options
|
||||
for running remotely as well. You can easily customize the example used, command line arguments, dependencies,
|
||||
[run_on_remote.py](./run_on_remote.py) is a script that launches any example on remote self-hosted hardware,
|
||||
with automatic hardware and environment setup. It uses [Runhouse](https://github.com/run-house/runhouse) to launch
|
||||
on self-hosted hardware (e.g. in your own cloud account or on-premise cluster) but there are other options
|
||||
for running remotely as well. You can easily customize the example used, command line arguments, dependencies,
|
||||
and type of compute hardware, and then run the script to automatically launch the example.
|
||||
|
||||
You can refer to
|
||||
You can refer to
|
||||
[hardware setup](https://runhouse-docs.readthedocs-hosted.com/en/latest/api/python/cluster.html#hardware-setup)
|
||||
for more information about hardware and dependency setup with Runhouse, or this
|
||||
[Colab tutorial](https://colab.research.google.com/drive/1sh_aNQzJX5BKAdNeXthTNGxKz7sM9VPc) for a more in-depth
|
||||
[Colab tutorial](https://colab.research.google.com/drive/1sh_aNQzJX5BKAdNeXthTNGxKz7sM9VPc) for a more in-depth
|
||||
walkthrough.
|
||||
|
||||
You can run the script with the following commands:
|
||||
@@ -118,7 +118,7 @@ pip install runhouse
|
||||
# For an on-demand V100 with whichever cloud provider you have configured:
|
||||
python run_on_remote.py \
|
||||
--example pytorch/text-generation/run_generation.py \
|
||||
--model_type=openai-community/gpt2 \
|
||||
--model_type=gpt2 \
|
||||
--model_name_or_path=openai-community/gpt2 \
|
||||
--prompt "I am a language model and"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user