Elffuss BraidHub

kikocis/llama-stack public

d510759522c8 · 739 B · executableRawPermalink
1#!/bin/bash
2
3# Copyright (c) Meta Platforms, Inc. and affiliates.
4# All rights reserved.
5#
6# This source code is licensed under the terms described in the LICENSE file in
7# the root directory of this source tree.
8
9set -euo pipefail
10set -x
11
12cd $(git rev-parse --show-toplevel)
13
14MASTER_HOST=$1
15RUN_ID=$2
16CKPT_DIR=$3
17QUANT_CKPT_DIR=$4
18TOKENIZER_PATH=$5
19NNODES=$6
20NPROC=$7
21
22echo $MASTER_HOST, $RUN_ID, $CKPT_DIR, $QUANT_CKPT_DIR
23
24NCCL_NET=Socket NCCL_SOCKET_IFNAME=eth TIKTOKEN_CACHE_DIR="" \
25 torchrun \
26 --nnodes=$NNODES --nproc_per_node=$NPROC \
27 --rdzv_id=$RUN_ID \
28 --rdzv_conf='timeout=120' \
29 --rdzv_backend=c10d \
30 --rdzv_endpoint="${MASTER_HOST}:29502" \
31 quantize_checkpoint.py $CKPT_DIR $TOKENIZER_PATH $QUANT_CKPT_DIR