File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
.buildkite/scripts/hardware_ci Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,14 @@ container_name="neuron_$(tr -dc A-Za-z0-9 < /dev/urandom | head -c 10; echo)"
11
11
HF_CACHE=" $( realpath ~ ) /huggingface"
12
12
mkdir -p " ${HF_CACHE} "
13
13
HF_MOUNT=" /root/.cache/huggingface"
14
+ HF_TOKEN=$( aws secretsmanager get-secret-value --secret-id " ci/vllm-neuron/hf-token" --region us-west-2 --query ' SecretString' --output text | jq -r .VLLM_NEURON_CI_HF_TOKEN)
14
15
15
16
NEURON_COMPILE_CACHE_URL=" $( realpath ~ ) /neuron_compile_cache"
16
17
mkdir -p " ${NEURON_COMPILE_CACHE_URL} "
17
18
NEURON_COMPILE_CACHE_MOUNT=" /root/.cache/neuron_compile_cache"
18
19
19
20
# Try building the docker image
20
- aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin 763104351884.dkr. ecr.us-west-2.amazonaws.com
21
+ aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public. ecr.aws
21
22
22
23
# prune old image and containers to save disk space, and only once a day
23
24
# by using a timestamp file in tmp.
@@ -47,6 +48,7 @@ trap remove_docker_container EXIT
47
48
docker run --rm -it --device=/dev/neuron0 --network bridge \
48
49
-v " ${HF_CACHE} :${HF_MOUNT} " \
49
50
-e " HF_HOME=${HF_MOUNT} " \
51
+ -e " HF_TOKEN=${HF_TOKEN} " \
50
52
-v " ${NEURON_COMPILE_CACHE_URL} :${NEURON_COMPILE_CACHE_MOUNT} " \
51
53
-e " NEURON_COMPILE_CACHE_URL=${NEURON_COMPILE_CACHE_MOUNT} " \
52
54
--name " ${container_name} " \
Original file line number Diff line number Diff line change
1
+ # Load model directly
2
+ from transformers import AutoTokenizer , AutoModelForCausalLM
3
+
4
+ def test_download ():
5
+ tokenizer = AutoTokenizer .from_pretrained ("meta-llama/Llama-3.2-1B" )
6
+ model = AutoModelForCausalLM .from_pretrained ("meta-llama/Llama-3.2-1B" )
You can’t perform that action at this time.
0 commit comments