Unverified Commit fe3df9d5 authored by Klaus Hipp's avatar Klaus Hipp Committed by GitHub
Browse files

[Docs] Add language identifiers to fenced code blocks (#28955)

Add language identifiers to code blocks
parent c617f988
......@@ -23,7 +23,7 @@ pip install pandas GitPython wget
```
Get required metadata
```
```bash
curl https://cdn-datasets.huggingface.co/language_codes/language-codes-3b2.csv > language-codes-3b2.csv
curl https://cdn-datasets.huggingface.co/language_codes/iso-639-3.csv > iso-639-3.csv
```
......
......@@ -18,13 +18,13 @@ limitations under the License.
This folder provide a template for adding a new example script implementing a training or inference task with the
models in the 🤗 Transformers library. To use it, you will need to install cookiecutter:
```
```bash
pip install cookiecutter
```
or refer to the installation page of the [cookiecutter documentation](https://cookiecutter.readthedocs.io/).
You can then run the following command inside the `examples` folder of the transformers repo:
```
```bash
cookiecutter ../templates/adding_a_new_example_script/
```
and answer the questions asked, which will generate a new folder where you will find a pre-filled template for your
......
......@@ -582,27 +582,27 @@ You should do the following:
1. Create a branch with a descriptive name from your main branch
```
```bash
git checkout -b add_[lowercase name of model]
```
2. Commit the automatically generated code:
```
```bash
git add .
git commit
```
3. Fetch and rebase to current main
```
```bash
git fetch upstream
git rebase upstream/main
```
4. Push the changes to your account using:
```
```bash
git push -u origin a-descriptive-name-for-my-changes
```
......
......@@ -103,7 +103,7 @@ tests/test_modeling_tf_<model_name>.py
You can run the tests to ensure that they all pass:
```
```bash
python -m pytest ./tests/test_*<model_name>*.py
```
......@@ -236,7 +236,7 @@ depending on your choices).
You will also see a doc file and tests for your new models. First you should run
```
```bash
make style
make fix-copies
```
......@@ -247,7 +247,7 @@ and then you can start tweaking your model. You should:
Once you're done, you can run the tests to ensure that they all pass:
```
```bash
python -m pytest ./tests/test_*<model_name>*.py
```
......
......@@ -593,27 +593,27 @@ You should do the following:
1. Create a branch with a descriptive name from your main branch
```
```bash
git checkout -b add_big_bird
```
2. Commit the automatically generated code:
```
```bash
git add .
git commit
```
3. Fetch and rebase to current main
```
```bash
git fetch upstream
git rebase upstream/main
```
4. Push the changes to your account using:
```
```bash
git push -u origin a-descriptive-name-for-my-changes
```
......
......@@ -22,7 +22,7 @@ pip install accelerate>=0.12.0
pip install transformers>=4.23.0
```
if `transformers>=4.23.0` is not released yet, then use:
```
```bash
pip install git+https://github.com/huggingface/transformers.git
```
......@@ -72,15 +72,15 @@ Run your script by pre-pending `CUDA_LAUNCH_BLOCKING=1` and you should observe a
### `CUDA illegal memory error: an illegal memory access at line...`:
Check the CUDA verisons with:
```
```bash
nvcc --version
```
and confirm it is the same version as the one detected by `bitsandbytes`. If not, run:
```
```bash
ls -l $CONDA_PREFIX/lib/libcudart.so
```
or
```
```bash
ls -l $LD_LIBRARY_PATH
```
Check if `libcudart.so` has a correct symlink that is set. Sometimes `nvcc` detects the correct CUDA version but `bitsandbytes` doesn't. You have to make sure that the symlink that is set for the file `libcudart.so` is redirected to the correct CUDA file.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment