From 4e61acbfad464e8172d3e7c58ffbeae0a5df6a19 Mon Sep 17 00:00:00 2001 From: Andrey Cheptsov <54148038+peterschmidt85@users.noreply.github.com> Date: Tue, 22 Oct 2024 11:28:07 +0200 Subject: [PATCH] [Docs] Rename `HUGGING_FACE_HUB_TOKEN` to `HF_TOKEN` (#1871) [Docs] Rename HUGGING_FACE_HUB_TOKEN to HF_TOKEN #1871 --- docs/blog/posts/amd-on-runpod.md | 4 ++-- docs/blog/posts/tpu-on-gcp.md | 6 +++--- docs/blog/posts/volumes-on-runpod.md | 4 ++-- docs/docs/guides/protips.md | 8 ++++---- docs/docs/reference/dstack.yml/dev-environment.md | 4 ++-- docs/docs/reference/dstack.yml/service.md | 4 ++-- docs/docs/reference/dstack.yml/task.md | 4 ++-- docs/docs/services.md | 4 ++-- docs/docs/tasks.md | 4 ++-- examples/.dstack.yml | 6 ++---- examples/accelerators/amd/README.md | 10 +++++----- examples/accelerators/tpu/README.md | 6 +++--- examples/deployment/lorax/serve-task.dstack.yml | 2 +- examples/deployment/lorax/serve.dstack.yml | 2 +- examples/deployment/optimum-tpu/.dstack.yml | 2 +- examples/deployment/optimum-tpu/service.dstack.yml | 2 +- examples/deployment/optimum-tpu/task.dstack.yml | 2 +- examples/deployment/tgi/amd/.dstack.yml | 2 +- examples/deployment/tgi/amd/service.dstack.yml | 2 +- examples/deployment/tgi/serve-task.dstack.yml | 2 +- examples/deployment/tgi/serve.dstack.yml | 2 +- examples/deployment/vllm/amd/.dstack.yml | 2 +- examples/deployment/vllm/amd/build.vllm-rocm.yaml | 2 +- examples/deployment/vllm/amd/service.dstack.yml | 2 +- examples/deployment/vllm/service-tpu.dstack.yml | 2 +- examples/fine-tuning/alignment-handbook/.dstack.yml | 2 +- examples/fine-tuning/alignment-handbook/README.md | 6 +++--- .../alignment-handbook/train-distrib.dstack.yml | 2 +- .../fine-tuning/alignment-handbook/train.dstack.yml | 2 +- examples/fine-tuning/axolotl/.dstack.yml | 2 +- examples/fine-tuning/axolotl/README.md | 6 +++--- .../fine-tuning/axolotl/amd/build.flash-attention.yaml | 2 +- examples/fine-tuning/axolotl/amd/build.xformers.yaml | 2 +- examples/fine-tuning/axolotl/amd/train.dstack.yaml | 2 +- examples/fine-tuning/axolotl/train.dstack.yaml | 2 +- examples/fine-tuning/optimum-tpu/llama31/.dstack.yml | 2 +- .../fine-tuning/optimum-tpu/llama31/train.dstack.yml | 2 +- examples/fine-tuning/qlora/train.dstack.yml | 2 +- examples/fine-tuning/trl/.dstack.yml | 2 +- examples/fine-tuning/trl/README.md | 4 ++-- examples/fine-tuning/trl/amd/train.dstack.yaml | 2 +- examples/fine-tuning/trl/train-distrib.dstack.yml | 2 +- examples/fine-tuning/trl/train.dstack.yml | 2 +- examples/llms/llama31/.dstack.yml | 2 +- examples/llms/llama31/README.md | 10 +++++----- examples/llms/llama31/tgi/.dstack.yml | 2 +- examples/llms/llama31/tgi/task.dstack.yml | 2 +- examples/llms/llama31/vllm/task.dstack.yml | 2 +- examples/llms/llama32/.dstack.yml | 2 +- examples/llms/llama32/README.md | 4 ++-- examples/llms/llama32/vllm/task.dstack.yml | 2 +- examples/llms/mixtral/tgi.dstack.yml | 2 +- examples/llms/mixtral/vllm.dstack.yml | 2 +- .../_internal/server/services/gateways/options.py | 6 +++--- 54 files changed, 85 insertions(+), 87 deletions(-) diff --git a/docs/blog/posts/amd-on-runpod.md b/docs/blog/posts/amd-on-runpod.md index f96aaf12c..87ba0518b 100644 --- a/docs/blog/posts/amd-on-runpod.md +++ b/docs/blog/posts/amd-on-runpod.md @@ -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 @@ -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 diff --git a/docs/blog/posts/tpu-on-gcp.md b/docs/blog/posts/tpu-on-gcp.md index 7973f2494..2bfe35b91 100644 --- a/docs/blog/posts/tpu-on-gcp.md +++ b/docs/blog/posts/tpu-on-gcp.md @@ -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 @@ -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 @@ -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/ diff --git a/docs/blog/posts/volumes-on-runpod.md b/docs/blog/posts/volumes-on-runpod.md index 116a121bb..58b02d4a9 100644 --- a/docs/blog/posts/volumes-on-runpod.md +++ b/docs/blog/posts/volumes-on-runpod.md @@ -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 @@ -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 diff --git a/docs/docs/guides/protips.md b/docs/docs/guides/protips.md index e433e8ab2..0749be141 100644 --- a/docs/docs/guides/protips.md +++ b/docs/docs/guides/protips.md @@ -181,7 +181,7 @@ name: vscode python: "3.10" env: - - HUGGING_FACE_HUB_TOKEN + - HF_TOKEN ide: vscode ``` @@ -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"}, diff --git a/docs/docs/reference/dstack.yml/dev-environment.md b/docs/docs/reference/dstack.yml/dev-environment.md index 3e1bd0b5b..ba19fe966 100644 --- a/docs/docs/reference/dstack.yml/dev-environment.md +++ b/docs/docs/reference/dstack.yml/dev-environment.md @@ -151,7 +151,7 @@ name: vscode # Environment variables env: - - HUGGING_FACE_HUB_TOKEN + - HF_TOKEN - HF_HUB_ENABLE_HF_TRANSFER=1 ide: vscode @@ -159,7 +159,7 @@ ide: vscode -> 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`. diff --git a/docs/docs/reference/dstack.yml/service.md b/docs/docs/reference/dstack.yml/service.md index 5d638ec41..4aa768583 100644 --- a/docs/docs/reference/dstack.yml/service.md +++ b/docs/docs/reference/dstack.yml/service.md @@ -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: @@ -328,7 +328,7 @@ resources: -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`. diff --git a/docs/docs/reference/dstack.yml/task.md b/docs/docs/reference/dstack.yml/task.md index e2e052968..4e069d68f 100644 --- a/docs/docs/reference/dstack.yml/task.md +++ b/docs/docs/reference/dstack.yml/task.md @@ -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 @@ -212,7 +212,7 @@ commands: -> 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`. diff --git a/docs/docs/services.md b/docs/docs/services.md index c916580d1..bdb84aa38 100644 --- a/docs/docs/services.md +++ b/docs/docs/services.md @@ -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 @@ -72,7 +72,7 @@ To run a configuration, use the [`dstack apply`](reference/cli/index.md#dstack-a