Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

240908 TEST 완료 : Mcp sync-up(main 2f54285) #89

Draft
wants to merge 57 commits into
base: v4.1-internal
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
fd39374
add ci (#67)
kphilpark Aug 28, 2024
d0df238
add ci (#69)
kphilpark Aug 28, 2024
f1a594d
fix error
Aug 28, 2024
e5769c8
test (#70)
kphilpark Aug 28, 2024
0019ec8
CI 세팅 (#71)
kphilpark Aug 28, 2024
1bf4d5b
fix error
Aug 28, 2024
ee4668e
test
Aug 28, 2024
71b4ddf
test
Aug 28, 2024
2ceb54e
test
Aug 28, 2024
a660109
fix
Aug 28, 2024
dc23821
fix
Aug 28, 2024
d94bdd3
fix error
Aug 28, 2024
79a357f
add pip list info
Aug 28, 2024
9174055
fix tag info
Aug 28, 2024
2000b11
주석 삭제 및 brach tag 정보 print
Aug 28, 2024
54a41c7
show tag info
Aug 28, 2024
5d84a30
fix tag clone error
Aug 28, 2024
49def58
fix error
Aug 28, 2024
6342840
fix error
Aug 28, 2024
89c2085
add commit id info
Aug 28, 2024
bd1e4f4
Ci test (#73)
kphilpark Sep 3, 2024
9ecbc69
Update ci.yaml
kphilpark Sep 3, 2024
6c7c490
Update ci.yaml
kphilpark Sep 3, 2024
41370e3
Update ci.yaml
kphilpark Sep 3, 2024
8828d73
Update ci.yaml
kphilpark Sep 3, 2024
b9c9a72
Update ci.yaml
kphilpark Sep 3, 2024
24e5c86
Update ci.yaml
kphilpark Sep 3, 2024
86b8d88
Update ci.yaml
kphilpark Sep 3, 2024
76f4a72
Update ci_bert_int8.sh
kphilpark Sep 3, 2024
c222ea7
Update ci_gpt_j_int8.sh
kphilpark Sep 3, 2024
96f2885
Update ci_llama2-70b_int8.sh
kphilpark Sep 3, 2024
3dbdd80
Update set_ci_conda.sh
kphilpark Sep 3, 2024
980ee4c
Update set_ci_conda.sh
kphilpark Sep 3, 2024
f4cfd42
Update ci_gpt_j_int8.sh
kphilpark Sep 3, 2024
a1e6f2d
Update set_ci_conda.sh
kphilpark Sep 3, 2024
3399c05
Update ci_bert_int8.sh
kphilpark Sep 3, 2024
aa9d204
Update ci_gpt_j_int8.sh
kphilpark Sep 3, 2024
e5b1592
Update ci_llama2-70b_int8.sh
kphilpark Sep 3, 2024
754f973
Update set_ci_conda.sh
kphilpark Sep 3, 2024
3257afe
Update accuracy-squad.py
kphilpark Sep 3, 2024
577cf96
Update ci_bert_int8.sh
kphilpark Sep 3, 2024
d7255a0
Update ci_gpt_j_int8.sh
kphilpark Sep 3, 2024
73dc5ed
Update ci.yaml
kphilpark Sep 3, 2024
bad68c2
Update ci.yaml
kphilpark Sep 3, 2024
a31e519
Update ci.yaml
kphilpark Sep 3, 2024
4c07aca
Update ci.yaml
kphilpark Sep 3, 2024
ff427e5
Update ci_llama2-70b_int8.sh
kphilpark Sep 3, 2024
e5be931
Update ci_llama2-70b_int8.sh
kphilpark Sep 3, 2024
a820020
add fp8 ci test
jeongin-yun Sep 3, 2024
5e35e9c
for test
jeongin-yun Sep 3, 2024
dd04cc2
Update ci_bert_fp8.sh
kphilpark Sep 3, 2024
59ce868
set n_calib, n_val
jeongin-yun Sep 3, 2024
62d8e9c
gpt-j n_data 수정
jeongin-yun Sep 4, 2024
dbdf754
Update ci_bert_fp8.sh
kphilpark Sep 4, 2024
4c396a2
mcp main 715e78bf 기준으로 debug
jeongin-yun Sep 4, 2024
b68aecf
Merge commit '822757d038bdb68c5a942cbeb159a56be1588cbc' into mcp-sync
kphilpark Sep 8, 2024
95aac8b
update args (sync with mcp main)
kphilpark Sep 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions .github/workflows/auto_pr.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,7 @@ jobs:
repo: context.repo.repo,
body: body
})
<<<<<<< HEAD
=======

>>>>>>> 822757d038bdb68c5a942cbeb159a56be1588cbc
2 changes: 1 addition & 1 deletion ci_scripts/ci_bert_fp8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ python -m ci_file.qbert_forward_test --model_path=$MODEL_PATH \
--ref_path=$REF_PATH \
--res_path=$RES_PATH \
--config_dtype=$CONFIG_DTYPE\
--update_gen_list #정답지 업데이트용 argument
# --update_gen_list #정답지 업데이트용 argument


printf "\n============= STEP-3: Check the equivalence of f1 score between current mlperf submission <-> ref =============\n"
Expand Down
2 changes: 1 addition & 1 deletion ci_scripts/ci_bert_int8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ python -m ci_file.qbert_forward_test --model_path=$MODEL_PATH \
--ref_path=$REF_PATH \
--res_path=$RES_PATH \
--config_dtype=$CONFIG_DTYPE\
--update_gen_list #정답지 업데이트용 argument
# --update_gen_list #정답지 업데이트용 argument


printf "\n============= STEP-3: Check the equivalence of f1 score between current mlperf submission <-> ref =============\n"
Expand Down
2 changes: 1 addition & 1 deletion ci_scripts/ci_gpt_j_fp8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ python -m ci_file.qgpt_j_forward_test --model_path=$MODEL_PATH \
--ref_path=$REF_PATH\
--res_path=$RES_PATH\
--config_dtype=$CONFIG_DTYPE\
--update_gen_list #정답지 업데이트용 argument
# --update_gen_list #정답지 업데이트용 argument



Expand Down
2 changes: 1 addition & 1 deletion ci_scripts/ci_gpt_j_int8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ python -m ci_file.qgpt_j_forward_test --model_path=$MODEL_PATH \
--ref_path=$REF_PATH\
--res_path=$RES_PATH\
--config_dtype=$CONFIG_DTYPE\
--update_gen_list #정답지 업데이트용 argument
# --update_gen_list #정답지 업데이트용 argument



Expand Down
2 changes: 1 addition & 1 deletion ci_scripts/ci_llama2-70b_fp8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ python -m ci_file.qllama2_70b_forward_test --model_path=$CHECKPOINT_PATH \
--ref_path=$REF_PATH\
--res_path=$RES_PATH\
--config_dtype=$CONFIG_DTYPE\
--update_gen_list
# --update_gen_list


printf "\n============= End of Forward Test for Qllama2-70b =============\n"
Expand Down
2 changes: 1 addition & 1 deletion ci_scripts/ci_llama2-70b_int8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ python -m ci_file.qllama2_70b_forward_test --model_path=$CHECKPOINT_PATH \
--ref_path=$REF_PATH\
--res_path=$RES_PATH\
--config_dtype=$CONFIG_DTYPE\
--update_gen_list
# --update_gen_list


printf "\n============= End of Forward Test for Qllama2-70b =============\n"
Expand Down
2 changes: 1 addition & 1 deletion language/bert/quantization/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def calibrate(model: GraphModule, qconfig, qparam_path, qformat_path, calib_data

model_compressor.calibrate(
model,
dataloader=calib_dataloader,
# dataloader=calib_dataloader,
**get_kwargs(model_compressor.calibrate, qconfig),
)

Expand Down
16 changes: 8 additions & 8 deletions language/gpt-j/ci_file/qgpt_j_forward_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ def generate_compare_gen_token(
tokenizer = get_tokenizer()
# load reference generated tokens.
update_ref_path = ref_path + f"/generated_data_list_{config_dtype}.json"
# with open(update_ref_path, "r") as file:
# ref_data = json.load(file)
with open(update_ref_path, "r") as file:
ref_data = json.load(file)

results = []
result_flag = True
Expand Down Expand Up @@ -258,13 +258,13 @@ def generate_compare_gen_token(
generated_data_list.append(generated_data)
print(f"생성 토큰 문장 {idx}: {gen_sentence}")
# compare submission model's decoded_test with reference sentences.
# ref_sentence = ref_data[idx]["gen_text"]
# result_flag = check_diff(idx, ref_sentence, gen_sentence, results, result_flag)
ref_sentence = ref_data[idx]["gen_text"]
result_flag = check_diff(idx, ref_sentence, gen_sentence, results, result_flag)

# compare_results_path = res_path + f"/qgpt_j_compare_result_{config_dtype}.json"
# with open(compare_results_path, "w") as file:
# json.dump(results, file, indent=4)
# print(f"토큰 동치비교 결과가 저장되었습니다. dir: {compare_results_path}")
compare_results_path = res_path + f"/qgpt_j_compare_result_{config_dtype}.json"
with open(compare_results_path, "w") as file:
json.dump(results, file, indent=4)
print(f"토큰 동치비교 결과가 저장되었습니다. dir: {compare_results_path}")
if update_gen_list:
with open(update_ref_path, "w") as file:
json.dump(generated_data_list, file, indent=4)
Expand Down
6 changes: 1 addition & 5 deletions language/gpt-j/quantization/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def calibrate(model: GraphModule, qconfig, qparam_path, qformat_path, calib_data

model_compressor.calibrate(
model_for_calib,
dataloader=calib_dataloader,
# dataloader=calib_dataloader,
autoscale_calib_kwargs=autoscale_calib_cfg if run_autoscale else None,
model_type=model_type,
**get_kwargs(model_compressor.calibrate, qconfig),
Expand All @@ -160,7 +160,6 @@ def immigrate_qparams(model, golden_qparam_path, golden_qformat_path, quant_para
qparam_path = golden_qparam_path,
qlevel=2,
target_machine=qconfig["target_machine"],
delete_org_weight=True,
immigrate_qparams = True,
)

Expand All @@ -186,10 +185,7 @@ def immigrate_qparams(model, golden_qparam_path, golden_qformat_path, quant_para
torch.save(quant_models["decode"].state_dict(), qlv4_decode_out_path)
# model_compressor.save_graph_patterns(quant_models["prefill"], prefill_rblock_json_out_path)
# model_compressor.save_graph_patterns(quant_models["decode"], decode_rblock_json_out_path)





def get_args():
parser = argparse.ArgumentParser()
Expand Down
1 change: 0 additions & 1 deletion language/gpt-j/quantization/quantize.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def _quantize(
model,
qformat_path=qformat_path,
qparam_path=qparam_path,
delete_org_weight=True,
decode_phase=quantized_prefill is not None,
quantized_prefill_model=quantized_prefill,
target_machine=TARGET_MACHINE,
Expand Down
3 changes: 1 addition & 2 deletions language/llama2-70b/quantization/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def calibrate(model, qconfig, qparam_path, qformat_path, calib_dataloader):

model_compressor.calibrate(
model,
dataloader=calib_dataloader,
# dataloader=calib_dataloader,
**get_kwargs(model_compressor.calibrate, qconfig),
model_type = model_type,
autoscale_calib_kwargs=autoscale_calib_kwargs,
Expand Down Expand Up @@ -163,7 +163,6 @@ def immigrate_qparams(model, golden_qparam_path, golden_qformat_path, quant_para
qparam_path = golden_qparam_path,
qlevel=2,
target_machine=qconfig["target_machine"],
delete_org_weight=True,
immigrate_qparams = True,
)

Expand Down
3 changes: 1 addition & 2 deletions language/llama2-70b/quantization/calibrate_llama3.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def calibrate(model, qconfig, qparam_path, qformat_path, calib_dataloader):

model_compressor.calibrate(
model,
dataloader=calib_dataloader,
# dataloader=calib_dataloader,
**get_kwargs(model_compressor.calibrate, qconfig),
model_type = model_type,
autoscale_calib_kwargs=autoscale_calib_kwargs,
Expand Down Expand Up @@ -174,7 +174,6 @@ def immigrate_qparams(model, golden_qparam_path, golden_qformat_path, quant_para
qparam_path = golden_qparam_path,
qlevel=2,
target_machine=qconfig["target_machine"],
delete_org_weight=True,
immigrate_qparams = True,
)

Expand Down
1 change: 0 additions & 1 deletion language/llama2-70b/quantization/quantize.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def _quantize(
model,
qformat_path=qformat_path,
qparam_path=qparam_path,
delete_org_weight=True,
decode_phase=quantized_prefill is not None,
quantized_prefill_model=quantized_prefill,
# https://github.com/furiosa-ai/inference/pull/29/files#diff-9b228ac2c8c424039f8ab41443631c4097f3c3abf73a05b3e327c51ed30d394dR65
Expand Down
Loading