Instructions to use mccaly/test2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mccaly/test2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="mccaly/test2")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, UperNetForSemanticSegmentation processor = AutoImageProcessor.from_pretrained("mccaly/test2") model = UperNetForSemanticSegmentation.from_pretrained("mccaly/test2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download tools/slurm_test.sh from mccaly/test2: direct link, hf CLI and curl.
- Browser
- Download file 566 Bytes
-
https://huggingface.co/mccaly/test2/resolve/main/tools/slurm_test.sh
- Command line
-
hf download hf://mccaly/test2/tools/slurm_test.sh
-
curl -L -o slurm_test.sh https://huggingface.co/mccaly/test2/resolve/main/tools/slurm_test.sh
566 Bytes
| set -x | |
| PARTITION=$1 | |
| JOB_NAME=$2 | |
| CONFIG=$3 | |
| CHECKPOINT=$4 | |
| GPUS=${GPUS:-4} | |
| GPUS_PER_NODE=${GPUS_PER_NODE:-4} | |
| CPUS_PER_TASK=${CPUS_PER_TASK:-5} | |
| PY_ARGS=${@:5} | |
| SRUN_ARGS=${SRUN_ARGS:-""} | |
| PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ | |
| srun -p ${PARTITION} \ | |
| --job-name=${JOB_NAME} \ | |
| --gres=gpu:${GPUS_PER_NODE} \ | |
| --ntasks=${GPUS} \ | |
| --ntasks-per-node=${GPUS_PER_NODE} \ | |
| --cpus-per-task=${CPUS_PER_TASK} \ | |
| --kill-on-bad-exit=1 \ | |
| ${SRUN_ARGS} \ | |
| python -u tools/test.py ${CONFIG} ${CHECKPOINT} --launcher="slurm" ${PY_ARGS} | |