Skip to content

Commit

Permalink
[Docs] Rename HUGGING_FACE_HUB_TOKEN to HF_TOKEN (#1871)
Browse files Browse the repository at this point in the history
[Docs] Rename HUGGING_FACE_HUB_TOKEN to HF_TOKEN #1871
  • Loading branch information
peterschmidt85 authored Oct 22, 2024
1 parent 185e0df commit 4e61acb
Show file tree
Hide file tree
Showing 54 changed files with 85 additions and 87 deletions.
4 changes: 2 additions & 2 deletions docs/blog/posts/amd-on-runpod.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ you can now specify an AMD GPU under `resources`. Below are a few examples.

image: ghcr.io/huggingface/text-generation-inference:sha-a379d55-rocm
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- MODEL_ID=meta-llama/Meta-Llama-3.1-70B-Instruct
- TRUST_REMOTE_CODE=true
- ROCM_USE_FLASH_ATTN_V2_TRITON=true
Expand Down Expand Up @@ -83,7 +83,7 @@ you can now specify an AMD GPU under `resources`. Below are a few examples.

image: ghcr.io/huggingface/text-generation-inference:sha-a379d55-rocm
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- ROCM_USE_FLASH_ATTN_V2_TRITON=true
ide: vscode

Expand Down
6 changes: 3 additions & 3 deletions docs/blog/posts/tpu-on-gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ and [vLLM :material-arrow-top-right-thin:{ .external }](https://github.com/vllm-

image: dstackai/optimum-tpu:llama31
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- MODEL_ID=meta-llama/Meta-Llama-3.1-8B-Instruct
- MAX_TOTAL_TOKENS=4096
- MAX_BATCH_PREFILL_TOKENS=4095
Expand Down Expand Up @@ -89,7 +89,7 @@ and [vLLM :material-arrow-top-right-thin:{ .external }](https://github.com/vllm-

env:
- MODEL_ID=meta-llama/Meta-Llama-3.1-8B-Instruct
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- DATE=20240828
- TORCH_VERSION=2.5.0
- VLLM_TARGET_DEVICE=tpu
Expand Down Expand Up @@ -167,7 +167,7 @@ name: optimum-tpu-llama-train
python: "3.11"

env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
commands:
- git clone -b add_llama_31_support https://github.com/dstackai/optimum-tpu.git
- mkdir -p optimum-tpu/examples/custom/
Expand Down
4 changes: 2 additions & 2 deletions docs/blog/posts/volumes-on-runpod.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ scaling:

image: ghcr.io/huggingface/text-generation-inference:latest
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- MODEL_ID=meta-llama/Meta-Llama-3.1-8B-Instruct
- MAX_INPUT_LENGTH=4000
- MAX_TOTAL_TOKENS=4096
Expand Down Expand Up @@ -110,7 +110,7 @@ volumes:
image: ghcr.io/huggingface/text-generation-inference:latest
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- MODEL_ID=meta-llama/Meta-Llama-3.1-8B-Instruct
- MAX_INPUT_LENGTH=4000
- MAX_TOTAL_TOKENS=4096
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/guides/protips.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ name: vscode
python: "3.10"

env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
ide: vscode
```
Expand All @@ -190,20 +190,20 @@ ide: vscode
Then, you can pass the environment variable either via the shell:
```shell
HUGGING_FACE_HUB_TOKEN=... dstack apply -f .dstack.yml
HF_TOKEN=... dstack apply -f .dstack.yml
```

Or via the `-e` option of the `dstack apply` command:

```shell
dstack apply -f .dstack.yml -e HUGGING_FACE_HUB_TOKEN=...
dstack apply -f .dstack.yml -e HF_TOKEN=...
```

??? info ".env"
A better way to configure environment variables not hardcoded in YAML is by specifying them in a `.env` file:

```
HUGGING_FACE_HUB_TOKEN=...
HF_TOKEN=...
```

If you install [`direnv` :material-arrow-top-right-thin:{ .external }](https://direnv.net/){:target="_blank"},
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/reference/dstack.yml/dev-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,15 @@ name: vscode
# Environment variables
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- HF_HUB_ENABLE_HF_TRANSFER=1
ide: vscode
```

</div>

> If you don't assign a value to an environment variable (see `HUGGING_FACE_HUB_TOKEN` above),
> If you don't assign a value to an environment variable (see `HF_TOKEN` above),
`dstack` will require the value to be passed via the CLI or set in the current process.

For instance, you can define environment variables in a `.envrc` file and utilize tools like `direnv`.
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/reference/dstack.yml/service.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ python: "3.10"
# Environment variables
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- MODEL=NousResearch/Llama-2-7b-chat-hf
# Commands of the service
commands:
Expand All @@ -328,7 +328,7 @@ resources:

</div>

If you don't assign a value to an environment variable (see `HUGGING_FACE_HUB_TOKEN` above),
If you don't assign a value to an environment variable (see `HF_TOKEN` above),
`dstack` will require the value to be passed via the CLI or set in the current process.

For instance, you can define environment variables in a `.envrc` file and utilize tools like `direnv`.
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/reference/dstack.yml/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ python: "3.10"
# Environment variables
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- HF_HUB_ENABLE_HF_TRANSFER=1
# Commands of the task
Expand All @@ -212,7 +212,7 @@ commands:

</div>

> If you don't assign a value to an environment variable (see `HUGGING_FACE_HUB_TOKEN` above),
> If you don't assign a value to an environment variable (see `HF_TOKEN` above),
`dstack` will require the value to be passed via the CLI or set in the current process.

For instance, you can define environment variables in a `.envrc` file and utilize tools like `direnv`.
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ python: "3.10"

# Required environment variables
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
commands:
- pip install vllm
- vllm serve meta-llama/Meta-Llama-3.1-8B-Instruct --max-model-len 4096
Expand Down Expand Up @@ -72,7 +72,7 @@ To run a configuration, use the [`dstack apply`](reference/cli/index.md#dstack-a
<div class="termy">

```shell
$ HUGGING_FACE_HUB_TOKEN=...
$ HF_TOKEN=...
$ dstack apply -f service.dstack.yml
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ image: winglian/axolotl-cloud:main-20240429-py3.11-cu121-2.2.1

# Required environment variables
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- WANDB_API_KEY
# Commands of the task
commands:
Expand Down Expand Up @@ -60,7 +60,7 @@ To run a configuration, use the [`dstack apply`](reference/cli/index.md#dstack-a
<div class="termy">

```shell
$ HUGGING_FACE_HUB_TOKEN=...
$ HF_TOKEN=...
$ WANDB_API_KEY=...
$ dstack apply -f examples/.dstack.yml
Expand Down
6 changes: 2 additions & 4 deletions examples/.dstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ ide: vscode
# Use either spot or on-demand instances
spot_policy: auto

# Required resources
resources:
memory: 16MB..
shm_size: 8MB
# gpu: A10
# disk: 100GB..
gpu: 24GB
10 changes: 5 additions & 5 deletions examples/accelerators/amd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Llama 3.1 70B in FP16 using [TGI :material-arrow-top-right-thin:{ .external }](h

# Required environment variables
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- MODEL_ID=meta-llama/Meta-Llama-3.1-70B-Instruct
- TRUST_REMOTE_CODE=true
- ROCM_USE_FLASH_ATTN_V2_TRITON=true
Expand Down Expand Up @@ -61,7 +61,7 @@ Llama 3.1 70B in FP16 using [TGI :material-arrow-top-right-thin:{ .external }](h

# Required environment variables
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- MODEL_ID=meta-llama/Meta-Llama-3.1-70B-Instruct
- MAX_MODEL_LEN=126192
# Commands of the task
Expand Down Expand Up @@ -135,7 +135,7 @@ To request multiple GPUs, specify the quantity after the GPU name, separated by

# Required environment variables
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
# Commands of the task
commands:
- export PATH=/opt/conda/envs/py_3.10/bin:$PATH
Expand Down Expand Up @@ -177,7 +177,7 @@ To request multiple GPUs, specify the quantity after the GPU name, separated by
image: runpod/pytorch:2.1.2-py3.10-rocm6.0.2-ubuntu22.04
# Required environment variables
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
# Commands of the task
commands:
- export PATH=/opt/conda/envs/py_3.10/bin:$PATH
Expand Down Expand Up @@ -224,7 +224,7 @@ cloud resources and run the configuration.
<div class="termy">

```shell
$ HUGGING_FACE_HUB_TOKEN=...
$ HF_TOKEN=...
$ dstack apply -f examples/deployment/vllm/amd/service.dstack.yml
```

Expand Down
6 changes: 3 additions & 3 deletions examples/accelerators/tpu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ and [vLLM :material-arrow-top-right-thin:{ .external }](https://github.com/vllm-

image: dstackai/optimum-tpu:llama31
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- MODEL_ID=meta-llama/Meta-Llama-3.1-8B-Instruct
- MAX_TOTAL_TOKENS=4096
- MAX_BATCH_PREFILL_TOKENS=4095
Expand Down Expand Up @@ -61,7 +61,7 @@ and [vLLM :material-arrow-top-right-thin:{ .external }](https://github.com/vllm-

env:
- MODEL_ID=meta-llama/Meta-Llama-3.1-8B-Instruct
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- DATE=20240828
- TORCH_VERSION=2.5.0
- VLLM_TARGET_DEVICE=tpu
Expand Down Expand Up @@ -135,7 +135,7 @@ name: optimum-tpu-llama-train
python: "3.11"

env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
commands:
- git clone -b add_llama_31_support https://github.com/dstackai/optimum-tpu.git
- mkdir -p optimum-tpu/examples/custom/
Expand Down
2 changes: 1 addition & 1 deletion examples/deployment/lorax/serve-task.dstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: task
image: ghcr.io/predibase/lorax:latest

env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- MODEL_ID=mistralai/Mistral-7B-Instruct-v0.1

commands:
Expand Down
2 changes: 1 addition & 1 deletion examples/deployment/lorax/serve.dstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: service
image: ghcr.io/predibase/lorax:latest

env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- MODEL_ID=mistralai/Mistral-7B-Instruct-v0.1

commands:
Expand Down
2 changes: 1 addition & 1 deletion examples/deployment/optimum-tpu/.dstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: vscode-optimum-tpu
image: dstackai/optimum-tpu:llama31
# Required environment variables
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
ide: vscode

resources:
Expand Down
2 changes: 1 addition & 1 deletion examples/deployment/optimum-tpu/service.dstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: llama31-service-optimum-tpu
image: dstackai/optimum-tpu:llama31
# Required environment variables
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- MODEL_ID=meta-llama/Meta-Llama-3.1-8B-Instruct
- MAX_TOTAL_TOKENS=4096
- MAX_BATCH_PREFILL_TOKENS=4095
Expand Down
2 changes: 1 addition & 1 deletion examples/deployment/optimum-tpu/task.dstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: llama31-task-optimum-tpu
image: dstackai/optimum-tpu:llama31
# Required environment variables
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- MODEL_ID=meta-llama/Meta-Llama-3.1-8B-Instruct
- MAX_TOTAL_TOKENS=4096
- MAX_BATCH_PREFILL_TOKENS=4095
Expand Down
2 changes: 1 addition & 1 deletion examples/deployment/tgi/amd/.dstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: dev-tgi-amd
image: ghcr.io/huggingface/text-generation-inference:sha-a379d55-rocm

env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- ROCM_USE_FLASH_ATTN_V2_TRITON=true
ide: vscode

Expand Down
2 changes: 1 addition & 1 deletion examples/deployment/tgi/amd/service.dstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: service-tgi-amd

image: ghcr.io/huggingface/text-generation-inference:sha-a379d55-rocm
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- ROCM_USE_FLASH_ATTN_V2_TRITON=true
- TRUST_REMOTE_CODE=true
- MODEL_ID=meta-llama/Meta-Llama-3.1-70B-Instruct
Expand Down
2 changes: 1 addition & 1 deletion examples/deployment/tgi/serve-task.dstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: task

image: ghcr.io/huggingface/text-generation-inference:latest
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- MODEL_ID=mistralai/Mistral-7B-Instruct-v0.2
commands:
- text-generation-launcher --port 8000 --trust-remote-code
Expand Down
2 changes: 1 addition & 1 deletion examples/deployment/tgi/serve.dstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: service

image: ghcr.io/huggingface/text-generation-inference:latest
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- MODEL_ID=mistralai/Mistral-7B-Instruct-v0.2
commands:
- text-generation-launcher --port 8000 --trust-remote-code
Expand Down
2 changes: 1 addition & 1 deletion examples/deployment/vllm/amd/.dstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: dev-vLLM-amd
image: runpod/pytorch:2.4.0-py3.10-rocm6.1.0-ubuntu22.04

env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN

ide: vscode

Expand Down
2 changes: 1 addition & 1 deletion examples/deployment/vllm/amd/build.vllm-rocm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: build-vllm-rocm
image: runpod/pytorch:2.4.0-py3.10-rocm6.1.0-ubuntu22.04

env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_REGION
Expand Down
2 changes: 1 addition & 1 deletion examples/deployment/vllm/amd/service.dstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: llama31-service-vllm-amd
image: runpod/pytorch:2.4.0-py3.10-rocm6.1.0-ubuntu22.04

env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- MODEL_ID=meta-llama/Meta-Llama-3.1-70B-Instruct
- MAX_MODEL_LEN=126192

Expand Down
2 changes: 1 addition & 1 deletion examples/deployment/vllm/service-tpu.dstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: service
name: llama31-service-vllm-tpu

env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- MODEL_ID=meta-llama/Meta-Llama-3.1-8B-Instruct
- DATE=20240828
- TORCH_VERSION=2.5.0
Expand Down
2 changes: 1 addition & 1 deletion examples/fine-tuning/alignment-handbook/.dstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ python: "3.10"

# Required environment variables
env:
- HUGGING_FACE_HUB_TOKEN
- HF_TOKEN
- ACCELERATE_LOG_LEVEL=info
- WANDB_API_KEY

Expand Down
Loading

0 comments on commit 4e61acb

Please sign in to comment.