2025-02-28 11:14:58 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
ldconfig 2>/dev/null || echo 'unable to refresh ld cache, not a big deal in most cases'
|
|
|
|
|
|
|
|
# Check if --sharded argument is present in the command line arguments
|
|
|
|
if [[ "$*" == *"--sharded true"* ]]; then
|
|
|
|
echo 'setting PT_HPU_ENABLE_LAZY_COLLECTIVES=1 for sharding'
|
|
|
|
export PT_HPU_ENABLE_LAZY_COLLECTIVES=1
|
|
|
|
fi
|
2025-05-15 12:35:37 +00:00
|
|
|
# Check if ATTENTION environment variable is set to paged
|
|
|
|
if [[ "$ATTENTION" == "paged" ]]; then
|
|
|
|
# Check if Llama-4 is in the command line arguments
|
|
|
|
if [[ "$*" == *"Llama-4"* ]]; then
|
|
|
|
echo 'ATTENTION=paged and Llama-4 detected'
|
|
|
|
pip install git+https://github.com/huggingface/transformers.git@29338949
|
|
|
|
fi
|
|
|
|
fi
|
2025-02-28 11:14:58 +00:00
|
|
|
|
|
|
|
text-generation-launcher $@
|