-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathconfig-llama3.1-8b-g5.2xl-g5.4xl-sm.yml
171 lines (159 loc) · 4.8 KB
/
config-llama3.1-8b-g5.2xl-g5.4xl-sm.yml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
general:
name: "Llama3-1-8b-g5"
model_name: "Llama3-1-8b"
aws:
region: {region}
sagemaker_execution_role: {role_arn}
bucket: {write_bucket}
dir_paths:
data_prefix: data
prompts_prefix: prompts
all_prompts_file: all_prompts.csv
metrics_dir: metrics
models_dir: models
metadata_dir: metadata
s3_read_data:
read_bucket: {read_bucket}
scripts_prefix: scripts
script_files:
- hf_token.txt
configs_prefix: configs
config_files:
- #.yml
source_data_prefix: source_data
source_data_files:
- 2wikimqa_e.jsonl
- 2wikimqa.jsonl
- hotpotqa_e.jsonl
- hotpotqa.jsonl
- narrativeqa.jsonl
- triviaqa_e.jsonl
- triviaqa.jsonl
tokenizer_prefix: llama3_1_tokenizer
prompt_template_dir: prompt_template
prompt_template_file: prompt_template_llama3.txt
## section that enables container to run notebooks and python scripts automatically
run_steps:
0_setup.ipynb: yes
1_generate_data.ipynb: yes
2_deploy_model.ipynb: yes
3_run_inference.ipynb: yes
4_get_evaluations.ipynb: no
5_model_metric_analysis.ipynb: yes
6_cleanup.ipynb: yes
datasets:
prompt_template_keys:
- input
- context
ground_truth_col_key: answers
question_col_key: input
filters:
- language: en
min_length_in_tokens: 1
max_length_in_tokens: 500
payload_file: payload_en_1-500.jsonl
- language: en
min_length_in_tokens: 500
max_length_in_tokens: 1000
payload_file: payload_en_500-1000.jsonl
- language: en
min_length_in_tokens: 1000
max_length_in_tokens: 2000
payload_file: payload_en_1000-2000.jsonl
- language: en
min_length_in_tokens: 2000
max_length_in_tokens: 3000
payload_file: payload_en_2000-3000.jsonl
- language: en
min_length_in_tokens: 3000
max_length_in_tokens: 3840
payload_file: payload_en_3000-3840.jsonl
# name of the file that contains the model evaluation information
# for example, the prompt template names, the ground truth column name (if any),
# LLM panelist information, inference parameters, etc.
model_evaluations: model_eval_all_info.yml
metrics:
dataset_of_interest: en_2000-3000
#: #.yml
inference_parameters:
sagemaker:
do_sample: yes
temperature: 0.1
top_p: 0.92
top_k: 120
max_new_tokens: 100
experiments:
- name: Llama3-1-8b-g5.2xl-djl-inference:0.29.0-lmi11.0.0-cu124
model_id: meta-llama/Llama-3.1-8B-Instruct
model_version: "*"
model_name: Meta-Llama-3-1-8B-Instruct
ep_name: Meta-Llama-3-1-8B-Instruct-g5-2xl
download_from_hf_place_in_s3: yes
model_s3_path: s3://{write_bucket}/meta-llama/Llama-3.1-8B-Instruct
instance_type: "ml.g5.xlarge"
image_uri: 763104351884.dkr.ecr.{region}.amazonaws.com/djl-inference:0.29.0-lmi11.0.0-cu124
deploy: yes
instance_count: 1
deployment_script: deploy_w_djl_serving.py
inference_script: sagemaker_predictor.py
inference_spec:
parameter_set: sagemaker
serving.properties: |
engine=Python
option.model_id=s3://{write_bucket}/meta-llama/Llama-3.1-8B-Instruct
option.dtype=fp16
payload_files:
- payload_en_1-500.jsonl
- payload_en_500-1000.jsonl
- payload_en_1000-2000.jsonl
- payload_en_2000-3000.jsonl
# - payload_en_3000-3840.jsonl
concurrency_levels:
- 1
- 2
accept_eula: true
env:
- name: Llama3-1-8b-g5.4xl-djl-inference:0.29.0-lmi11.0.0-cu124
model_id: meta-llama/Llama-3.1-8B-Instruct
model_version: "*"
model_name: Meta-Llama-3-1-8B-Instruct
ep_name: Meta-Llama-3-1-8B-Instruct-g5-4xl
download_from_hf_place_in_s3: yes
model_s3_path: s3://{write_bucket}/meta-llama/Llama-3.1-8B-Instruct
instance_type: "ml.g5.2xlarge"
image_uri: 763104351884.dkr.ecr.{region}.amazonaws.com/djl-inference:0.29.0-lmi11.0.0-cu124
deploy: yes
instance_count: 1
deployment_script: deploy_w_djl_serving.py
inference_script: sagemaker_predictor.py
inference_spec:
parameter_set: sagemaker
serving.properties: |
engine=Python
option.model_id=s3://{write_bucket}/meta-llama/Llama-3.1-8B-Instruct
option.dtype=fp16
payload_files:
- payload_en_1-500.jsonl
- payload_en_500-1000.jsonl
- payload_en_1000-2000.jsonl
- payload_en_2000-3000.jsonl
# - payload_en_3000-3840.jsonl
concurrency_levels:
- 1
- 2
# - 4
# - 10
accept_eula: true
env:
report:
latency_budget: 2
cost_per_10k_txn_budget: 50
error_rate_budget: 0
per_inference_request_file: per_inference_request_results.csv
all_metrics_file: all_metrics.csv
txn_count_for_showing_cost: 10000
v_shift_w_single_instance: 0.025
v_shift_w_gt_one_instance: 0.025
latency_vs_token_len_chart:
y_ticks:
title: "Effect of token length on inference latency for \"meta-llama/Meta-Llama-3.1-8B-Instruct\""