Skip to content

Commit 21d845e

Browse files
Llm large fixes (#1959)
* Fix llama3 multi-gpu issue * Fix identation * Remove llama2 outdated references * Fix run_evaluation argument
1 parent e7c301c commit 21d845e

File tree

7 files changed

+19
-20
lines changed

7 files changed

+19
-20
lines changed

language/llama3-405b/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ TODO: Host model and grant access to submitters
7070
+ First go to [llama3-request-link](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) and make a request, sign in to HuggingFace (if you don't have account, you'll need to create one). **Please note your authentication credentials** as you may be required to provide them when cloning below.
7171
+ Requires Git Large Files Storage
7272
```
73-
export CHECKPOINT_PATH=${PWD}/Llama-2-70b-chat-hf
73+
export CHECKPOINT_PATH=Meta-Llama-3.1-405B-Instruct
7474
git lfs install
7575
git clone https://huggingface.co/meta-llama/Llama-3.1-405B-Instruct ${CHECKPOINT_PATH}
7676

language/llama3-405b/SUT_VLLM.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -127,19 +127,18 @@ def process_queries(self):
127127
pred_output_tokens,
128128
query_id_list=query_ids,
129129
)
130-
131-
for i in range(len(qitem)):
132-
n_tokens = processed_output[i].shape[0]
133-
response_array = array.array(
134-
"B", processed_output[i].tobytes())
135-
bi = response_array.buffer_info()
136-
response = [
137-
lg.QuerySampleResponse(
138-
qitem[i].id,
139-
bi[0],
140-
bi[1],
141-
n_tokens)]
142-
lg.QuerySamplesComplete(response)
130+
for i in range(len(qitem)):
131+
n_tokens = processed_output[i].shape[0]
132+
response_array = array.array(
133+
"B", processed_output[i].tobytes())
134+
bi = response_array.buffer_info()
135+
response = [
136+
lg.QuerySampleResponse(
137+
qitem[i].id,
138+
bi[0],
139+
bi[1],
140+
n_tokens)]
141+
lg.QuerySamplesComplete(response)
143142

144143
tok = time.time()
145144

language/llama3-405b/dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def postProcess(
8080
output_seq = out_tokens
8181
assert len(query_id_list) == len(output_seq)
8282

83-
return np.asarray(output_seq, dtype=np.int32)
83+
return [np.asarray(out, dtype=np.int32) for out in output_seq]
8484

8585
def LoadSamplesToRam(self, sample_list):
8686
pass

language/llama3-405b/evaluate-accuracy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def main():
182182

183183
preds, targets = postprocess_text(preds_decoded_text, target_required)
184184

185-
result = run_evaluation(preds, targets, metrics)
185+
result = run_evaluation(preds, targets, metrics_required)
186186
result = dict(result)
187187
prediction_lens = [len(pred) for pred in preds]
188188
gen_num = len(preds)

language/llama3-405b/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def get_args():
4646
parser.add_argument(
4747
"--model-path",
4848
type=str,
49-
default="meta-llama/Llama-2-70b-chat-hf",
49+
default="Meta-Llama-3.1-405B-Instruct",
5050
help="Model name",
5151
)
5252
parser.add_argument("--dataset-path", type=str, default=None, help="")
@@ -110,7 +110,7 @@ def get_args():
110110
parser.add_argument(
111111
"--api-model-name",
112112
type=str,
113-
default="meta-llama/Llama-2-70b-chat-hf",
113+
default="Meta-Llama-3.1-405B-Instruct",
114114
help="Model name(specified in llm server)",
115115
)
116116
parser.add_argument(

language/llama3-405b/run_offline.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CHECKPOINT_PATH="${CHECKPOINT_PATH:-meta-llama/Llama-2-70b-chat-hf}"
1+
CHECKPOINT_PATH="${CHECKPOINT_PATH:Meta-Llama-3.1-405B-Instruct}"
22
DATASET_PATH="${DATASET_PATH:-open-orca-val-set.pkl}"
33

44
python -u main.py --scenario Offline \

language/llama3-405b/run_server.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
CHECKPOINT_PATH="${CHECKPOINT_PATH:-meta-llama/Llama-2-70b-chat-hf}"
3+
CHECKPOINT_PATH="${CHECKPOINT_PATH:Meta-Llama-3.1-405B-Instruct}"
44
DATASET_PATH="${DATASET_PATH:-open-orca-val-set.pkl}"
55

66
python -u main.py --scenario Server \

0 commit comments

Comments
 (0)