-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathevaluate_gemma2_27b_ptd.sh
More file actions
71 lines (66 loc) · 2.07 KB
/
evaluate_gemma2_27b_ptd.sh
File metadata and controls
71 lines (66 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
export CUDA_DEVICE_MAX_CONNECTIONS=1
# distributed config
NPUS_PER_NODE=8
MASTER_ADDR=localhost
MASTER_PORT=6000
NNODES=1
NODE_RANK=0
# modify script model path and tokenizer path
TOKENIZER_PATH="your tokenizer directory path"
CHECKPOINT="your model directory path"
# configure task and data path
DATA_PATH="./mmlu/test/"
TASK="mmlu"
DISTRIBUTED_ARGS="
--nproc_per_node $NPUS_PER_NODE \
--nnodes $NNODES \
--node_rank $NODE_RANK \
--master_addr $MASTER_ADDR \
--master_port $MASTER_PORT"
# configure generation parameters
torchrun $DISTRIBUTED_ARGS evaluation.py \
--task-data-path ${DATA_PATH} \
--task ${TASK}\
--load ${CHECKPOINT} \
--use-mcore-models \
--tensor-model-parallel-size 8 \
--pipeline-model-parallel-size 1 \
--gelu-tanh \
--post-norm \
--spec mindspeed_llm.tasks.models.spec.gemma2_spec layer_spec \
--query-pre-attn-scalar 144 \
--output-logit-softcapping 30.0 \
--attn-logit-softcapping 50.0 \
--interleave-sliding-window 4096 \
--group-query-attention \
--num-query-groups 16 \
--num-layers 46 \
--hidden-size 4608 \
--ffn-hidden-size 36864 \
--num-attention-heads 32 \
--kv-channels 128 \
--max-position-embeddings 8192 \
--seq-length 8192 \
--max-new-tokens 1 \
--position-embedding-type rope \
--disable-bias-linear \
--normalization RMSNorm \
--add-rmsnorm-offset \
--input-embeds-norm \
--tokenizer-type PretrainedFromHF \
--tokenizer-name-or-path ${TOKENIZER_PATH} \
--tokenizer-not-use-fast \
--norm-epsilon 1e-06 \
--evaluation-batch-size 1 \
--micro-batch-size 1 \
--use-fused-rmsnorm \
--no-masked-softmax-fusion \
--exit-on-missing-checkpoint \
--no-load-rng \
--no-load-optim \
--vocab-size 256000 \
--make-vocab-size-divisible-by 1 \
--bf16 \
--transformer-impl local \
--seed 42 | tee logs/evaluation_gemma2_27b_mcore_${TASK}.log