Spaces:
Build error
Build error
perf vs rpp
Browse files- .gitattributes +7 -0
- competition/12a_InterLM_Merged_Model_NV4080.ipynb +1 -1
- competition/12rp1.0_InterLM_Merged_Model_NV4080.ipynb +1 -0
- competition/12rp1.1_InterLM_Merged_Model_NV4080.ipynb +1 -0
- results/llama3-8b_lora_sft_bf16-p1.csv +0 -0
- results/llama3-8b_lora_sft_bf16-p2.csv +0 -0
- results/mgtv-llama3_p1_full_metrics.csv +3 -8
- results/mgtv-llama3_p2_full_metrics.csv +3 -8
- results/mgtv-results_merged_model.csv +0 -0
- results/mgtv-results_p1_full_metrics.csv +3 -6
- results/mgtv-results_p2_full_metrics.csv +3 -8
.gitattributes
CHANGED
@@ -57,3 +57,10 @@ results/mgtv-results_h100.csv filter=lfs diff=lfs merge=lfs -text
|
|
57 |
results/mgtv-results_bf16.csv filter=lfs diff=lfs merge=lfs -text
|
58 |
results/mgtv-results_p2_full.csv filter=lfs diff=lfs merge=lfs -text
|
59 |
TurtleSoupBaseline/predict_result.csv filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
results/mgtv-results_bf16.csv filter=lfs diff=lfs merge=lfs -text
|
58 |
results/mgtv-results_p2_full.csv filter=lfs diff=lfs merge=lfs -text
|
59 |
TurtleSoupBaseline/predict_result.csv filter=lfs diff=lfs merge=lfs -text
|
60 |
+
results/llama3-8b_lora_sft_bf16-p2.csv filter=lfs diff=lfs merge=lfs -text
|
61 |
+
results/mgtv-llama3_p1_full_metrics.csv filter=lfs diff=lfs merge=lfs -text
|
62 |
+
results/mgtv-llama3_p2_full_metrics.csv filter=lfs diff=lfs merge=lfs -text
|
63 |
+
results/mgtv-results_merged_model.csv filter=lfs diff=lfs merge=lfs -text
|
64 |
+
results/mgtv-results_p1_full_metrics.csv filter=lfs diff=lfs merge=lfs -text
|
65 |
+
results/mgtv-results_p2_full_metrics.csv filter=lfs diff=lfs merge=lfs -text
|
66 |
+
results/llama3-8b_lora_sft_bf16-p1.csv filter=lfs diff=lfs merge=lfs -text
|
competition/12a_InterLM_Merged_Model_NV4080.ipynb
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"cells":[{"cell_type":"code","execution_count":1,"metadata":{"executionInfo":{"elapsed":476,"status":"ok","timestamp":1720679526275,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"uWKRSV6eZsCn"},"outputs":[],"source":["%load_ext autoreload\n","%autoreload 2"]},{"cell_type":"code","execution_count":2,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"eb33b19f-1206-41ee-84e2-e6258a12eef7","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":2534,"status":"ok","timestamp":1720679529344,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"xwFh14uiZBrI","outputId":"d767799c-34c2-46a5-f052-378146a55321"},"outputs":[],"source":["from pathlib import Path\n","\n","try:\n"," from google.colab import drive\n","\n"," drive.mount(\"/content/drive\")\n"," workding_dir = \"/content/drive/MyDrive/logical-reasoning/\"\n","except ModuleNotFoundError:\n"," workding_dir = str(Path.cwd().parent)"]},{"cell_type":"code","execution_count":3,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"6d394937-6c99-4a7c-9d32-7600a280032f","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":5,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"G5pNu3zgZBrL","outputId":"160a554f-fb08-4aa0-bc00-0422fb7c1fac"},"outputs":[{"name":"stdout","output_type":"stream","text":["workding dir: /home/inflaton/code/projects/courses/logical-reasoning\n"]}],"source":["import os\n","import sys\n","from pathlib import Path\n","\n","os.chdir(workding_dir)\n","sys.path.append(workding_dir)\n","print(\"workding dir:\", workding_dir)"]},{"cell_type":"code","execution_count":4,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"9f67ec60-2f24-411c-84eb-0dd664b44775","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":3,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"hPCC-6m7ZBrM","outputId":"c7aa2c96-5e99-440a-c148-201d79465ff9"},"outputs":[{"name":"stdout","output_type":"stream","text":["loading env vars from: /home/inflaton/code/projects/courses/logical-reasoning/.env\n"]},{"data":{"text/plain":["True"]},"execution_count":4,"metadata":{},"output_type":"execute_result"}],"source":["from dotenv import find_dotenv, load_dotenv\n","\n","found_dotenv = find_dotenv(\".env\")\n","\n","if len(found_dotenv) == 0:\n"," found_dotenv = find_dotenv(\".env.example\")\n","print(f\"loading env vars from: {found_dotenv}\")\n","load_dotenv(found_dotenv, override=True)"]},{"cell_type":"code","execution_count":5,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"f1597656-8042-4878-9d3b-9ebfb8dd86dc","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":3,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"1M3IraVtZBrM","outputId":"29ab35f6-2970-4ade-d85d-3174acf8cda0"},"outputs":[{"name":"stdout","output_type":"stream","text":["llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full None False datasets/mgtv results/mgtv-results_merged_model.csv\n"]}],"source":["import os\n","\n","model_name = os.getenv(\"MODEL_NAME\")\n","adapter_name_or_path = os.getenv(\"ADAPTER_NAME_OR_PATH\")\n","load_in_4bit = os.getenv(\"LOAD_IN_4BIT\") == \"true\"\n","data_path = os.getenv(\"LOGICAL_REASONING_DATA_PATH\")\n","results_path = os.getenv(\"LOGICAL_REASONING_RESULTS_PATH\")\n","use_english_datasets = os.getenv(\"USE_ENGLISH_DATASETS\") == \"true\"\n","\n","\n","print(model_name, adapter_name_or_path, load_in_4bit, data_path, results_path)"]},{"cell_type":"code","execution_count":6,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"b2a43943-9324-4839-9a47-cfa72de2244b","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":564,"status":"ok","timestamp":1720679529907,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"UgMvt6dIZBrM","outputId":"ce37581c-fd26-46c2-ad87-d933d99f68f7"},"outputs":[{"name":"stdout","output_type":"stream","text":["Python 3.11.9\n","\u001b[33mWARNING: Package(s) not found: flash-attn\u001b[0m\u001b[33m\n","\u001b[0mCPU times: user 1.76 ms, sys: 10.8 ms, total: 12.5 ms\n","Wall time: 560 ms\n"]}],"source":["%%time\n","!python --version\n","!pip show flash-attn"]},{"cell_type":"code","execution_count":7,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":1685,"status":"ok","timestamp":1720679531591,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"ZuS_FsLyZBrN","outputId":"2cba0105-c505-4395-afbd-2f2fee6581d0"},"outputs":[{"name":"stdout","output_type":"stream","text":["loading /home/inflaton/code/projects/courses/logical-reasoning/llm_toolkit/logical_reasoning_utils.py\n","GPU is available\n"]}],"source":["from llm_toolkit.llm_utils import *\n","from llm_toolkit.logical_reasoning_utils import *\n","\n","device = check_gpu()"]},{"cell_type":"code","execution_count":8,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["loading model: llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full\n"]},{"name":"stderr","output_type":"stream","text":["Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n"]},{"data":{"application/vnd.jupyter.widget-view+json":{"model_id":"91fd1c2ac40345238c96a1f5bf58ca31","version_major":2,"version_minor":0},"text/plain":["Loading checkpoint shards: 0%| | 0/8 [00:00<?, ?it/s]"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["WARNING:root:Some parameters are on the meta device device because they were offloaded to the cpu.\n"]},{"name":"stdout","output_type":"stream","text":["CPU times: user 4.81 s, sys: 585 ms, total: 5.4 s\n","Wall time: 8.52 s\n"]}],"source":["%%time\n","\n","model, tokenizer = load_model(model_name)"]},{"cell_type":"code","execution_count":9,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["loading train/test data files\n","DatasetDict({\n"," train: Dataset({\n"," features: ['text', 'label', 'answer', 'title', 'puzzle', 'truth', 'train_text', 'prompt'],\n"," num_rows: 25000\n"," })\n"," test: Dataset({\n"," features: ['text', 'label', 'answer', 'title', 'puzzle', 'truth', 'train_text', 'prompt'],\n"," num_rows: 3000\n"," })\n","})\n"]}],"source":["datasets = load_logical_reasoning_dataset(\n"," data_path,\n"," tokenizer=tokenizer,\n"," chinese_prompt=not use_english_datasets,\n"," using_p1=False,\n",")"]},{"cell_type":"code","execution_count":10,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["<s><|im_start|>system\n","You are an expert in logical reasoning.<|im_end|>\n","<|im_start|>user\n","你是一个情景猜谜游戏的主持人。游戏规则如下:\n","\n","1. 参与者会得到一个谜面,谜面会描述一个简单又难以理解的事件。\n","2. 主持人知道谜底,谜底是谜面的答案。\n","3. 参与者可以询问任何封闭式问题来找寻事件的真相。\n","4. 对于每个问题,主持人将根据实际情况回答以下五个选项之一:是、不是、不重要、回答正确、问法错误。各回答的判断标准如下:\n"," - 若谜面和谜底能找到问题的答案,回答:是或者不是\n"," - 若谜面和谜底不能直接或者间接推断出问题的答案,回答:不重要\n"," - 若参与者提问不是一个封闭式问题或者问题难以理解,回答:问法错误\n"," - 若参与者提问基本还原了谜底真相,回答:回答正确\n","5. 回答中不能添加任何其它信息,也不能省略选项中的任何一个字。例如,不可以把“不是”省略成“不”。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","**谜面:** 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","**谜底:** 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","\n","**参与者提出的问题:** 哭泣和村庄有关系吗\n","<|im_end|>\n","<|im_start|>assistant\n","\n","----------------------------------------\n","<s><s><|im_start|>system\n","You are an expert in logical reasoning.<|im_end|>\n","<|im_start|>user\n","你是一个情景猜谜游戏的主持人。游戏规则如下:\n","\n","1. 参与者会得到一个谜面,谜面会描述一个简单又难以理解的事件。\n","2. 主持人知道谜底,谜底是谜面的答案。\n","3. 参与者可以询问任何封闭式问题来找寻事件的真相。\n","4. 对于每个问题,主持人将根据实际情况回答以下五个选项之一:是、不是、不重要、��答正确、问法错误。各回答的判断标准如下:\n"," - 若谜面和谜底能找到问题的答案,回答:是或者不是\n"," - 若谜面和谜底不能直接或者间接推断出问题的答案,回答:不重要\n"," - 若参与者提问不是一个封闭式问题或者问题难以理解,回答:问法错误\n"," - 若参与者提问基本还原了谜底真相,回答:回答正确\n","5. 回答中不能添加任何其它信息,也不能省略选项中的任何一个字。例如,不可以把“不是”省略成“不”。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","**谜面:** 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","**谜底:** 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","\n","**参与者提出的问题:** 哭泣和村庄有关系吗\n","<|im_end|>\n","<|im_start|>assistant\n","是</s>\n","CPU times: user 4.4 s, sys: 282 ms, total: 4.69 s\n","Wall time: 5.39 s\n"]}],"source":["%%time\n","\n","prompt1 = datasets[\"test\"][\"prompt\"][1000]\n","print(prompt1)\n","print(\"--\" * 20)\n","test_model(model, tokenizer, prompt1, device=device)"]},{"cell_type":"code","execution_count":11,"metadata":{},"outputs":[{"name":"stderr","output_type":"stream","text":[" 12%|█▎ | 1/8 [00:01<00:11, 1.58s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 8/8 [00:12<00:00, 1.59s/it]"]},{"name":"stdout","output_type":"stream","text":["CPU times: user 12 s, sys: 272 ms, total: 12.2 s\n","Wall time: 13 s\n"]},{"name":"stderr","output_type":"stream","text":["\n"]},{"data":{"text/plain":["['不是', '是', '是', '是', '不是', '是', '不重要', '不是']"]},"execution_count":11,"metadata":{},"output_type":"execute_result"}],"source":["%%time\n","\n","eval_model(model, tokenizer, datasets[\"test\"][:10], device=device)"]},{"cell_type":"code","execution_count":12,"metadata":{"id":"L370pvGTZBrN"},"outputs":[],"source":["def evaluate_model(model, tokenizer, model_name, dataset):\n"," print(f\"Evaluating model: {model_name} on {device}\")\n"," predictions = eval_model(model, tokenizer, dataset, device=device)\n","\n"," model_name += \"_NV4080\"\n","\n"," save_results(\n"," model_name,\n"," results_path,\n"," dataset,\n"," predictions,\n"," debug=True,\n"," )\n","\n"," metrics = calc_metrics(dataset[\"label\"], predictions, debug=True)\n"," print(metrics)"]},{"cell_type":"code","execution_count":13,"metadata":{"id":"WUFjhxmiZBrN"},"outputs":[{"name":"stdout","output_type":"stream","text":["Evaluating model: llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full on cuda\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:01<1:17:37, 1.55s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [1:46:09<00:00, 2.12s/it]"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \n","0 不是 \n","{'accuracy': 0.785, 'incorrect_ids': [9, 24, 29, 34, 36, 55, 58, 59, 61, 65, 66, 67, 78, 81, 82, 83, 84, 88, 91, 93, 99, 103, 104, 106, 110, 112, 117, 121, 128, 129, 135, 138, 139, 143, 149, 150, 153, 155, 161, 164, 170, 173, 179, 190, 199, 200, 202, 218, 222, 224, 227, 228, 236, 245, 250, 252, 259, 260, 269, 271, 275, 276, 284, 286, 299, 304, 314, 317, 318, 323, 330, 334, 335, 337, 338, 346, 350, 353, 355, 356, 360, 361, 368, 370, 371, 373, 377, 383, 386, 389, 395, 397, 410, 414, 416, 428, 429, 430, 432, 438, 445, 447, 450, 452, 454, 456, 457, 458, 471, 472, 476, 479, 480, 488, 490, 492, 493, 494, 495, 497, 501, 502, 506, 507, 508, 510, 511, 514, 517, 518, 519, 520, 530, 536, 540, 560, 566, 570, 571, 579, 581, 589, 591, 593, 596, 597, 599, 601, 612, 613, 614, 621, 622, 625, 628, 632, 636, 643, 644, 647, 666, 671, 682, 690, 695, 702, 708, 720, 721, 727, 729, 730, 734, 740, 754, 758, 766, 770, 772, 774, 778, 788, 791, 794, 795, 798, 799, 801, 803, 805, 809, 817, 819, 820, 821, 823, 824, 826, 828, 837, 840, 844, 847, 856, 859, 861, 862, 866, 869, 870, 875, 884, 889, 890, 899, 904, 913, 927, 935, 937, 942, 945, 952, 962, 964, 966, 969, 970, 980, 989, 991, 994, 998, 1001, 1003, 1005, 1006, 1007, 1011, 1012, 1014, 1015, 1019, 1022, 1038, 1040, 1043, 1051, 1053, 1069, 1071, 1075, 1076, 1077, 1080, 1083, 1087, 1089, 1096, 1107, 1108, 1120, 1125, 1126, 1129, 1138, 1160, 1161, 1166, 1167, 1172, 1173, 1174, 1178, 1180, 1181, 1183, 1185, 1198, 1203, 1212, 1228, 1232, 1239, 1240, 1241, 1251, 1252, 1254, 1258, 1259, 1266, 1282, 1289, 1305, 1308, 1311, 1313, 1315, 1317, 1324, 1331, 1337, 1339, 1342, 1346, 1349, 1353, 1357, 1363, 1364, 1367, 1385, 1387, 1388, 1389, 1391, 1392, 1393, 1395, 1400, 1406, 1409, 1417, 1420, 1422, 1426, 1438, 1440, 1444, 1451, 1453, 1454, 1455, 1459, 1462, 1469, 1476, 1478, 1486, 1490, 1493, 1494, 1496, 1501, 1504, 1512, 1517, 1518, 1525, 1526, 1533, 1544, 1547, 1554, 1559, 1560, 1562, 1580, 1585, 1590, 1593, 1594, 1603, 1604, 1605, 1613, 1622, 1627, 1633, 1637, 1641, 1645, 1647, 1648, 1650, 1654, 1655, 1658, 1659, 1665, 1668, 1669, 1672, 1673, 1674, 1676, 1679, 1683, 1686, 1691, 1695, 1712, 1716, 1718, 1721, 1726, 1727, 1734, 1736, 1738, 1751, 1755, 1756, 1780, 1786, 1791, 1796, 1798, 1812, 1816, 1827, 1834, 1835, 1841, 1858, 1860, 1867, 1869, 1877, 1879, 1888, 1897, 1914, 1945, 1953, 1958, 1963, 1964, 1971, 1973, 1978, 1981, 1984, 1989, 1990, 1991, 1992, 1994, 1995, 2001, 2017, 2021, 2028, 2035, 2036, 2049, 2054, 2062, 2064, 2067, 2070, 2072, 2076, 2077, 2092, 2100, 2106, 2109, 2110, 2112, 2118, 2119, 2120, 2121, 2126, 2133, 2139, 2141, 2147, 2159, 2161, 2162, 2164, 2167, 2169, 2172, 2174, 2177, 2181, 2185, 2186, 2188, 2192, 2193, 2194, 2195, 2197, 2208, 2212, 2222, 2223, 2226, 2230, 2233, 2237, 2240, 2243, 2247, 2249, 2250, 2257, 2262, 2265, 2274, 2278, 2280, 2281, 2285, 2297, 2304, 2311, 2312, 2317, 2320, 2322, 2324, 2330, 2333, 2335, 2339, 2344, 2348, 2360, 2364, 2366, 2378, 2389, 2395, 2396, 2400, 2404, 2409, 2410, 2420, 2423, 2425, 2429, 2437, 2440, 2442, 2454, 2463, 2469, 2484, 2488, 2491, 2511, 2512, 2515, 2517, 2522, 2529, 2530, 2532, 2535, 2538, 2539, 2546, 2547, 2548, 2549, 2555, 2556, 2559, 2560, 2562, 2574, 2575, 2589, 2590, 2602, 2616, 2624, 2626, 2629, 2632, 2644, 2660, 2663, 2667, 2676, 2678, 2691, 2707, 2714, 2716, 2731, 2736, 2742, 2744, 2745, 2746, 2749, 2754, 2757, 2762, 2764, 2766, 2777, 2788, 2791, 2797, 2798, 2801, 2803, 2806, 2807, 2812, 2815, 2816, 2820, 2823, 2837, 2843, 2845, 2854, 2857, 2860, 2861, 2877, 2880, 2882, 2884, 2888, 2899, 2902, 2905, 2912, 2913, 2915, 2916, 2921, 2927, 2933, 2938, 2939, 2944, 2949, 2953, 2977, 2979, 2985, 2995, 2998]}\n","CPU times: user 1h 38min 39s, sys: 4min 13s, total: 1h 42min 53s\n","Wall time: 1h 46min 10s\n"]},{"name":"stderr","output_type":"stream","text":["\n"]}],"source":["%%time\n","\n","evaluate_model(model, tokenizer, model_name, datasets[\"test\"])"]}],"metadata":{"accelerator":"GPU","application/vnd.databricks.v1+notebook":{"dashboards":[],"environmentMetadata":null,"language":"python","notebookMetadata":{"mostRecentlyExecutedCommandWithImplicitDF":{"commandId":-1,"dataframes":["_sqldf"]},"pythonIndentUnit":4},"notebookName":"10_eval-lf-medium-py3.11","widgets":{}},"colab":{"gpuType":"L4","provenance":[]},"kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.11.9"}},"nbformat":4,"nbformat_minor":0}
|
|
|
1 |
+
{"cells":[{"cell_type":"code","execution_count":1,"metadata":{"executionInfo":{"elapsed":476,"status":"ok","timestamp":1720679526275,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"uWKRSV6eZsCn"},"outputs":[],"source":["%load_ext autoreload\n","%autoreload 2"]},{"cell_type":"code","execution_count":2,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"eb33b19f-1206-41ee-84e2-e6258a12eef7","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":2534,"status":"ok","timestamp":1720679529344,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"xwFh14uiZBrI","outputId":"d767799c-34c2-46a5-f052-378146a55321"},"outputs":[],"source":["from pathlib import Path\n","\n","try:\n"," from google.colab import drive\n","\n"," drive.mount(\"/content/drive\")\n"," workding_dir = \"/content/drive/MyDrive/logical-reasoning/\"\n","except ModuleNotFoundError:\n"," workding_dir = str(Path.cwd().parent)"]},{"cell_type":"code","execution_count":3,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"6d394937-6c99-4a7c-9d32-7600a280032f","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":5,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"G5pNu3zgZBrL","outputId":"160a554f-fb08-4aa0-bc00-0422fb7c1fac"},"outputs":[{"name":"stdout","output_type":"stream","text":["workding dir: /home/inflaton/code/projects/courses/logical-reasoning\n"]}],"source":["import os\n","import sys\n","from pathlib import Path\n","\n","os.chdir(workding_dir)\n","sys.path.append(workding_dir)\n","print(\"workding dir:\", workding_dir)"]},{"cell_type":"code","execution_count":4,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"9f67ec60-2f24-411c-84eb-0dd664b44775","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":3,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"hPCC-6m7ZBrM","outputId":"c7aa2c96-5e99-440a-c148-201d79465ff9"},"outputs":[{"name":"stdout","output_type":"stream","text":["loading env vars from: /home/inflaton/code/projects/courses/logical-reasoning/.env\n"]},{"data":{"text/plain":["True"]},"execution_count":4,"metadata":{},"output_type":"execute_result"}],"source":["from dotenv import find_dotenv, load_dotenv\n","\n","found_dotenv = find_dotenv(\".env\")\n","\n","if len(found_dotenv) == 0:\n"," found_dotenv = find_dotenv(\".env.example\")\n","print(f\"loading env vars from: {found_dotenv}\")\n","load_dotenv(found_dotenv, override=True)"]},{"cell_type":"code","execution_count":5,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"f1597656-8042-4878-9d3b-9ebfb8dd86dc","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":3,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"1M3IraVtZBrM","outputId":"29ab35f6-2970-4ade-d85d-3174acf8cda0"},"outputs":[{"name":"stdout","output_type":"stream","text":["llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full None False datasets/mgtv results/mgtv-results_merged_model.csv\n"]}],"source":["import os\n","\n","model_name = os.getenv(\"MODEL_NAME\")\n","adapter_name_or_path = os.getenv(\"ADAPTER_NAME_OR_PATH\")\n","load_in_4bit = os.getenv(\"LOAD_IN_4BIT\") == \"true\"\n","data_path = os.getenv(\"LOGICAL_REASONING_DATA_PATH\")\n","results_path = os.getenv(\"LOGICAL_REASONING_RESULTS_PATH\")\n","use_english_datasets = os.getenv(\"USE_ENGLISH_DATASETS\") == \"true\"\n","\n","\n","print(model_name, adapter_name_or_path, load_in_4bit, data_path, results_path)"]},{"cell_type":"code","execution_count":6,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"b2a43943-9324-4839-9a47-cfa72de2244b","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":564,"status":"ok","timestamp":1720679529907,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"UgMvt6dIZBrM","outputId":"ce37581c-fd26-46c2-ad87-d933d99f68f7"},"outputs":[{"name":"stdout","output_type":"stream","text":["Python 3.11.9\n","\u001b[33mWARNING: Package(s) not found: flash-attn\u001b[0m\u001b[33m\n","\u001b[0mName: transformers\n","Version: 4.43.0.dev0\n","Summary: State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow\n","Home-page: https://github.com/huggingface/transformers\n","Author: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/transformers/graphs/contributors)\n","Author-email: transformers@huggingface.co\n","License: Apache 2.0 License\n","Location: /home/inflaton/miniconda3/envs/llama-factory/lib/python3.11/site-packages\n","Requires: filelock, huggingface-hub, numpy, packaging, pyyaml, regex, requests, safetensors, tokenizers, tqdm\n","Required-by: llamafactory, peft, trl, vllm\n","CPU times: user 25.6 ms, sys: 11.8 ms, total: 37.5 ms\n","Wall time: 2.03 s\n"]}],"source":["%%time\n","!python --version\n","!pip show flash-attn\n","!pip show transformers"]},{"cell_type":"code","execution_count":7,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":1685,"status":"ok","timestamp":1720679531591,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"ZuS_FsLyZBrN","outputId":"2cba0105-c505-4395-afbd-2f2fee6581d0"},"outputs":[{"name":"stdout","output_type":"stream","text":["loading /home/inflaton/code/projects/courses/logical-reasoning/llm_toolkit/logical_reasoning_utils.py\n","GPU is available\n"]}],"source":["from llm_toolkit.llm_utils import *\n","from llm_toolkit.logical_reasoning_utils import *\n","\n","device = check_gpu()"]},{"cell_type":"code","execution_count":8,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["loading model: llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full\n"]},{"name":"stderr","output_type":"stream","text":["Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n"]},{"data":{"application/vnd.jupyter.widget-view+json":{"model_id":"232f6d2d17d54aaca10c4a561860a590","version_major":2,"version_minor":0},"text/plain":["Loading checkpoint shards: 0%| | 0/8 [00:00<?, ?it/s]"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["WARNING:root:Some parameters are on the meta device device because they were offloaded to the cpu.\n"]},{"name":"stdout","output_type":"stream","text":["CPU times: user 22.7 s, sys: 612 ms, total: 23.3 s\n","Wall time: 26.6 s\n"]}],"source":["%%time\n","\n","model, tokenizer = load_model(model_name)"]},{"cell_type":"code","execution_count":9,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["loading train/test data files\n","DatasetDict({\n"," train: Dataset({\n"," features: ['text', 'label', 'answer', 'title', 'puzzle', 'truth', 'train_text', 'prompt'],\n"," num_rows: 25000\n"," })\n"," test: Dataset({\n"," features: ['text', 'label', 'answer', 'title', 'puzzle', 'truth', 'train_text', 'prompt'],\n"," num_rows: 3000\n"," })\n","})\n"]}],"source":["datasets = load_logical_reasoning_dataset(\n"," data_path,\n"," tokenizer=tokenizer,\n"," chinese_prompt=not use_english_datasets,\n"," using_p1=False,\n",")"]},{"cell_type":"code","execution_count":10,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["<s><|im_start|>system\n","You are an expert in logical reasoning.<|im_end|>\n","<|im_start|>user\n","你是一个情景猜谜游戏的主持人。游戏规则如下:\n","\n","1. 参与者会得到一个谜面,谜面会描述一个简单又难以理解的事件。\n","2. 主持人知道谜底,谜底是谜面的答案。\n","3. 参与者可以询问任何封闭式问题来找寻事件的真相。\n","4. 对于每个问题,主持人将根据实际情况回答以下五个选项之一:是、不是、不重要、回答正确、问法错误。各回答的判断标准如下:\n"," - 若谜面和谜底能找到问题的答案,回答:是或者不是\n"," - 若谜面和谜底不能直接或者间接推断出问题的答案,回答:不重要\n"," - 若参与者提问不是一个封闭式问题或者问题难以理解,回答:问法错误\n"," - 若参与者提问基本还原了谜底真相,回答:回答正确\n","5. 回答中不能添加任何其它信息,也不能省略选项中的任何一个字。例如,不可以把“不是”省略成“不”。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","**谜面:** 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","**谜底:** 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","\n","**参与者提出的问题:** 哭泣和村庄有关系吗\n","<|im_end|>\n","<|im_start|>assistant\n","\n","----------------------------------------\n","<s><s><|im_start|>system\n","You are an expert in logical reasoning.<|im_end|>\n","<|im_start|>user\n","你是一个情景猜谜游戏的主持人。游戏规则如下:\n","\n","1. 参与者会得到一个谜面,谜面会描述一个简单又难以理解的事件。\n","2. 主持人知道谜底,谜底是谜面的答案。\n","3. 参与者可以询问任何封闭式问题来找寻事件的真相。\n","4. 对于每个问题,主持人将根据实际情况回答以下五个选项之一:是、不是、不重要、回答正确、问法错误。各回答的判断标准如下:\n"," - 若谜面和谜底能找到问题的答案,回答:是或者不是\n"," - 若谜面和谜底不能直接或者间接推断出问题的答案,回答:不重要\n"," - 若参与者提问不是一个封闭式问题或者问题难以理解,回答:问法错误\n"," - 若参与者提问基本还原了谜底真相,回答:回答正确\n","5. 回答中不能添加任何其它信息,也不能省略选项中的任何一个字。例如,不可以把“不是”省略成“不”。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","**谜面:** 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","**谜底:** 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","\n","**参与者提出的问题:** 哭泣和村庄有关系吗\n","<|im_end|>\n","<|im_start|>assistant\n","是</s>\n","CPU times: user 4.4 s, sys: 282 ms, total: 4.69 s\n","Wall time: 5.39 s\n"]}],"source":["%%time\n","\n","prompt1 = datasets[\"test\"][\"prompt\"][1000]\n","print(prompt1)\n","print(\"--\" * 20)\n","test_model(model, tokenizer, prompt1, device=device)"]},{"cell_type":"code","execution_count":11,"metadata":{},"outputs":[{"name":"stderr","output_type":"stream","text":[" 12%|█▎ | 1/8 [00:01<00:11, 1.58s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 8/8 [00:12<00:00, 1.59s/it]"]},{"name":"stdout","output_type":"stream","text":["CPU times: user 12 s, sys: 272 ms, total: 12.2 s\n","Wall time: 13 s\n"]},{"name":"stderr","output_type":"stream","text":["\n"]},{"data":{"text/plain":["['不是', '是', '是', '是', '不是', '是', '不重要', '不是']"]},"execution_count":11,"metadata":{},"output_type":"execute_result"}],"source":["%%time\n","\n","eval_model(model, tokenizer, datasets[\"test\"][:10], device=device)"]},{"cell_type":"code","execution_count":12,"metadata":{"id":"L370pvGTZBrN"},"outputs":[],"source":["def evaluate_model(model, tokenizer, model_name, dataset):\n"," print(f\"Evaluating model: {model_name} on {device}\")\n"," predictions = eval_model(model, tokenizer, dataset, device=device)\n","\n"," model_name += \"_NV4080\"\n","\n"," save_results(\n"," model_name,\n"," results_path,\n"," dataset,\n"," predictions,\n"," debug=True,\n"," )\n","\n"," metrics = calc_metrics(dataset[\"label\"], predictions, debug=True)\n"," print(metrics)"]},{"cell_type":"code","execution_count":13,"metadata":{"id":"WUFjhxmiZBrN"},"outputs":[{"name":"stdout","output_type":"stream","text":["Evaluating model: llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full on cuda\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:01<1:17:37, 1.55s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [1:46:09<00:00, 2.12s/it]"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \n","0 不是 \n","{'accuracy': 0.785, 'incorrect_ids': [9, 24, 29, 34, 36, 55, 58, 59, 61, 65, 66, 67, 78, 81, 82, 83, 84, 88, 91, 93, 99, 103, 104, 106, 110, 112, 117, 121, 128, 129, 135, 138, 139, 143, 149, 150, 153, 155, 161, 164, 170, 173, 179, 190, 199, 200, 202, 218, 222, 224, 227, 228, 236, 245, 250, 252, 259, 260, 269, 271, 275, 276, 284, 286, 299, 304, 314, 317, 318, 323, 330, 334, 335, 337, 338, 346, 350, 353, 355, 356, 360, 361, 368, 370, 371, 373, 377, 383, 386, 389, 395, 397, 410, 414, 416, 428, 429, 430, 432, 438, 445, 447, 450, 452, 454, 456, 457, 458, 471, 472, 476, 479, 480, 488, 490, 492, 493, 494, 495, 497, 501, 502, 506, 507, 508, 510, 511, 514, 517, 518, 519, 520, 530, 536, 540, 560, 566, 570, 571, 579, 581, 589, 591, 593, 596, 597, 599, 601, 612, 613, 614, 621, 622, 625, 628, 632, 636, 643, 644, 647, 666, 671, 682, 690, 695, 702, 708, 720, 721, 727, 729, 730, 734, 740, 754, 758, 766, 770, 772, 774, 778, 788, 791, 794, 795, 798, 799, 801, 803, 805, 809, 817, 819, 820, 821, 823, 824, 826, 828, 837, 840, 844, 847, 856, 859, 861, 862, 866, 869, 870, 875, 884, 889, 890, 899, 904, 913, 927, 935, 937, 942, 945, 952, 962, 964, 966, 969, 970, 980, 989, 991, 994, 998, 1001, 1003, 1005, 1006, 1007, 1011, 1012, 1014, 1015, 1019, 1022, 1038, 1040, 1043, 1051, 1053, 1069, 1071, 1075, 1076, 1077, 1080, 1083, 1087, 1089, 1096, 1107, 1108, 1120, 1125, 1126, 1129, 1138, 1160, 1161, 1166, 1167, 1172, 1173, 1174, 1178, 1180, 1181, 1183, 1185, 1198, 1203, 1212, 1228, 1232, 1239, 1240, 1241, 1251, 1252, 1254, 1258, 1259, 1266, 1282, 1289, 1305, 1308, 1311, 1313, 1315, 1317, 1324, 1331, 1337, 1339, 1342, 1346, 1349, 1353, 1357, 1363, 1364, 1367, 1385, 1387, 1388, 1389, 1391, 1392, 1393, 1395, 1400, 1406, 1409, 1417, 1420, 1422, 1426, 1438, 1440, 1444, 1451, 1453, 1454, 1455, 1459, 1462, 1469, 1476, 1478, 1486, 1490, 1493, 1494, 1496, 1501, 1504, 1512, 1517, 1518, 1525, 1526, 1533, 1544, 1547, 1554, 1559, 1560, 1562, 1580, 1585, 1590, 1593, 1594, 1603, 1604, 1605, 1613, 1622, 1627, 1633, 1637, 1641, 1645, 1647, 1648, 1650, 1654, 1655, 1658, 1659, 1665, 1668, 1669, 1672, 1673, 1674, 1676, 1679, 1683, 1686, 1691, 1695, 1712, 1716, 1718, 1721, 1726, 1727, 1734, 1736, 1738, 1751, 1755, 1756, 1780, 1786, 1791, 1796, 1798, 1812, 1816, 1827, 1834, 1835, 1841, 1858, 1860, 1867, 1869, 1877, 1879, 1888, 1897, 1914, 1945, 1953, 1958, 1963, 1964, 1971, 1973, 1978, 1981, 1984, 1989, 1990, 1991, 1992, 1994, 1995, 2001, 2017, 2021, 2028, 2035, 2036, 2049, 2054, 2062, 2064, 2067, 2070, 2072, 2076, 2077, 2092, 2100, 2106, 2109, 2110, 2112, 2118, 2119, 2120, 2121, 2126, 2133, 2139, 2141, 2147, 2159, 2161, 2162, 2164, 2167, 2169, 2172, 2174, 2177, 2181, 2185, 2186, 2188, 2192, 2193, 2194, 2195, 2197, 2208, 2212, 2222, 2223, 2226, 2230, 2233, 2237, 2240, 2243, 2247, 2249, 2250, 2257, 2262, 2265, 2274, 2278, 2280, 2281, 2285, 2297, 2304, 2311, 2312, 2317, 2320, 2322, 2324, 2330, 2333, 2335, 2339, 2344, 2348, 2360, 2364, 2366, 2378, 2389, 2395, 2396, 2400, 2404, 2409, 2410, 2420, 2423, 2425, 2429, 2437, 2440, 2442, 2454, 2463, 2469, 2484, 2488, 2491, 2511, 2512, 2515, 2517, 2522, 2529, 2530, 2532, 2535, 2538, 2539, 2546, 2547, 2548, 2549, 2555, 2556, 2559, 2560, 2562, 2574, 2575, 2589, 2590, 2602, 2616, 2624, 2626, 2629, 2632, 2644, 2660, 2663, 2667, 2676, 2678, 2691, 2707, 2714, 2716, 2731, 2736, 2742, 2744, 2745, 2746, 2749, 2754, 2757, 2762, 2764, 2766, 2777, 2788, 2791, 2797, 2798, 2801, 2803, 2806, 2807, 2812, 2815, 2816, 2820, 2823, 2837, 2843, 2845, 2854, 2857, 2860, 2861, 2877, 2880, 2882, 2884, 2888, 2899, 2902, 2905, 2912, 2913, 2915, 2916, 2921, 2927, 2933, 2938, 2939, 2944, 2949, 2953, 2977, 2979, 2985, 2995, 2998]}\n","CPU times: user 1h 38min 39s, sys: 4min 13s, total: 1h 42min 53s\n","Wall time: 1h 46min 10s\n"]},{"name":"stderr","output_type":"stream","text":["\n"]}],"source":["%%time\n","\n","evaluate_model(model, tokenizer, model_name, datasets[\"test\"])"]},{"cell_type":"code","execution_count":9,"metadata":{},"outputs":[{"data":{"text/plain":["InternLM2ForCausalLM(\n"," (model): InternLM2Model(\n"," (tok_embeddings): Embedding(92544, 4096, padding_idx=2)\n"," (layers): ModuleList(\n"," (0-31): 32 x InternLM2DecoderLayer(\n"," (attention): InternLM2Attention(\n"," (wqkv): Linear(in_features=4096, out_features=6144, bias=False)\n"," (wo): Linear(in_features=4096, out_features=4096, bias=False)\n"," (rotary_emb): InternLM2DynamicNTKScalingRotaryEmbedding()\n"," )\n"," (feed_forward): InternLM2MLP(\n"," (w1): Linear(in_features=4096, out_features=14336, bias=False)\n"," (w3): Linear(in_features=4096, out_features=14336, bias=False)\n"," (w2): Linear(in_features=14336, out_features=4096, bias=False)\n"," (act_fn): SiLU()\n"," )\n"," (attention_norm): InternLM2RMSNorm()\n"," (ffn_norm): InternLM2RMSNorm()\n"," )\n"," )\n"," (norm): InternLM2RMSNorm()\n"," )\n"," (output): Linear(in_features=4096, out_features=92544, bias=False)\n",")"]},"execution_count":9,"metadata":{},"output_type":"execute_result"}],"source":["model"]},{"cell_type":"code","execution_count":18,"metadata":{},"outputs":[{"data":{"application/vnd.jupyter.widget-view+json":{"model_id":"6a50e42e5c134c7c9c0f5deca2af4eaf","version_major":2,"version_minor":0},"text/plain":["tokenizer.model: 0%| | 0.00/1.48M [00:00<?, ?B/s]"]},"metadata":{},"output_type":"display_data"},{"data":{"text/plain":["CommitInfo(commit_url='https://huggingface.co/inflaton/InternLM_2_5-7b_LR/commit/a2e57c3c7df9bf78d195b4d93f31fef5c0bb774a', commit_message='Upload tokenizer', commit_description='', oid='a2e57c3c7df9bf78d195b4d93f31fef5c0bb774a', pr_url=None, pr_revision=None, pr_num=None)"]},"execution_count":18,"metadata":{},"output_type":"execute_result"}],"source":["tokenizer.push_to_hub(\"inflaton/InternLM_2_5-7b_LR\")"]}],"metadata":{"accelerator":"GPU","application/vnd.databricks.v1+notebook":{"dashboards":[],"environmentMetadata":null,"language":"python","notebookMetadata":{"mostRecentlyExecutedCommandWithImplicitDF":{"commandId":-1,"dataframes":["_sqldf"]},"pythonIndentUnit":4},"notebookName":"10_eval-lf-medium-py3.11","widgets":{}},"colab":{"gpuType":"L4","provenance":[]},"kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.11.9"}},"nbformat":4,"nbformat_minor":0}
|
competition/12rp1.0_InterLM_Merged_Model_NV4080.ipynb
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"cells":[{"cell_type":"code","execution_count":1,"metadata":{"executionInfo":{"elapsed":476,"status":"ok","timestamp":1720679526275,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"uWKRSV6eZsCn"},"outputs":[],"source":["%load_ext autoreload\n","%autoreload 2"]},{"cell_type":"code","execution_count":2,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"eb33b19f-1206-41ee-84e2-e6258a12eef7","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":2534,"status":"ok","timestamp":1720679529344,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"xwFh14uiZBrI","outputId":"d767799c-34c2-46a5-f052-378146a55321"},"outputs":[],"source":["from pathlib import Path\n","\n","try:\n"," from google.colab import drive\n","\n"," drive.mount(\"/content/drive\")\n"," workding_dir = \"/content/drive/MyDrive/logical-reasoning/\"\n","except ModuleNotFoundError:\n"," workding_dir = str(Path.cwd().parent)"]},{"cell_type":"code","execution_count":3,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"6d394937-6c99-4a7c-9d32-7600a280032f","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":5,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"G5pNu3zgZBrL","outputId":"160a554f-fb08-4aa0-bc00-0422fb7c1fac"},"outputs":[{"name":"stdout","output_type":"stream","text":["workding dir: /home/inflaton/code/projects/courses/logical-reasoning\n"]}],"source":["import os\n","import sys\n","from pathlib import Path\n","\n","os.chdir(workding_dir)\n","sys.path.append(workding_dir)\n","print(\"workding dir:\", workding_dir)"]},{"cell_type":"code","execution_count":4,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"9f67ec60-2f24-411c-84eb-0dd664b44775","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":3,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"hPCC-6m7ZBrM","outputId":"c7aa2c96-5e99-440a-c148-201d79465ff9"},"outputs":[{"name":"stdout","output_type":"stream","text":["loading env vars from: /home/inflaton/code/projects/courses/logical-reasoning/.env\n"]},{"data":{"text/plain":["True"]},"execution_count":4,"metadata":{},"output_type":"execute_result"}],"source":["from dotenv import find_dotenv, load_dotenv\n","\n","found_dotenv = find_dotenv(\".env\")\n","\n","if len(found_dotenv) == 0:\n"," found_dotenv = find_dotenv(\".env.example\")\n","print(f\"loading env vars from: {found_dotenv}\")\n","load_dotenv(found_dotenv, override=True)"]},{"cell_type":"code","execution_count":5,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"f1597656-8042-4878-9d3b-9ebfb8dd86dc","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":3,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"1M3IraVtZBrM","outputId":"29ab35f6-2970-4ade-d85d-3174acf8cda0"},"outputs":[{"name":"stdout","output_type":"stream","text":["llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full None False datasets/mgtv results/mgtv-results_merged_model.csv\n"]}],"source":["import os\n","\n","model_name = os.getenv(\"MODEL_NAME\")\n","adapter_name_or_path = os.getenv(\"ADAPTER_NAME_OR_PATH\")\n","load_in_4bit = os.getenv(\"LOAD_IN_4BIT\") == \"true\"\n","data_path = os.getenv(\"LOGICAL_REASONING_DATA_PATH\")\n","results_path = os.getenv(\"LOGICAL_REASONING_RESULTS_PATH\")\n","use_english_datasets = os.getenv(\"USE_ENGLISH_DATASETS\") == \"true\"\n","\n","\n","print(model_name, adapter_name_or_path, load_in_4bit, data_path, results_path)"]},{"cell_type":"code","execution_count":6,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"b2a43943-9324-4839-9a47-cfa72de2244b","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":564,"status":"ok","timestamp":1720679529907,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"UgMvt6dIZBrM","outputId":"ce37581c-fd26-46c2-ad87-d933d99f68f7"},"outputs":[{"name":"stdout","output_type":"stream","text":["Python 3.11.9\n","\u001b[33mWARNING: Package(s) not found: flash-attn\u001b[0m\u001b[33m\n","\u001b[0mName: transformers\n","Version: 4.43.0.dev0\n","Summary: State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow\n","Home-page: https://github.com/huggingface/transformers\n","Author: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/transformers/graphs/contributors)\n","Author-email: transformers@huggingface.co\n","License: Apache 2.0 License\n","Location: /home/inflaton/miniconda3/envs/llama-factory/lib/python3.11/site-packages\n","Requires: filelock, huggingface-hub, numpy, packaging, pyyaml, regex, requests, safetensors, tokenizers, tqdm\n","Required-by: llamafactory, peft, trl, vllm\n","CPU times: user 13.4 ms, sys: 20.3 ms, total: 33.6 ms\n","Wall time: 1.8 s\n"]}],"source":["%%time\n","!python --version\n","!pip show flash-attn\n","!pip show transformers"]},{"cell_type":"code","execution_count":7,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":1685,"status":"ok","timestamp":1720679531591,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"ZuS_FsLyZBrN","outputId":"2cba0105-c505-4395-afbd-2f2fee6581d0"},"outputs":[{"name":"stdout","output_type":"stream","text":["loading /home/inflaton/code/projects/courses/logical-reasoning/llm_toolkit/logical_reasoning_utils.py\n","GPU is available\n"]}],"source":["from llm_toolkit.llm_utils import *\n","from llm_toolkit.logical_reasoning_utils import *\n","\n","device = check_gpu()"]},{"cell_type":"code","execution_count":8,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["loading model: llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full\n"]},{"name":"stderr","output_type":"stream","text":["Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n"]},{"data":{"application/vnd.jupyter.widget-view+json":{"model_id":"9aa3d552704944d2bf97814c9e5ddcbf","version_major":2,"version_minor":0},"text/plain":["Loading checkpoint shards: 0%| | 0/8 [00:00<?, ?it/s]"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["WARNING:root:Some parameters are on the meta device device because they were offloaded to the cpu.\n"]},{"name":"stdout","output_type":"stream","text":["CPU times: user 1min 43s, sys: 917 ms, total: 1min 44s\n","Wall time: 1min 58s\n"]}],"source":["%%time\n","\n","model, tokenizer = load_model(model_name)"]},{"cell_type":"code","execution_count":9,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["loading train/test data files\n","DatasetDict({\n"," train: Dataset({\n"," features: ['text', 'label', 'answer', 'title', 'puzzle', 'truth', 'train_text', 'prompt'],\n"," num_rows: 25000\n"," })\n"," test: Dataset({\n"," features: ['text', 'label', 'answer', 'title', 'puzzle', 'truth', 'train_text', 'prompt'],\n"," num_rows: 3000\n"," })\n","})\n"]}],"source":["datasets = load_logical_reasoning_dataset(\n"," data_path,\n"," tokenizer=tokenizer,\n"," chinese_prompt=not use_english_datasets,\n"," using_p1=False,\n",")"]},{"cell_type":"code","execution_count":10,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["<s><|im_start|>system\n","You are an expert in logical reasoning.<|im_end|>\n","<|im_start|>user\n","你是一个情景猜谜游戏的主持人。游戏规则如下:\n","\n","1. 参与者会得到一个谜面,谜面会描述一个简单又难以理解的事件。\n","2. 主持人知道谜底,谜底是谜面的答案。\n","3. 参与者可以询问任何封闭式问题来找寻事件的真相。\n","4. 对于每个问题,主持人将根据实际情况回答以下五个选项之一:是、不是、不重要、回答正确、问法错误。各回答的判断标准如下:\n"," - 若谜面和谜底能找到问题的答案,回答:是或者不是\n"," - 若谜面和谜底不能直接或者间接推断出问题的答案,回答:不重要\n"," - 若参与者提问不是一个封闭式问题或者问题难以理解,回答:问法错误\n"," - 若参与者提问基本还原了谜底真相,回答:回答正确\n","5. 回答中不能添加任何其它信息,也不能省略选项中的任何一个字。例如,不可以把“不是”省略成“不”。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","**谜面:** 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","**谜底:** 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲���的爷爷。\n","\n","**参与者提出的问题:** 哭泣和村庄有关系吗\n","<|im_end|>\n","<|im_start|>assistant\n","\n","----------------------------------------\n","<s><s><|im_start|>system\n","You are an expert in logical reasoning.<|im_end|>\n","<|im_start|>user\n","你是一个情景猜谜游戏的主持人。游戏规则如下:\n","\n","1. 参与者会得到一个谜面,谜面会描述一个简单又难以理解的事件。\n","2. 主持人知道谜底,谜底是谜面的答案。\n","3. 参与者可以询问任何封闭式问题来找寻事件的真相。\n","4. 对于每个问题,主持人将根据实际情况回答以下五个选项之一:是、不是、不重要、回答正确、问法错误。各回答的判断标准如下:\n"," - 若谜面和谜底能找到问题的答案,回答:是或者不是\n"," - 若谜面和谜底不能直接或者间接推断出问题的答案,回答:不重要\n"," - 若参与者提问不是一个封闭式问题或者问题难以理解,回答:问法错误\n"," - 若参与者提问基本还原了谜底真相,回答:回答正确\n","5. 回答中不能添加任何其它信息,也不能省略选项中的任何一个字。例如,不可以把“不是”省略成“不”。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","**谜面:** 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","**谜底:** 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","\n","**参与者提出的问题:** 哭泣和村庄有关系吗\n","<|im_end|>\n","<|im_start|>assistant\n","是</s>\n","CPU times: user 2.86 s, sys: 422 ms, total: 3.29 s\n","Wall time: 4.5 s\n"]}],"source":["%%time\n","\n","prompt1 = datasets[\"test\"][\"prompt\"][1000]\n","print(prompt1)\n","print(\"--\" * 20)\n","test_model(model, tokenizer, prompt1, device=device)"]},{"cell_type":"code","execution_count":11,"metadata":{},"outputs":[{"name":"stderr","output_type":"stream","text":[" 12%|█▎ | 1/8 [00:01<00:11, 1.62s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 8/8 [00:12<00:00, 1.52s/it]"]},{"name":"stdout","output_type":"stream","text":["CPU times: user 11.3 s, sys: 386 ms, total: 11.7 s\n","Wall time: 12.2 s\n"]},{"name":"stderr","output_type":"stream","text":["\n"]},{"data":{"text/plain":["['不是', '是', '是', '是', '不是', '是', '不重要', '不是']"]},"execution_count":11,"metadata":{},"output_type":"execute_result"}],"source":["%%time\n","\n","eval_model(model, tokenizer, datasets[\"test\"][:10], device=device, repetition_penalty=1.0)"]},{"cell_type":"code","execution_count":14,"metadata":{"id":"L370pvGTZBrN"},"outputs":[],"source":["def evaluate_model(model, tokenizer, model_name, dataset):\n"," print(f\"Evaluating model: {model_name} on {device}\")\n"," predictions = eval_model(\n"," model, tokenizer, dataset, device=device, repetition_penalty=1.0\n"," )\n","\n"," model_name += \"_NV4080_rp1.0\"\n","\n"," save_results(\n"," model_name,\n"," results_path,\n"," dataset,\n"," predictions,\n"," debug=True,\n"," )\n","\n"," metrics = calc_metrics(dataset[\"label\"], predictions, debug=True)\n"," print(metrics)"]},{"cell_type":"code","execution_count":18,"metadata":{},"outputs":[{"data":{"text/plain":["' 1.01'"]},"execution_count":18,"metadata":{},"output_type":"execute_result"}],"source":["repetition_penalty = 1.01\n","f\"{repetition_penalty: .2f}\""]},{"cell_type":"code","execution_count":15,"metadata":{"id":"WUFjhxmiZBrN"},"outputs":[{"name":"stdout","output_type":"stream","text":["Evaluating model: llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full on cuda\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:01<1:23:59, 1.68s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [1:47:43<00:00, 2.15s/it] \n"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.1 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.0 \n","0 不是 \n","{'accuracy': 0.785, 'incorrect_ids': [9, 24, 29, 34, 36, 55, 58, 59, 61, 65, 66, 67, 78, 81, 82, 83, 84, 88, 91, 93, 99, 103, 104, 106, 110, 112, 117, 121, 128, 129, 135, 138, 139, 143, 149, 150, 153, 155, 161, 164, 170, 173, 179, 190, 199, 200, 202, 218, 222, 224, 227, 228, 236, 245, 250, 252, 259, 260, 269, 271, 275, 276, 284, 286, 299, 304, 314, 317, 318, 323, 330, 334, 335, 337, 338, 346, 350, 353, 355, 356, 360, 361, 368, 370, 371, 373, 377, 383, 386, 389, 395, 397, 410, 414, 416, 428, 429, 430, 432, 438, 445, 447, 450, 452, 454, 456, 457, 458, 471, 472, 476, 479, 480, 488, 490, 492, 493, 494, 495, 497, 501, 502, 506, 507, 508, 510, 511, 514, 517, 518, 519, 520, 530, 536, 540, 560, 566, 570, 571, 579, 581, 589, 591, 593, 596, 597, 599, 601, 612, 613, 614, 621, 622, 625, 628, 632, 636, 643, 644, 647, 666, 671, 682, 690, 695, 702, 708, 720, 721, 727, 729, 730, 734, 740, 754, 758, 766, 770, 772, 774, 778, 788, 791, 794, 795, 798, 799, 801, 803, 805, 809, 817, 819, 820, 821, 823, 824, 826, 828, 837, 840, 844, 847, 856, 859, 861, 862, 866, 869, 870, 875, 884, 889, 890, 899, 904, 913, 927, 935, 937, 942, 945, 952, 962, 964, 966, 969, 970, 980, 989, 991, 994, 998, 1001, 1003, 1005, 1006, 1007, 1011, 1012, 1014, 1015, 1019, 1022, 1038, 1040, 1043, 1051, 1053, 1069, 1071, 1075, 1076, 1077, 1080, 1083, 1087, 1089, 1096, 1107, 1108, 1120, 1125, 1126, 1129, 1138, 1160, 1161, 1166, 1167, 1172, 1173, 1174, 1178, 1180, 1181, 1183, 1185, 1198, 1203, 1212, 1228, 1232, 1239, 1240, 1241, 1251, 1252, 1254, 1258, 1259, 1266, 1282, 1289, 1305, 1308, 1311, 1313, 1315, 1317, 1324, 1331, 1337, 1339, 1342, 1346, 1349, 1353, 1357, 1363, 1364, 1367, 1385, 1387, 1388, 1389, 1391, 1392, 1393, 1395, 1400, 1406, 1409, 1417, 1420, 1422, 1426, 1438, 1440, 1444, 1451, 1453, 1454, 1455, 1459, 1462, 1469, 1476, 1478, 1486, 1490, 1493, 1494, 1496, 1501, 1504, 1512, 1517, 1518, 1525, 1526, 1533, 1544, 1547, 1554, 1559, 1560, 1562, 1580, 1585, 1590, 1593, 1594, 1603, 1604, 1605, 1613, 1622, 1627, 1633, 1637, 1641, 1645, 1647, 1648, 1650, 1654, 1655, 1658, 1659, 1665, 1668, 1669, 1672, 1673, 1674, 1676, 1679, 1683, 1686, 1691, 1695, 1712, 1716, 1718, 1721, 1726, 1727, 1734, 1736, 1738, 1751, 1755, 1756, 1780, 1786, 1791, 1796, 1798, 1812, 1816, 1827, 1834, 1835, 1841, 1858, 1860, 1867, 1869, 1877, 1879, 1888, 1897, 1914, 1945, 1953, 1958, 1963, 1964, 1971, 1973, 1978, 1981, 1984, 1989, 1990, 1991, 1992, 1994, 1995, 2001, 2017, 2021, 2028, 2035, 2036, 2049, 2054, 2062, 2064, 2067, 2070, 2072, 2076, 2077, 2092, 2100, 2106, 2109, 2110, 2112, 2118, 2119, 2120, 2121, 2126, 2133, 2139, 2141, 2147, 2159, 2161, 2162, 2164, 2167, 2169, 2172, 2174, 2177, 2181, 2185, 2186, 2188, 2192, 2193, 2194, 2195, 2197, 2208, 2212, 2222, 2223, 2226, 2230, 2233, 2237, 2240, 2243, 2247, 2249, 2250, 2257, 2262, 2265, 2274, 2278, 2280, 2281, 2285, 2297, 2304, 2311, 2312, 2317, 2320, 2322, 2324, 2330, 2333, 2335, 2339, 2344, 2348, 2360, 2364, 2366, 2378, 2389, 2395, 2396, 2400, 2404, 2409, 2410, 2420, 2423, 2425, 2429, 2437, 2440, 2442, 2454, 2463, 2469, 2484, 2488, 2491, 2511, 2512, 2515, 2517, 2522, 2529, 2530, 2532, 2535, 2538, 2539, 2546, 2547, 2548, 2549, 2555, 2556, 2559, 2560, 2562, 2574, 2575, 2589, 2590, 2602, 2616, 2624, 2626, 2629, 2632, 2644, 2660, 2663, 2667, 2676, 2678, 2691, 2707, 2714, 2716, 2731, 2736, 2742, 2744, 2745, 2746, 2749, 2754, 2757, 2762, 2764, 2766, 2777, 2788, 2791, 2797, 2798, 2801, 2803, 2806, 2807, 2812, 2815, 2816, 2820, 2823, 2837, 2843, 2845, 2854, 2857, 2860, 2861, 2877, 2880, 2882, 2884, 2888, 2899, 2902, 2905, 2912, 2913, 2915, 2916, 2921, 2927, 2933, 2938, 2939, 2944, 2949, 2953, 2977, 2979, 2985, 2995, 2998]}\n","CPU times: user 1h 39min 51s, sys: 4min 12s, total: 1h 44min 3s\n","Wall time: 1h 47min 44s\n"]}],"source":["%%time\n","\n","evaluate_model(model, tokenizer, model_name, datasets[\"test\"])"]},{"cell_type":"code","execution_count":19,"metadata":{},"outputs":[],"source":["import numpy as np\n","\n","\n","def evaluate_model_with_repetition_penalty(\n"," model,\n"," tokenizer,\n"," model_name,\n"," dataset,\n"," start_repetition_penalty=1.01,\n"," end_repetition_penalty=1.09,\n"," step_repetition_penalty=0.01,\n","):\n"," print(f\"Evaluating model: {model_name} on {device}\")\n","\n"," for repetition_penalty in np.arange(\n"," start_repetition_penalty,\n"," end_repetition_penalty + step_repetition_penalty,\n"," step_repetition_penalty,\n"," ):\n"," print(f\"*** Evaluating with repetition_penalty: {repetition_penalty}\")\n"," predictions = eval_model(\n"," model,\n"," tokenizer,\n"," dataset,\n"," device=device,\n"," repetition_penalty=repetition_penalty,\n"," )\n","\n"," model_name_with_rp = f\"{model_name}_NV4080_rp{repetition_penalty}\"\n","\n"," save_results(\n"," model_name_with_rp,\n"," results_path,\n"," dataset,\n"," predictions,\n"," debug=True,\n"," )\n","\n"," metrics = calc_metrics(dataset[\"label\"], predictions, debug=True)\n"," print(metrics)"]},{"cell_type":"code","execution_count":20,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["Evaluating model: llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full on cuda\n","*** Evaluating with repetition_penalty: 1.01\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:01<1:33:41, 1.87s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [1:51:19<00:00, 2.23s/it] \n"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.1 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.0 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.01 \n","0 不是 \n","{'accuracy': 0.785, 'incorrect_ids': [9, 24, 29, 34, 36, 55, 58, 59, 61, 65, 66, 67, 78, 81, 82, 83, 84, 88, 91, 93, 99, 103, 104, 106, 110, 112, 117, 121, 128, 129, 135, 138, 139, 143, 149, 150, 153, 155, 161, 164, 170, 173, 179, 190, 199, 200, 202, 218, 222, 224, 227, 228, 236, 245, 250, 252, 259, 260, 269, 271, 275, 276, 284, 286, 299, 304, 314, 317, 318, 323, 330, 334, 335, 337, 338, 346, 350, 353, 355, 356, 360, 361, 368, 370, 371, 373, 377, 383, 386, 389, 395, 397, 410, 414, 416, 428, 429, 430, 432, 438, 445, 447, 450, 452, 454, 456, 457, 458, 471, 472, 476, 479, 480, 488, 490, 492, 493, 494, 495, 497, 501, 502, 506, 507, 508, 510, 511, 514, 517, 518, 519, 520, 530, 536, 540, 560, 566, 570, 571, 579, 581, 589, 591, 593, 596, 597, 599, 601, 612, 613, 614, 621, 622, 625, 628, 632, 636, 643, 644, 647, 666, 671, 682, 690, 695, 702, 708, 720, 721, 727, 729, 730, 734, 740, 754, 758, 766, 770, 772, 774, 778, 788, 791, 794, 795, 798, 799, 801, 803, 805, 809, 817, 819, 820, 821, 823, 824, 826, 828, 837, 840, 844, 847, 856, 859, 861, 862, 866, 869, 870, 875, 884, 889, 890, 899, 904, 913, 927, 935, 937, 942, 945, 952, 962, 964, 966, 969, 970, 980, 989, 991, 994, 998, 1001, 1003, 1005, 1006, 1007, 1011, 1012, 1014, 1015, 1019, 1022, 1038, 1040, 1043, 1051, 1053, 1069, 1071, 1075, 1076, 1077, 1080, 1083, 1087, 1089, 1096, 1107, 1108, 1120, 1125, 1126, 1129, 1138, 1160, 1161, 1166, 1167, 1172, 1173, 1174, 1178, 1180, 1181, 1183, 1185, 1198, 1203, 1212, 1228, 1232, 1239, 1240, 1241, 1251, 1252, 1254, 1258, 1259, 1266, 1282, 1289, 1305, 1308, 1311, 1313, 1315, 1317, 1324, 1331, 1337, 1339, 1342, 1346, 1349, 1353, 1357, 1363, 1364, 1367, 1385, 1387, 1388, 1389, 1391, 1392, 1393, 1395, 1400, 1406, 1409, 1417, 1420, 1422, 1426, 1438, 1440, 1444, 1451, 1453, 1454, 1455, 1459, 1462, 1469, 1476, 1478, 1486, 1490, 1493, 1494, 1496, 1501, 1504, 1512, 1517, 1518, 1525, 1526, 1533, 1544, 1547, 1554, 1559, 1560, 1562, 1580, 1585, 1590, 1593, 1594, 1603, 1604, 1605, 1613, 1622, 1627, 1633, 1637, 1641, 1645, 1647, 1648, 1650, 1654, 1655, 1658, 1659, 1665, 1668, 1669, 1672, 1673, 1674, 1676, 1679, 1683, 1686, 1691, 1695, 1712, 1716, 1718, 1721, 1726, 1727, 1734, 1736, 1738, 1751, 1755, 1756, 1780, 1786, 1791, 1796, 1798, 1812, 1816, 1827, 1834, 1835, 1841, 1858, 1860, 1867, 1869, 1877, 1879, 1888, 1897, 1914, 1945, 1953, 1958, 1963, 1964, 1971, 1973, 1978, 1981, 1984, 1989, 1990, 1991, 1992, 1994, 1995, 2001, 2017, 2021, 2028, 2035, 2036, 2049, 2054, 2062, 2064, 2067, 2070, 2072, 2076, 2077, 2092, 2100, 2106, 2109, 2110, 2112, 2118, 2119, 2120, 2121, 2126, 2133, 2139, 2141, 2147, 2159, 2161, 2162, 2164, 2167, 2169, 2172, 2174, 2177, 2181, 2185, 2186, 2188, 2192, 2193, 2194, 2195, 2197, 2208, 2212, 2222, 2223, 2226, 2230, 2233, 2237, 2240, 2243, 2247, 2249, 2250, 2257, 2262, 2265, 2274, 2278, 2280, 2281, 2285, 2297, 2304, 2311, 2312, 2317, 2320, 2322, 2324, 2330, 2333, 2335, 2339, 2344, 2348, 2360, 2364, 2366, 2378, 2389, 2395, 2396, 2400, 2404, 2409, 2410, 2420, 2423, 2425, 2429, 2437, 2440, 2442, 2454, 2463, 2469, 2484, 2488, 2491, 2511, 2512, 2515, 2517, 2522, 2529, 2530, 2532, 2535, 2538, 2539, 2546, 2547, 2548, 2549, 2555, 2556, 2559, 2560, 2562, 2574, 2575, 2589, 2590, 2602, 2616, 2624, 2626, 2629, 2632, 2644, 2660, 2663, 2667, 2676, 2678, 2691, 2707, 2714, 2716, 2731, 2736, 2742, 2744, 2745, 2746, 2749, 2754, 2757, 2762, 2764, 2766, 2777, 2788, 2791, 2797, 2798, 2801, 2803, 2806, 2807, 2812, 2815, 2816, 2820, 2823, 2837, 2843, 2845, 2854, 2857, 2860, 2861, 2877, 2880, 2882, 2884, 2888, 2899, 2902, 2905, 2912, 2913, 2915, 2916, 2921, 2927, 2933, 2938, 2939, 2944, 2949, 2953, 2977, 2979, 2985, 2995, 2998]}\n","*** Evaluating with repetition_penalty: 1.02\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:02<2:16:04, 2.72s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [1:54:26<00:00, 2.29s/it] \n"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.1 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.0 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.01 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.02 \n","0 不是 \n","{'accuracy': 0.785, 'incorrect_ids': [9, 24, 29, 34, 36, 55, 58, 59, 61, 65, 66, 67, 78, 81, 82, 83, 84, 88, 91, 93, 99, 103, 104, 106, 110, 112, 117, 121, 128, 129, 135, 138, 139, 143, 149, 150, 153, 155, 161, 164, 170, 173, 179, 190, 199, 200, 202, 218, 222, 224, 227, 228, 236, 245, 250, 252, 259, 260, 269, 271, 275, 276, 284, 286, 299, 304, 314, 317, 318, 323, 330, 334, 335, 337, 338, 346, 350, 353, 355, 356, 360, 361, 368, 370, 371, 373, 377, 383, 386, 389, 395, 397, 410, 414, 416, 428, 429, 430, 432, 438, 445, 447, 450, 452, 454, 456, 457, 458, 471, 472, 476, 479, 480, 488, 490, 492, 493, 494, 495, 497, 501, 502, 506, 507, 508, 510, 511, 514, 517, 518, 519, 520, 530, 536, 540, 560, 566, 570, 571, 579, 581, 589, 591, 593, 596, 597, 599, 601, 612, 613, 614, 621, 622, 625, 628, 632, 636, 643, 644, 647, 666, 671, 682, 690, 695, 702, 708, 720, 721, 727, 729, 730, 734, 740, 754, 758, 766, 770, 772, 774, 778, 788, 791, 794, 795, 798, 799, 801, 803, 805, 809, 817, 819, 820, 821, 823, 824, 826, 828, 837, 840, 844, 847, 856, 859, 861, 862, 866, 869, 870, 875, 884, 889, 890, 899, 904, 913, 927, 935, 937, 942, 945, 952, 962, 964, 966, 969, 970, 980, 989, 991, 994, 998, 1001, 1003, 1005, 1006, 1007, 1011, 1012, 1014, 1015, 1019, 1022, 1038, 1040, 1043, 1051, 1053, 1069, 1071, 1075, 1076, 1077, 1080, 1083, 1087, 1089, 1096, 1107, 1108, 1120, 1125, 1126, 1129, 1138, 1160, 1161, 1166, 1167, 1172, 1173, 1174, 1178, 1180, 1181, 1183, 1185, 1198, 1203, 1212, 1228, 1232, 1239, 1240, 1241, 1251, 1252, 1254, 1258, 1259, 1266, 1282, 1289, 1305, 1308, 1311, 1313, 1315, 1317, 1324, 1331, 1337, 1339, 1342, 1346, 1349, 1353, 1357, 1363, 1364, 1367, 1385, 1387, 1388, 1389, 1391, 1392, 1393, 1395, 1400, 1406, 1409, 1417, 1420, 1422, 1426, 1438, 1440, 1444, 1451, 1453, 1454, 1455, 1459, 1462, 1469, 1476, 1478, 1486, 1490, 1493, 1494, 1496, 1501, 1504, 1512, 1517, 1518, 1525, 1526, 1533, 1544, 1547, 1554, 1559, 1560, 1562, 1580, 1585, 1590, 1593, 1594, 1603, 1604, 1605, 1613, 1622, 1627, 1633, 1637, 1641, 1645, 1647, 1648, 1650, 1654, 1655, 1658, 1659, 1665, 1668, 1669, 1672, 1673, 1674, 1676, 1679, 1683, 1686, 1691, 1695, 1712, 1716, 1718, 1721, 1726, 1727, 1734, 1736, 1738, 1751, 1755, 1756, 1780, 1786, 1791, 1796, 1798, 1812, 1816, 1827, 1834, 1835, 1841, 1858, 1860, 1867, 1869, 1877, 1879, 1888, 1897, 1914, 1945, 1953, 1958, 1963, 1964, 1971, 1973, 1978, 1981, 1984, 1989, 1990, 1991, 1992, 1994, 1995, 2001, 2017, 2021, 2028, 2035, 2036, 2049, 2054, 2062, 2064, 2067, 2070, 2072, 2076, 2077, 2092, 2100, 2106, 2109, 2110, 2112, 2118, 2119, 2120, 2121, 2126, 2133, 2139, 2141, 2147, 2159, 2161, 2162, 2164, 2167, 2169, 2172, 2174, 2177, 2181, 2185, 2186, 2188, 2192, 2193, 2194, 2195, 2197, 2208, 2212, 2222, 2223, 2226, 2230, 2233, 2237, 2240, 2243, 2247, 2249, 2250, 2257, 2262, 2265, 2274, 2278, 2280, 2281, 2285, 2297, 2304, 2311, 2312, 2317, 2320, 2322, 2324, 2330, 2333, 2335, 2339, 2344, 2348, 2360, 2364, 2366, 2378, 2389, 2395, 2396, 2400, 2404, 2409, 2410, 2420, 2423, 2425, 2429, 2437, 2440, 2442, 2454, 2463, 2469, 2484, 2488, 2491, 2511, 2512, 2515, 2517, 2522, 2529, 2530, 2532, 2535, 2538, 2539, 2546, 2547, 2548, 2549, 2555, 2556, 2559, 2560, 2562, 2574, 2575, 2589, 2590, 2602, 2616, 2624, 2626, 2629, 2632, 2644, 2660, 2663, 2667, 2676, 2678, 2691, 2707, 2714, 2716, 2731, 2736, 2742, 2744, 2745, 2746, 2749, 2754, 2757, 2762, 2764, 2766, 2777, 2788, 2791, 2797, 2798, 2801, 2803, 2806, 2807, 2812, 2815, 2816, 2820, 2823, 2837, 2843, 2845, 2854, 2857, 2860, 2861, 2877, 2880, 2882, 2884, 2888, 2899, 2902, 2905, 2912, 2913, 2915, 2916, 2921, 2927, 2933, 2938, 2939, 2944, 2949, 2953, 2977, 2979, 2985, 2995, 2998]}\n","*** Evaluating with repetition_penalty: 1.03\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:01<1:26:01, 1.72s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [1:54:48<00:00, 2.30s/it] \n"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.1 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.0 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.01 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.02 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.03 \n","0 不是 \n","{'accuracy': 0.785, 'incorrect_ids': [9, 24, 29, 34, 36, 55, 58, 59, 61, 65, 66, 67, 78, 81, 82, 83, 84, 88, 91, 93, 99, 103, 104, 106, 110, 112, 117, 121, 128, 129, 135, 138, 139, 143, 149, 150, 153, 155, 161, 164, 170, 173, 179, 190, 199, 200, 202, 218, 222, 224, 227, 228, 236, 245, 250, 252, 259, 260, 269, 271, 275, 276, 284, 286, 299, 304, 314, 317, 318, 323, 330, 334, 335, 337, 338, 346, 350, 353, 355, 356, 360, 361, 368, 370, 371, 373, 377, 383, 386, 389, 395, 397, 410, 414, 416, 428, 429, 430, 432, 438, 445, 447, 450, 452, 454, 456, 457, 458, 471, 472, 476, 479, 480, 488, 490, 492, 493, 494, 495, 497, 501, 502, 506, 507, 508, 510, 511, 514, 517, 518, 519, 520, 530, 536, 540, 560, 566, 570, 571, 579, 581, 589, 591, 593, 596, 597, 599, 601, 612, 613, 614, 621, 622, 625, 628, 632, 636, 643, 644, 647, 666, 671, 682, 690, 695, 702, 708, 720, 721, 727, 729, 730, 734, 740, 754, 758, 766, 770, 772, 774, 778, 788, 791, 794, 795, 798, 799, 801, 803, 805, 809, 817, 819, 820, 821, 823, 824, 826, 828, 837, 840, 844, 847, 856, 859, 861, 862, 866, 869, 870, 875, 884, 889, 890, 899, 904, 913, 927, 935, 937, 942, 945, 952, 962, 964, 966, 969, 970, 980, 989, 991, 994, 998, 1001, 1003, 1005, 1006, 1007, 1011, 1012, 1014, 1015, 1019, 1022, 1038, 1040, 1043, 1051, 1053, 1069, 1071, 1075, 1076, 1077, 1080, 1083, 1087, 1089, 1096, 1107, 1108, 1120, 1125, 1126, 1129, 1138, 1160, 1161, 1166, 1167, 1172, 1173, 1174, 1178, 1180, 1181, 1183, 1185, 1198, 1203, 1212, 1228, 1232, 1239, 1240, 1241, 1251, 1252, 1254, 1258, 1259, 1266, 1282, 1289, 1305, 1308, 1311, 1313, 1315, 1317, 1324, 1331, 1337, 1339, 1342, 1346, 1349, 1353, 1357, 1363, 1364, 1367, 1385, 1387, 1388, 1389, 1391, 1392, 1393, 1395, 1400, 1406, 1409, 1417, 1420, 1422, 1426, 1438, 1440, 1444, 1451, 1453, 1454, 1455, 1459, 1462, 1469, 1476, 1478, 1486, 1490, 1493, 1494, 1496, 1501, 1504, 1512, 1517, 1518, 1525, 1526, 1533, 1544, 1547, 1554, 1559, 1560, 1562, 1580, 1585, 1590, 1593, 1594, 1603, 1604, 1605, 1613, 1622, 1627, 1633, 1637, 1641, 1645, 1647, 1648, 1650, 1654, 1655, 1658, 1659, 1665, 1668, 1669, 1672, 1673, 1674, 1676, 1679, 1683, 1686, 1691, 1695, 1712, 1716, 1718, 1721, 1726, 1727, 1734, 1736, 1738, 1751, 1755, 1756, 1780, 1786, 1791, 1796, 1798, 1812, 1816, 1827, 1834, 1835, 1841, 1858, 1860, 1867, 1869, 1877, 1879, 1888, 1897, 1914, 1945, 1953, 1958, 1963, 1964, 1971, 1973, 1978, 1981, 1984, 1989, 1990, 1991, 1992, 1994, 1995, 2001, 2017, 2021, 2028, 2035, 2036, 2049, 2054, 2062, 2064, 2067, 2070, 2072, 2076, 2077, 2092, 2100, 2106, 2109, 2110, 2112, 2118, 2119, 2120, 2121, 2126, 2133, 2139, 2141, 2147, 2159, 2161, 2162, 2164, 2167, 2169, 2172, 2174, 2177, 2181, 2185, 2186, 2188, 2192, 2193, 2194, 2195, 2197, 2208, 2212, 2222, 2223, 2226, 2230, 2233, 2237, 2240, 2243, 2247, 2249, 2250, 2257, 2262, 2265, 2274, 2278, 2280, 2281, 2285, 2297, 2304, 2311, 2312, 2317, 2320, 2322, 2324, 2330, 2333, 2335, 2339, 2344, 2348, 2360, 2364, 2366, 2378, 2389, 2395, 2396, 2400, 2404, 2409, 2410, 2420, 2423, 2425, 2429, 2437, 2440, 2442, 2454, 2463, 2469, 2484, 2488, 2491, 2511, 2512, 2515, 2517, 2522, 2529, 2530, 2532, 2535, 2538, 2539, 2546, 2547, 2548, 2549, 2555, 2556, 2559, 2560, 2562, 2574, 2575, 2589, 2590, 2602, 2616, 2624, 2626, 2629, 2632, 2644, 2660, 2663, 2667, 2676, 2678, 2691, 2707, 2714, 2716, 2731, 2736, 2742, 2744, 2745, 2746, 2749, 2754, 2757, 2762, 2764, 2766, 2777, 2788, 2791, 2797, 2798, 2801, 2803, 2806, 2807, 2812, 2815, 2816, 2820, 2823, 2837, 2843, 2845, 2854, 2857, 2860, 2861, 2877, 2880, 2882, 2884, 2888, 2899, 2902, 2905, 2912, 2913, 2915, 2916, 2921, 2927, 2933, 2938, 2939, 2944, 2949, 2953, 2977, 2979, 2985, 2995, 2998]}\n","*** Evaluating with repetition_penalty: 1.04\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:02<2:18:23, 2.77s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [2:07:32<00:00, 2.55s/it] \n"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.1 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.0 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.01 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.02 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.03 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.04 \n","0 不是 \n","{'accuracy': 0.785, 'incorrect_ids': [9, 24, 29, 34, 36, 55, 58, 59, 61, 65, 66, 67, 78, 81, 82, 83, 84, 88, 91, 93, 99, 103, 104, 106, 110, 112, 117, 121, 128, 129, 135, 138, 139, 143, 149, 150, 153, 155, 161, 164, 170, 173, 179, 190, 199, 200, 202, 218, 222, 224, 227, 228, 236, 245, 250, 252, 259, 260, 269, 271, 275, 276, 284, 286, 299, 304, 314, 317, 318, 323, 330, 334, 335, 337, 338, 346, 350, 353, 355, 356, 360, 361, 368, 370, 371, 373, 377, 383, 386, 389, 395, 397, 410, 414, 416, 428, 429, 430, 432, 438, 445, 447, 450, 452, 454, 456, 457, 458, 471, 472, 476, 479, 480, 488, 490, 492, 493, 494, 495, 497, 501, 502, 506, 507, 508, 510, 511, 514, 517, 518, 519, 520, 530, 536, 540, 560, 566, 570, 571, 579, 581, 589, 591, 593, 596, 597, 599, 601, 612, 613, 614, 621, 622, 625, 628, 632, 636, 643, 644, 647, 666, 671, 682, 690, 695, 702, 708, 720, 721, 727, 729, 730, 734, 740, 754, 758, 766, 770, 772, 774, 778, 788, 791, 794, 795, 798, 799, 801, 803, 805, 809, 817, 819, 820, 821, 823, 824, 826, 828, 837, 840, 844, 847, 856, 859, 861, 862, 866, 869, 870, 875, 884, 889, 890, 899, 904, 913, 927, 935, 937, 942, 945, 952, 962, 964, 966, 969, 970, 980, 989, 991, 994, 998, 1001, 1003, 1005, 1006, 1007, 1011, 1012, 1014, 1015, 1019, 1022, 1038, 1040, 1043, 1051, 1053, 1069, 1071, 1075, 1076, 1077, 1080, 1083, 1087, 1089, 1096, 1107, 1108, 1120, 1125, 1126, 1129, 1138, 1160, 1161, 1166, 1167, 1172, 1173, 1174, 1178, 1180, 1181, 1183, 1185, 1198, 1203, 1212, 1228, 1232, 1239, 1240, 1241, 1251, 1252, 1254, 1258, 1259, 1266, 1282, 1289, 1305, 1308, 1311, 1313, 1315, 1317, 1324, 1331, 1337, 1339, 1342, 1346, 1349, 1353, 1357, 1363, 1364, 1367, 1385, 1387, 1388, 1389, 1391, 1392, 1393, 1395, 1400, 1406, 1409, 1417, 1420, 1422, 1426, 1438, 1440, 1444, 1451, 1453, 1454, 1455, 1459, 1462, 1469, 1476, 1478, 1486, 1490, 1493, 1494, 1496, 1501, 1504, 1512, 1517, 1518, 1525, 1526, 1533, 1544, 1547, 1554, 1559, 1560, 1562, 1580, 1585, 1590, 1593, 1594, 1603, 1604, 1605, 1613, 1622, 1627, 1633, 1637, 1641, 1645, 1647, 1648, 1650, 1654, 1655, 1658, 1659, 1665, 1668, 1669, 1672, 1673, 1674, 1676, 1679, 1683, 1686, 1691, 1695, 1712, 1716, 1718, 1721, 1726, 1727, 1734, 1736, 1738, 1751, 1755, 1756, 1780, 1786, 1791, 1796, 1798, 1812, 1816, 1827, 1834, 1835, 1841, 1858, 1860, 1867, 1869, 1877, 1879, 1888, 1897, 1914, 1945, 1953, 1958, 1963, 1964, 1971, 1973, 1978, 1981, 1984, 1989, 1990, 1991, 1992, 1994, 1995, 2001, 2017, 2021, 2028, 2035, 2036, 2049, 2054, 2062, 2064, 2067, 2070, 2072, 2076, 2077, 2092, 2100, 2106, 2109, 2110, 2112, 2118, 2119, 2120, 2121, 2126, 2133, 2139, 2141, 2147, 2159, 2161, 2162, 2164, 2167, 2169, 2172, 2174, 2177, 2181, 2185, 2186, 2188, 2192, 2193, 2194, 2195, 2197, 2208, 2212, 2222, 2223, 2226, 2230, 2233, 2237, 2240, 2243, 2247, 2249, 2250, 2257, 2262, 2265, 2274, 2278, 2280, 2281, 2285, 2297, 2304, 2311, 2312, 2317, 2320, 2322, 2324, 2330, 2333, 2335, 2339, 2344, 2348, 2360, 2364, 2366, 2378, 2389, 2395, 2396, 2400, 2404, 2409, 2410, 2420, 2423, 2425, 2429, 2437, 2440, 2442, 2454, 2463, 2469, 2484, 2488, 2491, 2511, 2512, 2515, 2517, 2522, 2529, 2530, 2532, 2535, 2538, 2539, 2546, 2547, 2548, 2549, 2555, 2556, 2559, 2560, 2562, 2574, 2575, 2589, 2590, 2602, 2616, 2624, 2626, 2629, 2632, 2644, 2660, 2663, 2667, 2676, 2678, 2691, 2707, 2714, 2716, 2731, 2736, 2742, 2744, 2745, 2746, 2749, 2754, 2757, 2762, 2764, 2766, 2777, 2788, 2791, 2797, 2798, 2801, 2803, 2806, 2807, 2812, 2815, 2816, 2820, 2823, 2837, 2843, 2845, 2854, 2857, 2860, 2861, 2877, 2880, 2882, 2884, 2888, 2899, 2902, 2905, 2912, 2913, 2915, 2916, 2921, 2927, 2933, 2938, 2939, 2944, 2949, 2953, 2977, 2979, 2985, 2995, 2998]}\n","*** Evaluating with repetition_penalty: 1.05\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:02<1:55:08, 2.30s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [2:02:02<00:00, 2.44s/it] \n"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.1 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.0 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.01 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.02 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.03 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.04 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.05 \n","0 不是 \n","{'accuracy': 0.785, 'incorrect_ids': [9, 24, 29, 34, 36, 55, 58, 59, 61, 65, 66, 67, 78, 81, 82, 83, 84, 88, 91, 93, 99, 103, 104, 106, 110, 112, 117, 121, 128, 129, 135, 138, 139, 143, 149, 150, 153, 155, 161, 164, 170, 173, 179, 190, 199, 200, 202, 218, 222, 224, 227, 228, 236, 245, 250, 252, 259, 260, 269, 271, 275, 276, 284, 286, 299, 304, 314, 317, 318, 323, 330, 334, 335, 337, 338, 346, 350, 353, 355, 356, 360, 361, 368, 370, 371, 373, 377, 383, 386, 389, 395, 397, 410, 414, 416, 428, 429, 430, 432, 438, 445, 447, 450, 452, 454, 456, 457, 458, 471, 472, 476, 479, 480, 488, 490, 492, 493, 494, 495, 497, 501, 502, 506, 507, 508, 510, 511, 514, 517, 518, 519, 520, 530, 536, 540, 560, 566, 570, 571, 579, 581, 589, 591, 593, 596, 597, 599, 601, 612, 613, 614, 621, 622, 625, 628, 632, 636, 643, 644, 647, 666, 671, 682, 690, 695, 702, 708, 720, 721, 727, 729, 730, 734, 740, 754, 758, 766, 770, 772, 774, 778, 788, 791, 794, 795, 798, 799, 801, 803, 805, 809, 817, 819, 820, 821, 823, 824, 826, 828, 837, 840, 844, 847, 856, 859, 861, 862, 866, 869, 870, 875, 884, 889, 890, 899, 904, 913, 927, 935, 937, 942, 945, 952, 962, 964, 966, 969, 970, 980, 989, 991, 994, 998, 1001, 1003, 1005, 1006, 1007, 1011, 1012, 1014, 1015, 1019, 1022, 1038, 1040, 1043, 1051, 1053, 1069, 1071, 1075, 1076, 1077, 1080, 1083, 1087, 1089, 1096, 1107, 1108, 1120, 1125, 1126, 1129, 1138, 1160, 1161, 1166, 1167, 1172, 1173, 1174, 1178, 1180, 1181, 1183, 1185, 1198, 1203, 1212, 1228, 1232, 1239, 1240, 1241, 1251, 1252, 1254, 1258, 1259, 1266, 1282, 1289, 1305, 1308, 1311, 1313, 1315, 1317, 1324, 1331, 1337, 1339, 1342, 1346, 1349, 1353, 1357, 1363, 1364, 1367, 1385, 1387, 1388, 1389, 1391, 1392, 1393, 1395, 1400, 1406, 1409, 1417, 1420, 1422, 1426, 1438, 1440, 1444, 1451, 1453, 1454, 1455, 1459, 1462, 1469, 1476, 1478, 1486, 1490, 1493, 1494, 1496, 1501, 1504, 1512, 1517, 1518, 1525, 1526, 1533, 1544, 1547, 1554, 1559, 1560, 1562, 1580, 1585, 1590, 1593, 1594, 1603, 1604, 1605, 1613, 1622, 1627, 1633, 1637, 1641, 1645, 1647, 1648, 1650, 1654, 1655, 1658, 1659, 1665, 1668, 1669, 1672, 1673, 1674, 1676, 1679, 1683, 1686, 1691, 1695, 1712, 1716, 1718, 1721, 1726, 1727, 1734, 1736, 1738, 1751, 1755, 1756, 1780, 1786, 1791, 1796, 1798, 1812, 1816, 1827, 1834, 1835, 1841, 1858, 1860, 1867, 1869, 1877, 1879, 1888, 1897, 1914, 1945, 1953, 1958, 1963, 1964, 1971, 1973, 1978, 1981, 1984, 1989, 1990, 1991, 1992, 1994, 1995, 2001, 2017, 2021, 2028, 2035, 2036, 2049, 2054, 2062, 2064, 2067, 2070, 2072, 2076, 2077, 2092, 2100, 2106, 2109, 2110, 2112, 2118, 2119, 2120, 2121, 2126, 2133, 2139, 2141, 2147, 2159, 2161, 2162, 2164, 2167, 2169, 2172, 2174, 2177, 2181, 2185, 2186, 2188, 2192, 2193, 2194, 2195, 2197, 2208, 2212, 2222, 2223, 2226, 2230, 2233, 2237, 2240, 2243, 2247, 2249, 2250, 2257, 2262, 2265, 2274, 2278, 2280, 2281, 2285, 2297, 2304, 2311, 2312, 2317, 2320, 2322, 2324, 2330, 2333, 2335, 2339, 2344, 2348, 2360, 2364, 2366, 2378, 2389, 2395, 2396, 2400, 2404, 2409, 2410, 2420, 2423, 2425, 2429, 2437, 2440, 2442, 2454, 2463, 2469, 2484, 2488, 2491, 2511, 2512, 2515, 2517, 2522, 2529, 2530, 2532, 2535, 2538, 2539, 2546, 2547, 2548, 2549, 2555, 2556, 2559, 2560, 2562, 2574, 2575, 2589, 2590, 2602, 2616, 2624, 2626, 2629, 2632, 2644, 2660, 2663, 2667, 2676, 2678, 2691, 2707, 2714, 2716, 2731, 2736, 2742, 2744, 2745, 2746, 2749, 2754, 2757, 2762, 2764, 2766, 2777, 2788, 2791, 2797, 2798, 2801, 2803, 2806, 2807, 2812, 2815, 2816, 2820, 2823, 2837, 2843, 2845, 2854, 2857, 2860, 2861, 2877, 2880, 2882, 2884, 2888, 2899, 2902, 2905, 2912, 2913, 2915, 2916, 2921, 2927, 2933, 2938, 2939, 2944, 2949, 2953, 2977, 2979, 2985, 2995, 2998]}\n","*** Evaluating with repetition_penalty: 1.06\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:01<1:36:37, 1.93s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [1:54:47<00:00, 2.30s/it] \n"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.1 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.0 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.01 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.02 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.03 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.04 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.05 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.06 \n","0 不是 \n","{'accuracy': 0.785, 'incorrect_ids': [9, 24, 29, 34, 36, 55, 58, 59, 61, 65, 66, 67, 78, 81, 82, 83, 84, 88, 91, 93, 99, 103, 104, 106, 110, 112, 117, 121, 128, 129, 135, 138, 139, 143, 149, 150, 153, 155, 161, 164, 170, 173, 179, 190, 199, 200, 202, 218, 222, 224, 227, 228, 236, 245, 250, 252, 259, 260, 269, 271, 275, 276, 284, 286, 299, 304, 314, 317, 318, 323, 330, 334, 335, 337, 338, 346, 350, 353, 355, 356, 360, 361, 368, 370, 371, 373, 377, 383, 386, 389, 395, 397, 410, 414, 416, 428, 429, 430, 432, 438, 445, 447, 450, 452, 454, 456, 457, 458, 471, 472, 476, 479, 480, 488, 490, 492, 493, 494, 495, 497, 501, 502, 506, 507, 508, 510, 511, 514, 517, 518, 519, 520, 530, 536, 540, 560, 566, 570, 571, 579, 581, 589, 591, 593, 596, 597, 599, 601, 612, 613, 614, 621, 622, 625, 628, 632, 636, 643, 644, 647, 666, 671, 682, 690, 695, 702, 708, 720, 721, 727, 729, 730, 734, 740, 754, 758, 766, 770, 772, 774, 778, 788, 791, 794, 795, 798, 799, 801, 803, 805, 809, 817, 819, 820, 821, 823, 824, 826, 828, 837, 840, 844, 847, 856, 859, 861, 862, 866, 869, 870, 875, 884, 889, 890, 899, 904, 913, 927, 935, 937, 942, 945, 952, 962, 964, 966, 969, 970, 980, 989, 991, 994, 998, 1001, 1003, 1005, 1006, 1007, 1011, 1012, 1014, 1015, 1019, 1022, 1038, 1040, 1043, 1051, 1053, 1069, 1071, 1075, 1076, 1077, 1080, 1083, 1087, 1089, 1096, 1107, 1108, 1120, 1125, 1126, 1129, 1138, 1160, 1161, 1166, 1167, 1172, 1173, 1174, 1178, 1180, 1181, 1183, 1185, 1198, 1203, 1212, 1228, 1232, 1239, 1240, 1241, 1251, 1252, 1254, 1258, 1259, 1266, 1282, 1289, 1305, 1308, 1311, 1313, 1315, 1317, 1324, 1331, 1337, 1339, 1342, 1346, 1349, 1353, 1357, 1363, 1364, 1367, 1385, 1387, 1388, 1389, 1391, 1392, 1393, 1395, 1400, 1406, 1409, 1417, 1420, 1422, 1426, 1438, 1440, 1444, 1451, 1453, 1454, 1455, 1459, 1462, 1469, 1476, 1478, 1486, 1490, 1493, 1494, 1496, 1501, 1504, 1512, 1517, 1518, 1525, 1526, 1533, 1544, 1547, 1554, 1559, 1560, 1562, 1580, 1585, 1590, 1593, 1594, 1603, 1604, 1605, 1613, 1622, 1627, 1633, 1637, 1641, 1645, 1647, 1648, 1650, 1654, 1655, 1658, 1659, 1665, 1668, 1669, 1672, 1673, 1674, 1676, 1679, 1683, 1686, 1691, 1695, 1712, 1716, 1718, 1721, 1726, 1727, 1734, 1736, 1738, 1751, 1755, 1756, 1780, 1786, 1791, 1796, 1798, 1812, 1816, 1827, 1834, 1835, 1841, 1858, 1860, 1867, 1869, 1877, 1879, 1888, 1897, 1914, 1945, 1953, 1958, 1963, 1964, 1971, 1973, 1978, 1981, 1984, 1989, 1990, 1991, 1992, 1994, 1995, 2001, 2017, 2021, 2028, 2035, 2036, 2049, 2054, 2062, 2064, 2067, 2070, 2072, 2076, 2077, 2092, 2100, 2106, 2109, 2110, 2112, 2118, 2119, 2120, 2121, 2126, 2133, 2139, 2141, 2147, 2159, 2161, 2162, 2164, 2167, 2169, 2172, 2174, 2177, 2181, 2185, 2186, 2188, 2192, 2193, 2194, 2195, 2197, 2208, 2212, 2222, 2223, 2226, 2230, 2233, 2237, 2240, 2243, 2247, 2249, 2250, 2257, 2262, 2265, 2274, 2278, 2280, 2281, 2285, 2297, 2304, 2311, 2312, 2317, 2320, 2322, 2324, 2330, 2333, 2335, 2339, 2344, 2348, 2360, 2364, 2366, 2378, 2389, 2395, 2396, 2400, 2404, 2409, 2410, 2420, 2423, 2425, 2429, 2437, 2440, 2442, 2454, 2463, 2469, 2484, 2488, 2491, 2511, 2512, 2515, 2517, 2522, 2529, 2530, 2532, 2535, 2538, 2539, 2546, 2547, 2548, 2549, 2555, 2556, 2559, 2560, 2562, 2574, 2575, 2589, 2590, 2602, 2616, 2624, 2626, 2629, 2632, 2644, 2660, 2663, 2667, 2676, 2678, 2691, 2707, 2714, 2716, 2731, 2736, 2742, 2744, 2745, 2746, 2749, 2754, 2757, 2762, 2764, 2766, 2777, 2788, 2791, 2797, 2798, 2801, 2803, 2806, 2807, 2812, 2815, 2816, 2820, 2823, 2837, 2843, 2845, 2854, 2857, 2860, 2861, 2877, 2880, 2882, 2884, 2888, 2899, 2902, 2905, 2912, 2913, 2915, 2916, 2921, 2927, 2933, 2938, 2939, 2944, 2949, 2953, 2977, 2979, 2985, 2995, 2998]}\n","*** Evaluating with repetition_penalty: 1.07\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:01<1:32:50, 1.86s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [1:57:33<00:00, 2.35s/it] \n"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.1 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.0 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.01 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.02 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.03 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.04 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.05 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.06 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.07 \n","0 不是 \n","{'accuracy': 0.785, 'incorrect_ids': [9, 24, 29, 34, 36, 55, 58, 59, 61, 65, 66, 67, 78, 81, 82, 83, 84, 88, 91, 93, 99, 103, 104, 106, 110, 112, 117, 121, 128, 129, 135, 138, 139, 143, 149, 150, 153, 155, 161, 164, 170, 173, 179, 190, 199, 200, 202, 218, 222, 224, 227, 228, 236, 245, 250, 252, 259, 260, 269, 271, 275, 276, 284, 286, 299, 304, 314, 317, 318, 323, 330, 334, 335, 337, 338, 346, 350, 353, 355, 356, 360, 361, 368, 370, 371, 373, 377, 383, 386, 389, 395, 397, 410, 414, 416, 428, 429, 430, 432, 438, 445, 447, 450, 452, 454, 456, 457, 458, 471, 472, 476, 479, 480, 488, 490, 492, 493, 494, 495, 497, 501, 502, 506, 507, 508, 510, 511, 514, 517, 518, 519, 520, 530, 536, 540, 560, 566, 570, 571, 579, 581, 589, 591, 593, 596, 597, 599, 601, 612, 613, 614, 621, 622, 625, 628, 632, 636, 643, 644, 647, 666, 671, 682, 690, 695, 702, 708, 720, 721, 727, 729, 730, 734, 740, 754, 758, 766, 770, 772, 774, 778, 788, 791, 794, 795, 798, 799, 801, 803, 805, 809, 817, 819, 820, 821, 823, 824, 826, 828, 837, 840, 844, 847, 856, 859, 861, 862, 866, 869, 870, 875, 884, 889, 890, 899, 904, 913, 927, 935, 937, 942, 945, 952, 962, 964, 966, 969, 970, 980, 989, 991, 994, 998, 1001, 1003, 1005, 1006, 1007, 1011, 1012, 1014, 1015, 1019, 1022, 1038, 1040, 1043, 1051, 1053, 1069, 1071, 1075, 1076, 1077, 1080, 1083, 1087, 1089, 1096, 1107, 1108, 1120, 1125, 1126, 1129, 1138, 1160, 1161, 1166, 1167, 1172, 1173, 1174, 1178, 1180, 1181, 1183, 1185, 1198, 1203, 1212, 1228, 1232, 1239, 1240, 1241, 1251, 1252, 1254, 1258, 1259, 1266, 1282, 1289, 1305, 1308, 1311, 1313, 1315, 1317, 1324, 1331, 1337, 1339, 1342, 1346, 1349, 1353, 1357, 1363, 1364, 1367, 1385, 1387, 1388, 1389, 1391, 1392, 1393, 1395, 1400, 1406, 1409, 1417, 1420, 1422, 1426, 1438, 1440, 1444, 1451, 1453, 1454, 1455, 1459, 1462, 1469, 1476, 1478, 1486, 1490, 1493, 1494, 1496, 1501, 1504, 1512, 1517, 1518, 1525, 1526, 1533, 1544, 1547, 1554, 1559, 1560, 1562, 1580, 1585, 1590, 1593, 1594, 1603, 1604, 1605, 1613, 1622, 1627, 1633, 1637, 1641, 1645, 1647, 1648, 1650, 1654, 1655, 1658, 1659, 1665, 1668, 1669, 1672, 1673, 1674, 1676, 1679, 1683, 1686, 1691, 1695, 1712, 1716, 1718, 1721, 1726, 1727, 1734, 1736, 1738, 1751, 1755, 1756, 1780, 1786, 1791, 1796, 1798, 1812, 1816, 1827, 1834, 1835, 1841, 1858, 1860, 1867, 1869, 1877, 1879, 1888, 1897, 1914, 1945, 1953, 1958, 1963, 1964, 1971, 1973, 1978, 1981, 1984, 1989, 1990, 1991, 1992, 1994, 1995, 2001, 2017, 2021, 2028, 2035, 2036, 2049, 2054, 2062, 2064, 2067, 2070, 2072, 2076, 2077, 2092, 2100, 2106, 2109, 2110, 2112, 2118, 2119, 2120, 2121, 2126, 2133, 2139, 2141, 2147, 2159, 2161, 2162, 2164, 2167, 2169, 2172, 2174, 2177, 2181, 2185, 2186, 2188, 2192, 2193, 2194, 2195, 2197, 2208, 2212, 2222, 2223, 2226, 2230, 2233, 2237, 2240, 2243, 2247, 2249, 2250, 2257, 2262, 2265, 2274, 2278, 2280, 2281, 2285, 2297, 2304, 2311, 2312, 2317, 2320, 2322, 2324, 2330, 2333, 2335, 2339, 2344, 2348, 2360, 2364, 2366, 2378, 2389, 2395, 2396, 2400, 2404, 2409, 2410, 2420, 2423, 2425, 2429, 2437, 2440, 2442, 2454, 2463, 2469, 2484, 2488, 2491, 2511, 2512, 2515, 2517, 2522, 2529, 2530, 2532, 2535, 2538, 2539, 2546, 2547, 2548, 2549, 2555, 2556, 2559, 2560, 2562, 2574, 2575, 2589, 2590, 2602, 2616, 2624, 2626, 2629, 2632, 2644, 2660, 2663, 2667, 2676, 2678, 2691, 2707, 2714, 2716, 2731, 2736, 2742, 2744, 2745, 2746, 2749, 2754, 2757, 2762, 2764, 2766, 2777, 2788, 2791, 2797, 2798, 2801, 2803, 2806, 2807, 2812, 2815, 2816, 2820, 2823, 2837, 2843, 2845, 2854, 2857, 2860, 2861, 2877, 2880, 2882, 2884, 2888, 2899, 2902, 2905, 2912, 2913, 2915, 2916, 2921, 2927, 2933, 2938, 2939, 2944, 2949, 2953, 2977, 2979, 2985, 2995, 2998]}\n","*** Evaluating with repetition_penalty: 1.08\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:01<1:34:50, 1.90s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [1:58:08<00:00, 2.36s/it] \n"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.1 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.0 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.01 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.02 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.03 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.04 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.05 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.06 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.07 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.08 \n","0 不是 \n","{'accuracy': 0.7666666666666667, 'incorrect_ids': [9, 24, 29, 34, 36, 55, 58, 59, 61, 65, 66, 67, 72, 76, 78, 81, 82, 83, 84, 88, 91, 93, 99, 103, 104, 106, 110, 112, 117, 121, 128, 129, 131, 135, 138, 139, 143, 149, 150, 153, 155, 161, 164, 170, 173, 175, 179, 190, 199, 200, 202, 218, 222, 224, 227, 228, 233, 236, 245, 250, 252, 258, 259, 260, 269, 271, 275, 276, 284, 286, 299, 303, 304, 314, 317, 318, 323, 330, 334, 335, 337, 338, 346, 349, 350, 353, 355, 356, 360, 361, 368, 370, 371, 373, 377, 383, 386, 387, 389, 395, 397, 410, 414, 416, 428, 429, 430, 432, 438, 445, 447, 449, 450, 452, 454, 456, 457, 458, 471, 472, 476, 479, 480, 488, 490, 492, 493, 494, 495, 497, 501, 502, 506, 507, 508, 510, 511, 514, 517, 518, 519, 520, 530, 536, 540, 560, 566, 570, 571, 576, 579, 581, 589, 591, 593, 596, 597, 599, 601, 612, 613, 614, 621, 622, 625, 628, 632, 636, 643, 644, 647, 652, 654, 656, 666, 671, 682, 690, 695, 702, 706, 708, 720, 721, 727, 729, 730, 734, 740, 749, 754, 758, 766, 770, 772, 774, 778, 788, 791, 794, 795, 798, 799, 801, 803, 805, 809, 817, 819, 820, 821, 823, 824, 826, 828, 837, 840, 844, 847, 856, 859, 861, 862, 866, 869, 870, 875, 884, 889, 890, 896, 899, 904, 905, 913, 927, 935, 937, 942, 945, 952, 962, 964, 966, 969, 970, 980, 989, 991, 994, 998, 1001, 1003, 1005, 1006, 1007, 1011, 1012, 1014, 1015, 1019, 1022, 1038, 1040, 1043, 1051, 1053, 1069, 1071, 1075, 1076, 1077, 1080, 1083, 1087, 1089, 1096, 1107, 1108, 1120, 1125, 1126, 1129, 1138, 1160, 1161, 1166, 1167, 1172, 1173, 1174, 1178, 1180, 1181, 1183, 1185, 1198, 1203, 1211, 1212, 1228, 1232, 1239, 1240, 1241, 1251, 1252, 1254, 1258, 1259, 1266, 1282, 1289, 1293, 1305, 1308, 1311, 1313, 1315, 1317, 1324, 1331, 1337, 1339, 1342, 1346, 1349, 1353, 1357, 1363, 1364, 1367, 1371, 1385, 1387, 1388, 1389, 1391, 1392, 1393, 1395, 1400, 1404, 1406, 1409, 1417, 1420, 1422, 1426, 1438, 1440, 1444, 1451, 1453, 1454, 1455, 1459, 1462, 1469, 1476, 1478, 1486, 1490, 1493, 1494, 1496, 1501, 1504, 1512, 1517, 1518, 1525, 1526, 1527, 1533, 1544, 1547, 1554, 1559, 1560, 1562, 1578, 1580, 1585, 1590, 1592, 1593, 1594, 1603, 1604, 1605, 1613, 1622, 1627, 1633, 1637, 1641, 1645, 1647, 1648, 1650, 1654, 1655, 1658, 1659, 1665, 1668, 1669, 1672, 1673, 1674, 1676, 1679, 1683, 1686, 1691, 1695, 1699, 1709, 1712, 1716, 1718, 1721, 1722, 1726, 1727, 1734, 1736, 1738, 1746, 1751, 1755, 1756, 1759, 1771, 1780, 1782, 1786, 1788, 1791, 1796, 1798, 1812, 1816, 1827, 1834, 1835, 1841, 1858, 1860, 1866, 1867, 1869, 1877, 1879, 1887, 1888, 1889, 1897, 1914, 1916, 1945, 1946, 1953, 1958, 1963, 1964, 1965, 1971, 1973, 1978, 1981, 1984, 1989, 1990, 1991, 1992, 1994, 1995, 2000, 2001, 2017, 2021, 2028, 2035, 2036, 2049, 2054, 2062, 2064, 2067, 2070, 2072, 2076, 2077, 2078, 2092, 2100, 2106, 2109, 2110, 2112, 2118, 2119, 2120, 2121, 2126, 2132, 2133, 2139, 2141, 2146, 2147, 2159, 2161, 2162, 2164, 2167, 2169, 2172, 2174, 2177, 2181, 2185, 2186, 2188, 2192, 2193, 2194, 2195, 2197, 2208, 2212, 2222, 2223, 2225, 2226, 2230, 2233, 2237, 2240, 2243, 2247, 2249, 2250, 2257, 2262, 2265, 2274, 2278, 2280, 2281, 2285, 2297, 2304, 2311, 2312, 2315, 2317, 2320, 2322, 2324, 2330, 2333, 2335, 2339, 2344, 2348, 2360, 2364, 2366, 2373, 2378, 2389, 2395, 2396, 2400, 2404, 2409, 2410, 2420, 2423, 2425, 2429, 2437, 2440, 2442, 2454, 2456, 2459, 2463, 2469, 2484, 2488, 2491, 2502, 2511, 2512, 2515, 2517, 2522, 2529, 2530, 2532, 2535, 2538, 2539, 2546, 2547, 2548, 2549, 2555, 2556, 2559, 2560, 2562, 2574, 2575, 2589, 2590, 2601, 2602, 2616, 2624, 2626, 2627, 2629, 2632, 2640, 2641, 2644, 2645, 2660, 2663, 2667, 2676, 2678, 2691, 2707, 2714, 2716, 2731, 2736, 2742, 2744, 2745, 2746, 2749, 2754, 2757, 2762, 2764, 2766, 2777, 2788, 2791, 2797, 2798, 2801, 2803, 2806, 2807, 2812, 2815, 2816, 2820, 2823, 2837, 2843, 2845, 2854, 2857, 2860, 2861, 2877, 2880, 2882, 2884, 2888, 2899, 2902, 2905, 2912, 2913, 2915, 2916, 2921, 2927, 2933, 2938, 2939, 2944, 2949, 2953, 2977, 2979, 2985, 2987, 2995, 2998]}\n","*** Evaluating with repetition_penalty: 1.09\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:02<2:00:13, 2.41s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [2:00:02<00:00, 2.40s/it] \n"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.1 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.0 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.01 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.02 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.03 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.04 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.05 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.06 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.07 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.08 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.09 \n","0 不是 \n","{'accuracy': 0.6423333333333333, 'incorrect_ids': [9, 24, 29, 34, 36, 42, 55, 58, 59, 61, 62, 63, 64, 65, 66, 67, 71, 72, 76, 78, 79, 81, 82, 83, 84, 87, 88, 91, 93, 99, 101, 103, 104, 106, 110, 112, 113, 115, 117, 121, 127, 128, 129, 131, 134, 135, 136, 138, 139, 143, 145, 146, 149, 150, 153, 154, 155, 159, 161, 164, 169, 170, 171, 173, 174, 175, 178, 179, 183, 188, 190, 193, 198, 199, 200, 202, 205, 206, 210, 214, 218, 220, 222, 224, 227, 228, 233, 236, 245, 250, 252, 258, 259, 260, 266, 269, 271, 275, 276, 284, 286, 288, 296, 299, 300, 302, 303, 304, 305, 308, 314, 317, 318, 323, 326, 330, 334, 335, 336, 337, 338, 340, 346, 348, 349, 350, 353, 355, 356, 360, 361, 363, 368, 370, 371, 373, 377, 378, 383, 386, 387, 389, 394, 395, 396, 397, 406, 410, 411, 414, 416, 428, 429, 430, 431, 432, 436, 438, 441, 445, 447, 449, 450, 451, 452, 454, 456, 457, 458, 459, 460, 471, 472, 476, 479, 480, 488, 490, 492, 493, 494, 495, 497, 501, 502, 506, 507, 508, 510, 511, 514, 516, 517, 518, 519, 520, 527, 530, 531, 536, 537, 540, 542, 546, 554, 557, 560, 565, 566, 570, 571, 575, 576, 579, 581, 589, 590, 591, 593, 595, 596, 597, 599, 601, 611, 612, 613, 614, 621, 622, 625, 628, 632, 636, 639, 642, 643, 644, 647, 652, 654, 656, 666, 671, 673, 674, 675, 682, 683, 690, 694, 695, 702, 703, 706, 708, 717, 720, 721, 726, 727, 729, 730, 734, 736, 740, 749, 754, 758, 766, 770, 772, 774, 778, 780, 782, 788, 791, 794, 795, 798, 799, 801, 803, 805, 809, 817, 819, 820, 821, 823, 824, 826, 828, 834, 837, 840, 844, 845, 847, 850, 852, 854, 856, 859, 860, 861, 862, 863, 864, 866, 869, 870, 875, 884, 889, 890, 893, 896, 899, 904, 905, 913, 914, 918, 920, 923, 927, 933, 935, 936, 937, 939, 942, 945, 949, 952, 954, 956, 959, 961, 962, 964, 966, 969, 970, 976, 980, 984, 987, 989, 991, 994, 998, 999, 1001, 1003, 1005, 1006, 1007, 1008, 1011, 1012, 1014, 1015, 1019, 1022, 1026, 1028, 1032, 1038, 1040, 1043, 1044, 1049, 1051, 1053, 1058, 1059, 1063, 1065, 1069, 1071, 1073, 1075, 1076, 1077, 1080, 1083, 1087, 1089, 1093, 1096, 1100, 1102, 1103, 1107, 1108, 1110, 1120, 1125, 1126, 1128, 1129, 1134, 1137, 1138, 1152, 1154, 1160, 1161, 1166, 1167, 1171, 1172, 1173, 1174, 1178, 1179, 1180, 1181, 1183, 1185, 1186, 1195, 1198, 1203, 1205, 1206, 1211, 1212, 1214, 1217, 1220, 1223, 1228, 1229, 1232, 1237, 1239, 1240, 1241, 1245, 1247, 1251, 1252, 1254, 1258, 1259, 1264, 1266, 1267, 1271, 1272, 1274, 1281, 1282, 1286, 1287, 1289, 1290, 1293, 1305, 1308, 1311, 1312, 1313, 1315, 1317, 1318, 1320, 1324, 1329, 1331, 1332, 1337, 1339, 1342, 1343, 1346, 1348, 1349, 1352, 1353, 1357, 1360, 1363, 1364, 1365, 1367, 1371, 1372, 1385, 1387, 1388, 1389, 1391, 1392, 1393, 1395, 1400, 1404, 1406, 1409, 1410, 1417, 1419, 1420, 1421, 1422, 1423, 1426, 1433, 1438, 1440, 1444, 1451, 1452, 1453, 1454, 1455, 1459, 1462, 1466, 1469, 1474, 1476, 1477, 1478, 1486, 1489, 1490, 1492, 1493, 1494, 1496, 1501, 1502, 1504, 1505, 1507, 1508, 1509, 1512, 1517, 1518, 1521, 1524, 1525, 1526, 1527, 1533, 1535, 1542, 1544, 1546, 1547, 1549, 1554, 1555, 1559, 1560, 1562, 1575, 1578, 1580, 1585, 1590, 1592, 1593, 1594, 1597, 1600, 1603, 1604, 1605, 1607, 1611, 1612, 1613, 1619, 1622, 1627, 1633, 1634, 1637, 1641, 1644, 1645, 1647, 1648, 1650, 1654, 1655, 1657, 1658, 1659, 1661, 1665, 1668, 1669, 1672, 1673, 1674, 1676, 1679, 1680, 1683, 1686, 1691, 1695, 1697, 1699, 1709, 1712, 1716, 1718, 1719, 1721, 1722, 1726, 1727, 1729, 1732, 1733, 1734, 1736, 1737, 1738, 1746, 1747, 1751, 1752, 1755, 1756, 1759, 1771, 1777, 1778, 1780, 1782, 1786, 1788, 1791, 1796, 1798, 1806, 1809, 1812, 1816, 1818, 1822, 1827, 1834, 1835, 1841, 1856, 1857, 1858, 1859, 1860, 1863, 1864, 1865, 1866, 1867, 1869, 1877, 1879, 1885, 1886, 1887, 1888, 1889, 1891, 1897, 1901, 1906, 1914, 1916, 1920, 1923, 1928, 1936, 1937, 1940, 1945, 1946, 1948, 1953, 1956, 1958, 1961, 1963, 1964, 1965, 1970, 1971, 1973, 1974, 1978, 1980, 1981, 1984, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 2000, 2001, 2004, 2009, 2012, 2013, 2017, 2021, 2028, 2035, 2036, 2040, 2042, 2048, 2049, 2054, 2056, 2062, 2064, 2067, 2070, 2072, 2076, 2077, 2078, 2079, 2085, 2087, 2092, 2100, 2106, 2109, 2110, 2112, 2113, 2118, 2119, 2120, 2121, 2124, 2126, 2132, 2133, 2137, 2139, 2141, 2142, 2146, 2147, 2153, 2159, 2161, 2162, 2164, 2167, 2169, 2170, 2172, 2174, 2175, 2177, 2181, 2184, 2185, 2186, 2187, 2188, 2190, 2192, 2193, 2194, 2195, 2197, 2198, 2201, 2202, 2204, 2206, 2208, 2212, 2213, 2219, 2222, 2223, 2225, 2226, 2227, 2229, 2230, 2233, 2235, 2237, 2240, 2241, 2242, 2243, 2247, 2249, 2250, 2257, 2262, 2263, 2265, 2267, 2274, 2275, 2278, 2280, 2281, 2285, 2288, 2289, 2291, 2294, 2295, 2297, 2298, 2304, 2306, 2311, 2312, 2315, 2317, 2320, 2322, 2324, 2328, 2330, 2333, 2335, 2339, 2342, 2344, 2348, 2351, 2352, 2357, 2360, 2361, 2364, 2365, 2366, 2371, 2373, 2378, 2379, 2382, 2384, 2389, 2392, 2395, 2396, 2400, 2404, 2409, 2410, 2413, 2414, 2416, 2419, 2420, 2423, 2425, 2429, 2433, 2437, 2438, 2440, 2442, 2443, 2450, 2454, 2456, 2459, 2462, 2463, 2469, 2470, 2471, 2473, 2480, 2484, 2486, 2488, 2491, 2496, 2497, 2500, 2502, 2505, 2507, 2510, 2511, 2512, 2513, 2515, 2517, 2522, 2529, 2530, 2532, 2535, 2538, 2539, 2540, 2544, 2546, 2547, 2548, 2549, 2555, 2556, 2559, 2560, 2562, 2570, 2571, 2574, 2575, 2576, 2589, 2590, 2593, 2601, 2602, 2609, 2614, 2616, 2624, 2626, 2627, 2628, 2629, 2631, 2632, 2633, 2637, 2640, 2641, 2644, 2645, 2647, 2660, 2663, 2666, 2667, 2674, 2676, 2677, 2678, 2688, 2691, 2694, 2700, 2707, 2712, 2714, 2716, 2721, 2722, 2726, 2729, 2731, 2732, 2736, 2742, 2744, 2745, 2746, 2749, 2752, 2754, 2757, 2762, 2764, 2766, 2771, 2774, 2776, 2777, 2778, 2785, 2788, 2790, 2791, 2796, 2797, 2798, 2800, 2801, 2803, 2804, 2806, 2807, 2812, 2815, 2816, 2820, 2821, 2823, 2826, 2837, 2843, 2845, 2850, 2854, 2857, 2860, 2861, 2862, 2863, 2865, 2871, 2873, 2875, 2877, 2879, 2880, 2881, 2882, 2884, 2887, 2888, 2892, 2897, 2899, 2902, 2904, 2905, 2910, 2912, 2913, 2915, 2916, 2921, 2927, 2930, 2933, 2934, 2938, 2939, 2941, 2944, 2946, 2949, 2951, 2952, 2953, 2954, 2956, 2958, 2968, 2971, 2977, 2978, 2979, 2982, 2985, 2987, 2993, 2995, 2998]}\n","*** Evaluating with repetition_penalty: 1.1\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:02<2:06:54, 2.54s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [1:57:59<00:00, 2.36s/it] \n"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.1 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.0 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.01 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.02 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.03 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.04 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.05 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.06 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.07 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.08 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.09 \n","0 不是 \n","{'accuracy': 0.531, 'incorrect_ids': [9, 19, 21, 23, 24, 29, 34, 36, 42, 49, 55, 58, 59, 61, 62, 63, 64, 65, 66, 67, 71, 72, 75, 76, 78, 79, 81, 82, 83, 84, 87, 88, 91, 93, 96, 99, 101, 103, 104, 105, 106, 110, 111, 112, 113, 115, 116, 117, 121, 127, 128, 129, 131, 134, 135, 136, 137, 138, 139, 143, 144, 145, 146, 149, 150, 153, 154, 155, 159, 161, 164, 169, 170, 171, 173, 174, 175, 178, 179, 182, 183, 188, 189, 190, 193, 197, 198, 199, 200, 202, 205, 206, 207, 210, 214, 215, 218, 220, 221, 222, 224, 227, 228, 231, 233, 236, 237, 245, 247, 249, 250, 251, 252, 258, 259, 260, 263, 266, 268, 269, 271, 275, 276, 279, 283, 284, 286, 288, 290, 296, 299, 300, 302, 303, 304, 305, 308, 309, 314, 317, 318, 323, 326, 330, 331, 334, 335, 336, 337, 338, 340, 343, 346, 348, 349, 350, 353, 355, 356, 360, 361, 363, 368, 370, 371, 373, 377, 378, 379, 383, 386, 387, 389, 394, 395, 396, 397, 406, 410, 411, 414, 416, 427, 428, 429, 430, 431, 432, 436, 438, 439, 441, 444, 445, 447, 449, 450, 451, 452, 454, 456, 457, 458, 459, 460, 464, 466, 471, 472, 475, 476, 477, 479, 480, 482, 486, 487, 488, 490, 492, 493, 494, 495, 497, 500, 501, 502, 506, 507, 508, 510, 511, 514, 515, 516, 517, 518, 519, 520, 525, 527, 530, 531, 536, 537, 539, 540, 541, 542, 546, 554, 555, 557, 560, 561, 565, 566, 570, 571, 575, 576, 579, 581, 589, 590, 591, 593, 595, 596, 597, 599, 601, 602, 605, 611, 612, 613, 614, 616, 618, 621, 622, 624, 625, 628, 632, 634, 635, 636, 639, 642, 643, 644, 646, 647, 652, 653, 654, 656, 660, 666, 671, 672, 673, 674, 675, 676, 682, 683, 690, 691, 692, 694, 695, 698, 702, 703, 706, 707, 708, 717, 718, 720, 721, 726, 727, 728, 729, 730, 734, 736, 740, 745, 749, 754, 758, 761, 763, 766, 770, 772, 774, 778, 780, 782, 784, 788, 791, 794, 795, 798, 799, 801, 803, 805, 806, 809, 817, 819, 820, 821, 823, 824, 825, 826, 827, 828, 834, 837, 839, 840, 843, 844, 845, 847, 850, 851, 852, 854, 856, 859, 860, 861, 862, 863, 864, 866, 869, 870, 871, 875, 883, 884, 889, 890, 891, 893, 895, 896, 899, 904, 905, 907, 911, 913, 914, 918, 920, 923, 924, 926, 927, 928, 932, 933, 935, 936, 937, 939, 942, 945, 947, 949, 952, 953, 954, 956, 959, 960, 961, 962, 964, 966, 969, 970, 973, 976, 977, 980, 981, 982, 984, 987, 989, 991, 994, 997, 998, 999, 1001, 1003, 1004, 1005, 1006, 1007, 1008, 1011, 1012, 1014, 1015, 1019, 1022, 1026, 1028, 1032, 1033, 1038, 1040, 1041, 1042, 1043, 1044, 1048, 1049, 1051, 1053, 1054, 1057, 1058, 1059, 1061, 1063, 1065, 1069, 1071, 1073, 1074, 1075, 1076, 1077, 1080, 1081, 1083, 1086, 1087, 1089, 1090, 1093, 1096, 1100, 1101, 1102, 1103, 1106, 1107, 1108, 1110, 1113, 1117, 1120, 1125, 1126, 1128, 1129, 1130, 1134, 1136, 1137, 1138, 1141, 1143, 1147, 1152, 1154, 1158, 1160, 1161, 1162, 1164, 1166, 1167, 1171, 1172, 1173, 1174, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1185, 1186, 1187, 1192, 1193, 1194, 1195, 1198, 1201, 1203, 1205, 1206, 1210, 1211, 1212, 1214, 1217, 1219, 1220, 1221, 1223, 1227, 1228, 1229, 1230, 1232, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1245, 1247, 1251, 1252, 1254, 1257, 1258, 1259, 1264, 1265, 1266, 1267, 1270, 1271, 1272, 1273, 1274, 1281, 1282, 1283, 1284, 1286, 1287, 1289, 1290, 1292, 1293, 1295, 1299, 1305, 1308, 1311, 1312, 1313, 1315, 1317, 1318, 1319, 1320, 1322, 1324, 1327, 1329, 1330, 1331, 1332, 1337, 1339, 1340, 1342, 1343, 1346, 1348, 1349, 1352, 1353, 1357, 1359, 1360, 1363, 1364, 1365, 1367, 1371, 1372, 1373, 1374, 1375, 1377, 1378, 1379, 1385, 1387, 1388, 1389, 1391, 1392, 1393, 1395, 1400, 1402, 1404, 1405, 1406, 1409, 1410, 1412, 1414, 1417, 1419, 1420, 1421, 1422, 1423, 1424, 1426, 1427, 1433, 1438, 1439, 1440, 1444, 1451, 1452, 1453, 1454, 1455, 1459, 1462, 1464, 1466, 1469, 1471, 1474, 1476, 1477, 1478, 1483, 1486, 1489, 1490, 1492, 1493, 1494, 1495, 1496, 1501, 1502, 1504, 1505, 1507, 1508, 1509, 1512, 1516, 1517, 1518, 1521, 1522, 1524, 1525, 1526, 1527, 1533, 1535, 1536, 1537, 1539, 1541, 1542, 1544, 1545, 1546, 1547, 1548, 1549, 1554, 1555, 1559, 1560, 1562, 1567, 1568, 1570, 1571, 1575, 1576, 1578, 1580, 1584, 1585, 1589, 1590, 1591, 1592, 1593, 1594, 1597, 1599, 1600, 1601, 1603, 1604, 1605, 1607, 1611, 1612, 1613, 1619, 1622, 1624, 1627, 1628, 1629, 1630, 1633, 1634, 1635, 1637, 1638, 1639, 1641, 1642, 1643, 1644, 1645, 1647, 1648, 1649, 1650, 1651, 1654, 1655, 1657, 1658, 1659, 1661, 1665, 1667, 1668, 1669, 1672, 1673, 1674, 1675, 1676, 1679, 1680, 1682, 1683, 1684, 1686, 1690, 1691, 1695, 1697, 1698, 1699, 1705, 1709, 1710, 1711, 1712, 1713, 1716, 1718, 1719, 1721, 1722, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1745, 1746, 1747, 1751, 1752, 1754, 1755, 1756, 1759, 1762, 1771, 1777, 1778, 1779, 1780, 1782, 1783, 1786, 1788, 1791, 1793, 1796, 1798, 1800, 1805, 1806, 1809, 1810, 1812, 1816, 1818, 1822, 1824, 1827, 1834, 1835, 1841, 1853, 1856, 1857, 1858, 1859, 1860, 1861, 1863, 1864, 1865, 1866, 1867, 1869, 1875, 1876, 1877, 1879, 1881, 1882, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1897, 1900, 1901, 1906, 1908, 1914, 1916, 1918, 1919, 1920, 1923, 1928, 1936, 1937, 1940, 1941, 1945, 1946, 1948, 1953, 1956, 1958, 1959, 1961, 1962, 1963, 1964, 1965, 1970, 1971, 1972, 1973, 1974, 1978, 1980, 1981, 1984, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 2000, 2001, 2004, 2009, 2012, 2013, 2016, 2017, 2019, 2021, 2026, 2028, 2031, 2035, 2036, 2040, 2041, 2042, 2048, 2049, 2054, 2056, 2058, 2062, 2064, 2067, 2068, 2070, 2071, 2072, 2076, 2077, 2078, 2079, 2081, 2082, 2084, 2085, 2087, 2088, 2092, 2100, 2105, 2106, 2108, 2109, 2110, 2112, 2113, 2114, 2115, 2118, 2119, 2120, 2121, 2124, 2126, 2132, 2133, 2137, 2139, 2141, 2142, 2146, 2147, 2152, 2153, 2157, 2159, 2161, 2162, 2164, 2167, 2169, 2170, 2172, 2173, 2174, 2175, 2177, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2190, 2192, 2193, 2194, 2195, 2197, 2198, 2200, 2201, 2202, 2204, 2206, 2208, 2210, 2212, 2213, 2216, 2218, 2219, 2222, 2223, 2225, 2226, 2227, 2228, 2229, 2230, 2233, 2235, 2237, 2238, 2240, 2241, 2242, 2243, 2247, 2249, 2250, 2252, 2257, 2260, 2262, 2263, 2265, 2267, 2272, 2274, 2275, 2278, 2280, 2281, 2284, 2285, 2287, 2288, 2289, 2291, 2294, 2295, 2297, 2298, 2304, 2306, 2310, 2311, 2312, 2315, 2317, 2320, 2322, 2324, 2328, 2330, 2331, 2333, 2335, 2337, 2339, 2342, 2344, 2348, 2349, 2351, 2352, 2353, 2357, 2360, 2361, 2364, 2365, 2366, 2371, 2373, 2377, 2378, 2379, 2382, 2384, 2385, 2386, 2389, 2392, 2395, 2396, 2400, 2401, 2404, 2408, 2409, 2410, 2413, 2414, 2416, 2419, 2420, 2423, 2425, 2429, 2433, 2436, 2437, 2438, 2440, 2442, 2443, 2450, 2453, 2454, 2456, 2459, 2462, 2463, 2464, 2469, 2470, 2471, 2472, 2473, 2475, 2480, 2484, 2486, 2488, 2490, 2491, 2496, 2497, 2500, 2502, 2505, 2507, 2509, 2510, 2511, 2512, 2513, 2515, 2517, 2520, 2522, 2529, 2530, 2532, 2535, 2536, 2538, 2539, 2540, 2542, 2544, 2546, 2547, 2548, 2549, 2553, 2555, 2556, 2559, 2560, 2561, 2562, 2570, 2571, 2574, 2575, 2576, 2587, 2589, 2590, 2593, 2596, 2601, 2602, 2603, 2604, 2609, 2614, 2616, 2617, 2624, 2626, 2627, 2628, 2629, 2631, 2632, 2633, 2634, 2637, 2638, 2640, 2641, 2642, 2644, 2645, 2647, 2653, 2657, 2658, 2660, 2663, 2666, 2667, 2674, 2676, 2677, 2678, 2688, 2691, 2693, 2694, 2696, 2700, 2706, 2707, 2709, 2712, 2713, 2714, 2716, 2717, 2721, 2722, 2726, 2727, 2729, 2730, 2731, 2732, 2736, 2738, 2742, 2744, 2745, 2746, 2749, 2752, 2754, 2757, 2759, 2762, 2764, 2766, 2771, 2774, 2776, 2777, 2778, 2784, 2785, 2788, 2790, 2791, 2792, 2793, 2796, 2797, 2798, 2800, 2801, 2803, 2804, 2806, 2807, 2810, 2812, 2813, 2815, 2816, 2820, 2821, 2822, 2823, 2824, 2826, 2827, 2836, 2837, 2843, 2845, 2850, 2851, 2852, 2854, 2857, 2860, 2861, 2862, 2863, 2865, 2866, 2871, 2873, 2875, 2877, 2879, 2880, 2881, 2882, 2884, 2887, 2888, 2892, 2897, 2899, 2902, 2904, 2905, 2906, 2910, 2911, 2912, 2913, 2915, 2916, 2921, 2924, 2927, 2930, 2931, 2933, 2934, 2935, 2938, 2939, 2941, 2944, 2945, 2946, 2949, 2951, 2952, 2953, 2954, 2956, 2958, 2959, 2960, 2966, 2968, 2971, 2977, 2978, 2979, 2982, 2985, 2987, 2993, 2994, 2995, 2997, 2998]}\n"]}],"source":["evaluate_model_with_repetition_penalty(model, tokenizer, model_name, datasets[\"test\"])"]}],"metadata":{"accelerator":"GPU","application/vnd.databricks.v1+notebook":{"dashboards":[],"environmentMetadata":null,"language":"python","notebookMetadata":{"mostRecentlyExecutedCommandWithImplicitDF":{"commandId":-1,"dataframes":["_sqldf"]},"pythonIndentUnit":4},"notebookName":"10_eval-lf-medium-py3.11","widgets":{}},"colab":{"gpuType":"L4","provenance":[]},"kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.11.9"}},"nbformat":4,"nbformat_minor":0}
|
competition/12rp1.1_InterLM_Merged_Model_NV4080.ipynb
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"cells":[{"cell_type":"code","execution_count":1,"metadata":{"executionInfo":{"elapsed":476,"status":"ok","timestamp":1720679526275,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"uWKRSV6eZsCn"},"outputs":[],"source":["%load_ext autoreload\n","%autoreload 2"]},{"cell_type":"code","execution_count":2,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"eb33b19f-1206-41ee-84e2-e6258a12eef7","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":2534,"status":"ok","timestamp":1720679529344,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"xwFh14uiZBrI","outputId":"d767799c-34c2-46a5-f052-378146a55321"},"outputs":[],"source":["from pathlib import Path\n","\n","try:\n"," from google.colab import drive\n","\n"," drive.mount(\"/content/drive\")\n"," workding_dir = \"/content/drive/MyDrive/logical-reasoning/\"\n","except ModuleNotFoundError:\n"," workding_dir = str(Path.cwd().parent)"]},{"cell_type":"code","execution_count":3,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"6d394937-6c99-4a7c-9d32-7600a280032f","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":5,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"G5pNu3zgZBrL","outputId":"160a554f-fb08-4aa0-bc00-0422fb7c1fac"},"outputs":[{"name":"stdout","output_type":"stream","text":["workding dir: /home/inflaton/code/projects/courses/logical-reasoning\n"]}],"source":["import os\n","import sys\n","from pathlib import Path\n","\n","os.chdir(workding_dir)\n","sys.path.append(workding_dir)\n","print(\"workding dir:\", workding_dir)"]},{"cell_type":"code","execution_count":17,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"9f67ec60-2f24-411c-84eb-0dd664b44775","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":3,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"hPCC-6m7ZBrM","outputId":"c7aa2c96-5e99-440a-c148-201d79465ff9"},"outputs":[{"name":"stdout","output_type":"stream","text":["loading env vars from: /home/inflaton/code/projects/courses/logical-reasoning/.env\n"]},{"data":{"text/plain":["True"]},"execution_count":17,"metadata":{},"output_type":"execute_result"}],"source":["from dotenv import find_dotenv, load_dotenv\n","\n","found_dotenv = find_dotenv(\".env\")\n","\n","if len(found_dotenv) == 0:\n"," found_dotenv = find_dotenv(\".env.example\")\n","print(f\"loading env vars from: {found_dotenv}\")\n","load_dotenv(found_dotenv, override=True)"]},{"cell_type":"code","execution_count":18,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"f1597656-8042-4878-9d3b-9ebfb8dd86dc","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":3,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"1M3IraVtZBrM","outputId":"29ab35f6-2970-4ade-d85d-3174acf8cda0"},"outputs":[{"name":"stdout","output_type":"stream","text":["llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full None False datasets/mgtv results/mgtv-results_merged_model.csv\n"]}],"source":["import os\n","\n","model_name = os.getenv(\"MODEL_NAME\")\n","adapter_name_or_path = os.getenv(\"ADAPTER_NAME_OR_PATH\")\n","load_in_4bit = os.getenv(\"LOAD_IN_4BIT\") == \"true\"\n","data_path = os.getenv(\"LOGICAL_REASONING_DATA_PATH\")\n","results_path = os.getenv(\"LOGICAL_REASONING_RESULTS_PATH\")\n","use_english_datasets = os.getenv(\"USE_ENGLISH_DATASETS\") == \"true\"\n","\n","\n","print(model_name, adapter_name_or_path, load_in_4bit, data_path, results_path)"]},{"cell_type":"code","execution_count":6,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"b2a43943-9324-4839-9a47-cfa72de2244b","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":564,"status":"ok","timestamp":1720679529907,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"UgMvt6dIZBrM","outputId":"ce37581c-fd26-46c2-ad87-d933d99f68f7"},"outputs":[{"name":"stdout","output_type":"stream","text":["Python 3.11.9\n","\u001b[33mWARNING: Package(s) not found: flash-attn\u001b[0m\u001b[33m\n","\u001b[0mName: transformers\n","Version: 4.43.0.dev0\n","Summary: State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow\n","Home-page: https://github.com/huggingface/transformers\n","Author: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/transformers/graphs/contributors)\n","Author-email: transformers@huggingface.co\n","License: Apache 2.0 License\n","Location: /home/inflaton/miniconda3/envs/llama-factory/lib/python3.11/site-packages\n","Requires: filelock, huggingface-hub, numpy, packaging, pyyaml, regex, requests, safetensors, tokenizers, tqdm\n","Required-by: llamafactory, peft, trl, vllm\n","CPU times: user 36.5 ms, sys: 11.5 ms, total: 48 ms\n","Wall time: 2.43 s\n"]}],"source":["%%time\n","!python --version\n","!pip show flash-attn\n","!pip show transformers"]},{"cell_type":"code","execution_count":7,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":1685,"status":"ok","timestamp":1720679531591,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"ZuS_FsLyZBrN","outputId":"2cba0105-c505-4395-afbd-2f2fee6581d0"},"outputs":[{"name":"stdout","output_type":"stream","text":["loading /home/inflaton/code/projects/courses/logical-reasoning/llm_toolkit/logical_reasoning_utils.py\n","GPU is available\n"]}],"source":["from llm_toolkit.llm_utils import *\n","from llm_toolkit.logical_reasoning_utils import *\n","\n","device = check_gpu()"]},{"cell_type":"code","execution_count":8,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["loading model: llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full\n"]},{"name":"stderr","output_type":"stream","text":["Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n"]},{"data":{"application/vnd.jupyter.widget-view+json":{"model_id":"94e2d2bde85845d586c341436c8a0142","version_major":2,"version_minor":0},"text/plain":["Loading checkpoint shards: 0%| | 0/8 [00:00<?, ?it/s]"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["WARNING:root:Some parameters are on the meta device device because they were offloaded to the cpu.\n"]},{"name":"stdout","output_type":"stream","text":["CPU times: user 3.54 s, sys: 598 ms, total: 4.14 s\n","Wall time: 6.48 s\n"]}],"source":["%%time\n","\n","model, tokenizer = load_model(model_name)"]},{"cell_type":"code","execution_count":9,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["loading train/test data files\n","DatasetDict({\n"," train: Dataset({\n"," features: ['text', 'label', 'answer', 'title', 'puzzle', 'truth', 'train_text', 'prompt'],\n"," num_rows: 25000\n"," })\n"," test: Dataset({\n"," features: ['text', 'label', 'answer', 'title', 'puzzle', 'truth', 'train_text', 'prompt'],\n"," num_rows: 3000\n"," })\n","})\n"]}],"source":["datasets = load_logical_reasoning_dataset(\n"," data_path,\n"," tokenizer=tokenizer,\n"," chinese_prompt=not use_english_datasets,\n"," using_p1=False,\n",")"]},{"cell_type":"code","execution_count":10,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["<s><|im_start|>system\n","You are an expert in logical reasoning.<|im_end|>\n","<|im_start|>user\n","你是一个情景猜谜游戏的主持人。游戏规则如下:\n","\n","1. 参与者会得到一个谜面,谜面会描述一个简单又难以理解的事件。\n","2. 主持人知道谜底,谜底是谜面的答案。\n","3. 参与者可以询问任何封闭式问题来找寻事件的真相。\n","4. 对于每个问题,主持人将根据实际情况回答以下五个选项之一:是、不是、不重要、回答正确、问法错误。各回答的判断标准如下:\n"," - 若谜面和谜底能找到问题的答案,回答:是或者不是\n"," - 若谜面和谜底不能直接或者间接推断出问题的答案,回答:不重要\n"," - 若参与者提问不是一个封闭式问题或者问题难以理解,回答:问法错误\n"," - 若参与者提问基本还原了谜底真相,回答:回答正确\n","5. 回答中不能添加任何其它信息,也不能省略选项中的任何一个字。例如,不可以把“不是”省略成“不”。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","**谜面:** 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","**谜底:** 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱��爷爷。\n","\n","**参与者提出的问题:** 哭泣和村庄有关系吗\n","<|im_end|>\n","<|im_start|>assistant\n","\n","----------------------------------------\n","<s><s><|im_start|>system\n","You are an expert in logical reasoning.<|im_end|>\n","<|im_start|>user\n","你是一个情景猜谜游戏的主持人。游戏规则如下:\n","\n","1. 参与者会得到一个谜面,谜面会描述一个简单又难以理解的事件。\n","2. 主持人知道谜底,谜底是谜面的答案。\n","3. 参与者可以询问任何封闭式问题来找寻事件的真相。\n","4. 对于每个问题,主持人将根据实际情况回答以下五个选项之一:是、不是、不重要、回答正确、问法错误。各回答的判断标准如下:\n"," - 若谜面和谜底能找到问题的答案,回答:是或者不是\n"," - 若谜面和谜底不能直接或者间接推断出问题的答案,回答:不重要\n"," - 若参与者提问不是一个封闭式问题或者问题难以理解,回答:问法错误\n"," - 若参与者提问基本还原了谜底真相,回答:回答正确\n","5. 回答中不能添加任何其它信息,也不能省略选项中的任何一个字。例如,不可以把“不是”省略成“不”。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","**谜面:** 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","**谜底:** 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","\n","**参与者提出的问题:** 哭泣和村庄有关系吗\n","<|im_end|>\n","<|im_start|>assistant\n","是</s>\n","CPU times: user 2.27 s, sys: 425 ms, total: 2.7 s\n","Wall time: 3.44 s\n"]}],"source":["%%time\n","\n","prompt1 = datasets[\"test\"][\"prompt\"][1000]\n","print(prompt1)\n","print(\"--\" * 20)\n","test_model(model, tokenizer, prompt1, device=device)"]},{"cell_type":"code","execution_count":11,"metadata":{},"outputs":[{"name":"stderr","output_type":"stream","text":[" 12%|█▎ | 1/8 [00:02<00:14, 2.04s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 8/8 [00:14<00:00, 1.78s/it]"]},{"name":"stdout","output_type":"stream","text":["CPU times: user 13.2 s, sys: 518 ms, total: 13.7 s\n","Wall time: 14.3 s\n"]},{"name":"stderr","output_type":"stream","text":["\n"]},{"data":{"text/plain":["['不是', '是', '是', '是', '不是', '是', '不重要', '不是']"]},"execution_count":11,"metadata":{},"output_type":"execute_result"}],"source":["%%time\n","\n","eval_model(model, tokenizer, datasets[\"test\"][:10], device=device)"]},{"cell_type":"code","execution_count":19,"metadata":{"id":"L370pvGTZBrN"},"outputs":[],"source":["def evaluate_model(model, tokenizer, model_name, dataset):\n"," print(f\"Evaluating model: {model_name} on {device}\")\n"," predictions = eval_model(model, tokenizer, dataset, device=device)\n","\n"," model_name += \"_NV4080_rp1.1\"\n","\n"," save_results(\n"," model_name,\n"," results_path,\n"," dataset,\n"," predictions,\n"," debug=True,\n"," )\n","\n"," metrics = calc_metrics(dataset[\"label\"], predictions, debug=True)\n"," print(metrics)"]},{"cell_type":"code","execution_count":21,"metadata":{"id":"WUFjhxmiZBrN"},"outputs":[{"name":"stdout","output_type":"stream","text":["Evaluating model: llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full on cuda\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:02<2:18:19, 2.77s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是</s>\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [2:01:28<00:00, 2.43s/it] \n"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩���,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.1 \n","0 不是 \n","{'accuracy': 0.531, 'incorrect_ids': [9, 19, 21, 23, 24, 29, 34, 36, 42, 49, 55, 58, 59, 61, 62, 63, 64, 65, 66, 67, 71, 72, 75, 76, 78, 79, 81, 82, 83, 84, 87, 88, 91, 93, 96, 99, 101, 103, 104, 105, 106, 110, 111, 112, 113, 115, 116, 117, 121, 127, 128, 129, 131, 134, 135, 136, 137, 138, 139, 143, 144, 145, 146, 149, 150, 153, 154, 155, 159, 161, 164, 169, 170, 171, 173, 174, 175, 178, 179, 182, 183, 188, 189, 190, 193, 197, 198, 199, 200, 202, 205, 206, 207, 210, 214, 215, 218, 220, 221, 222, 224, 227, 228, 231, 233, 236, 237, 245, 247, 249, 250, 251, 252, 258, 259, 260, 263, 266, 268, 269, 271, 275, 276, 279, 283, 284, 286, 288, 290, 296, 299, 300, 302, 303, 304, 305, 308, 309, 314, 317, 318, 323, 326, 330, 331, 334, 335, 336, 337, 338, 340, 343, 346, 348, 349, 350, 353, 355, 356, 360, 361, 363, 368, 370, 371, 373, 377, 378, 379, 383, 386, 387, 389, 394, 395, 396, 397, 406, 410, 411, 414, 416, 427, 428, 429, 430, 431, 432, 436, 438, 439, 441, 444, 445, 447, 449, 450, 451, 452, 454, 456, 457, 458, 459, 460, 464, 466, 471, 472, 475, 476, 477, 479, 480, 482, 486, 487, 488, 490, 492, 493, 494, 495, 497, 500, 501, 502, 506, 507, 508, 510, 511, 514, 515, 516, 517, 518, 519, 520, 525, 527, 530, 531, 536, 537, 539, 540, 541, 542, 546, 554, 555, 557, 560, 561, 565, 566, 570, 571, 575, 576, 579, 581, 589, 590, 591, 593, 595, 596, 597, 599, 601, 602, 605, 611, 612, 613, 614, 616, 618, 621, 622, 624, 625, 628, 632, 634, 635, 636, 639, 642, 643, 644, 646, 647, 652, 653, 654, 656, 660, 666, 671, 672, 673, 674, 675, 676, 682, 683, 690, 691, 692, 694, 695, 698, 702, 703, 706, 707, 708, 717, 718, 720, 721, 726, 727, 728, 729, 730, 734, 736, 740, 745, 749, 754, 758, 761, 763, 766, 770, 772, 774, 778, 780, 782, 784, 788, 791, 794, 795, 798, 799, 801, 803, 805, 806, 809, 817, 819, 820, 821, 823, 824, 825, 826, 827, 828, 834, 837, 839, 840, 843, 844, 845, 847, 850, 851, 852, 854, 856, 859, 860, 861, 862, 863, 864, 866, 869, 870, 871, 875, 883, 884, 889, 890, 891, 893, 895, 896, 899, 904, 905, 907, 911, 913, 914, 918, 920, 923, 924, 926, 927, 928, 932, 933, 935, 936, 937, 939, 942, 945, 947, 949, 952, 953, 954, 956, 959, 960, 961, 962, 964, 966, 969, 970, 973, 976, 977, 980, 981, 982, 984, 987, 989, 991, 994, 997, 998, 999, 1001, 1003, 1004, 1005, 1006, 1007, 1008, 1011, 1012, 1014, 1015, 1019, 1022, 1026, 1028, 1032, 1033, 1038, 1040, 1041, 1042, 1043, 1044, 1048, 1049, 1051, 1053, 1054, 1057, 1058, 1059, 1061, 1063, 1065, 1069, 1071, 1073, 1074, 1075, 1076, 1077, 1080, 1081, 1083, 1086, 1087, 1089, 1090, 1093, 1096, 1100, 1101, 1102, 1103, 1106, 1107, 1108, 1110, 1113, 1117, 1120, 1125, 1126, 1128, 1129, 1130, 1134, 1136, 1137, 1138, 1141, 1143, 1147, 1152, 1154, 1158, 1160, 1161, 1162, 1164, 1166, 1167, 1171, 1172, 1173, 1174, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1185, 1186, 1187, 1192, 1193, 1194, 1195, 1198, 1201, 1203, 1205, 1206, 1210, 1211, 1212, 1214, 1217, 1219, 1220, 1221, 1223, 1227, 1228, 1229, 1230, 1232, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1245, 1247, 1251, 1252, 1254, 1257, 1258, 1259, 1264, 1265, 1266, 1267, 1270, 1271, 1272, 1273, 1274, 1281, 1282, 1283, 1284, 1286, 1287, 1289, 1290, 1292, 1293, 1295, 1299, 1305, 1308, 1311, 1312, 1313, 1315, 1317, 1318, 1319, 1320, 1322, 1324, 1327, 1329, 1330, 1331, 1332, 1337, 1339, 1340, 1342, 1343, 1346, 1348, 1349, 1352, 1353, 1357, 1359, 1360, 1363, 1364, 1365, 1367, 1371, 1372, 1373, 1374, 1375, 1377, 1378, 1379, 1385, 1387, 1388, 1389, 1391, 1392, 1393, 1395, 1400, 1402, 1404, 1405, 1406, 1409, 1410, 1412, 1414, 1417, 1419, 1420, 1421, 1422, 1423, 1424, 1426, 1427, 1433, 1438, 1439, 1440, 1444, 1451, 1452, 1453, 1454, 1455, 1459, 1462, 1464, 1466, 1469, 1471, 1474, 1476, 1477, 1478, 1483, 1486, 1489, 1490, 1492, 1493, 1494, 1495, 1496, 1501, 1502, 1504, 1505, 1507, 1508, 1509, 1512, 1516, 1517, 1518, 1521, 1522, 1524, 1525, 1526, 1527, 1533, 1535, 1536, 1537, 1539, 1541, 1542, 1544, 1545, 1546, 1547, 1548, 1549, 1554, 1555, 1559, 1560, 1562, 1567, 1568, 1570, 1571, 1575, 1576, 1578, 1580, 1584, 1585, 1589, 1590, 1591, 1592, 1593, 1594, 1597, 1599, 1600, 1601, 1603, 1604, 1605, 1607, 1611, 1612, 1613, 1619, 1622, 1624, 1627, 1628, 1629, 1630, 1633, 1634, 1635, 1637, 1638, 1639, 1641, 1642, 1643, 1644, 1645, 1647, 1648, 1649, 1650, 1651, 1654, 1655, 1657, 1658, 1659, 1661, 1665, 1667, 1668, 1669, 1672, 1673, 1674, 1675, 1676, 1679, 1680, 1682, 1683, 1684, 1686, 1690, 1691, 1695, 1697, 1698, 1699, 1705, 1709, 1710, 1711, 1712, 1713, 1716, 1718, 1719, 1721, 1722, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1745, 1746, 1747, 1751, 1752, 1754, 1755, 1756, 1759, 1762, 1771, 1777, 1778, 1779, 1780, 1782, 1783, 1786, 1788, 1791, 1793, 1796, 1798, 1800, 1805, 1806, 1809, 1810, 1812, 1816, 1818, 1822, 1824, 1827, 1834, 1835, 1841, 1853, 1856, 1857, 1858, 1859, 1860, 1861, 1863, 1864, 1865, 1866, 1867, 1869, 1875, 1876, 1877, 1879, 1881, 1882, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1897, 1900, 1901, 1906, 1908, 1914, 1916, 1918, 1919, 1920, 1923, 1928, 1936, 1937, 1940, 1941, 1945, 1946, 1948, 1953, 1956, 1958, 1959, 1961, 1962, 1963, 1964, 1965, 1970, 1971, 1972, 1973, 1974, 1978, 1980, 1981, 1984, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 2000, 2001, 2004, 2009, 2012, 2013, 2016, 2017, 2019, 2021, 2026, 2028, 2031, 2035, 2036, 2040, 2041, 2042, 2048, 2049, 2054, 2056, 2058, 2062, 2064, 2067, 2068, 2070, 2071, 2072, 2076, 2077, 2078, 2079, 2081, 2082, 2084, 2085, 2087, 2088, 2092, 2100, 2105, 2106, 2108, 2109, 2110, 2112, 2113, 2114, 2115, 2118, 2119, 2120, 2121, 2124, 2126, 2132, 2133, 2137, 2139, 2141, 2142, 2146, 2147, 2152, 2153, 2157, 2159, 2161, 2162, 2164, 2167, 2169, 2170, 2172, 2173, 2174, 2175, 2177, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2190, 2192, 2193, 2194, 2195, 2197, 2198, 2200, 2201, 2202, 2204, 2206, 2208, 2210, 2212, 2213, 2216, 2218, 2219, 2222, 2223, 2225, 2226, 2227, 2228, 2229, 2230, 2233, 2235, 2237, 2238, 2240, 2241, 2242, 2243, 2247, 2249, 2250, 2252, 2257, 2260, 2262, 2263, 2265, 2267, 2272, 2274, 2275, 2278, 2280, 2281, 2284, 2285, 2287, 2288, 2289, 2291, 2294, 2295, 2297, 2298, 2304, 2306, 2310, 2311, 2312, 2315, 2317, 2320, 2322, 2324, 2328, 2330, 2331, 2333, 2335, 2337, 2339, 2342, 2344, 2348, 2349, 2351, 2352, 2353, 2357, 2360, 2361, 2364, 2365, 2366, 2371, 2373, 2377, 2378, 2379, 2382, 2384, 2385, 2386, 2389, 2392, 2395, 2396, 2400, 2401, 2404, 2408, 2409, 2410, 2413, 2414, 2416, 2419, 2420, 2423, 2425, 2429, 2433, 2436, 2437, 2438, 2440, 2442, 2443, 2450, 2453, 2454, 2456, 2459, 2462, 2463, 2464, 2469, 2470, 2471, 2472, 2473, 2475, 2480, 2484, 2486, 2488, 2490, 2491, 2496, 2497, 2500, 2502, 2505, 2507, 2509, 2510, 2511, 2512, 2513, 2515, 2517, 2520, 2522, 2529, 2530, 2532, 2535, 2536, 2538, 2539, 2540, 2542, 2544, 2546, 2547, 2548, 2549, 2553, 2555, 2556, 2559, 2560, 2561, 2562, 2570, 2571, 2574, 2575, 2576, 2587, 2589, 2590, 2593, 2596, 2601, 2602, 2603, 2604, 2609, 2614, 2616, 2617, 2624, 2626, 2627, 2628, 2629, 2631, 2632, 2633, 2634, 2637, 2638, 2640, 2641, 2642, 2644, 2645, 2647, 2653, 2657, 2658, 2660, 2663, 2666, 2667, 2674, 2676, 2677, 2678, 2688, 2691, 2693, 2694, 2696, 2700, 2706, 2707, 2709, 2712, 2713, 2714, 2716, 2717, 2721, 2722, 2726, 2727, 2729, 2730, 2731, 2732, 2736, 2738, 2742, 2744, 2745, 2746, 2749, 2752, 2754, 2757, 2759, 2762, 2764, 2766, 2771, 2774, 2776, 2777, 2778, 2784, 2785, 2788, 2790, 2791, 2792, 2793, 2796, 2797, 2798, 2800, 2801, 2803, 2804, 2806, 2807, 2810, 2812, 2813, 2815, 2816, 2820, 2821, 2822, 2823, 2824, 2826, 2827, 2836, 2837, 2843, 2845, 2850, 2851, 2852, 2854, 2857, 2860, 2861, 2862, 2863, 2865, 2866, 2871, 2873, 2875, 2877, 2879, 2880, 2881, 2882, 2884, 2887, 2888, 2892, 2897, 2899, 2902, 2904, 2905, 2906, 2910, 2911, 2912, 2913, 2915, 2916, 2921, 2924, 2927, 2930, 2931, 2933, 2934, 2935, 2938, 2939, 2941, 2944, 2945, 2946, 2949, 2951, 2952, 2953, 2954, 2956, 2958, 2959, 2960, 2966, 2968, 2971, 2977, 2978, 2979, 2982, 2985, 2987, 2993, 2994, 2995, 2997, 2998]}\n","CPU times: user 1h 52min 19s, sys: 5min 9s, total: 1h 57min 29s\n","Wall time: 2h 1min 29s\n"]}],"source":["%%time\n","\n","evaluate_model(model, tokenizer, model_name, datasets[\"test\"])"]}],"metadata":{"accelerator":"GPU","application/vnd.databricks.v1+notebook":{"dashboards":[],"environmentMetadata":null,"language":"python","notebookMetadata":{"mostRecentlyExecutedCommandWithImplicitDF":{"commandId":-1,"dataframes":["_sqldf"]},"pythonIndentUnit":4},"notebookName":"10_eval-lf-medium-py3.11","widgets":{}},"colab":{"gpuType":"L4","provenance":[]},"kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.11.9"}},"nbformat":4,"nbformat_minor":0}
|
results/llama3-8b_lora_sft_bf16-p1.csv
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
results/llama3-8b_lora_sft_bf16-p2.csv
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
results/mgtv-llama3_p1_full_metrics.csv
CHANGED
@@ -1,8 +1,3 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
2,shenzhi-wang/Llama3-8B-Chinese-Chat_checkpoint-350,0.314,0.8230975844189062,0.314,0.44460745309834776
|
5 |
-
3,shenzhi-wang/Llama3-8B-Chinese-Chat_checkpoint-525,,,,
|
6 |
-
4,shenzhi-wang/Llama3-8B-Chinese-Chat_checkpoint-700,0.0,0.0,0.0,0.0
|
7 |
-
5,shenzhi-wang/Llama3-8B-Chinese-Chat_checkpoint-875,,,,
|
8 |
-
6,shenzhi-wang/Llama3-8B-Chinese-Chat_checkpoint-1050,0.5506666666666666,0.7209974218469999,0.5506666666666666,0.6017622173499129
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0bd91260fe70560b3e36aa0941b0cd71f7a128c7490b7596c8aa972b45f4581c
|
3 |
+
size 676
|
|
|
|
|
|
|
|
|
|
results/mgtv-llama3_p2_full_metrics.csv
CHANGED
@@ -1,8 +1,3 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
2,shenzhi-wang/Llama3-8B-Chinese-Chat_checkpoint-350,,,,
|
5 |
-
3,shenzhi-wang/Llama3-8B-Chinese-Chat_checkpoint-525,,,,
|
6 |
-
4,shenzhi-wang/Llama3-8B-Chinese-Chat_checkpoint-700,,,,
|
7 |
-
5,shenzhi-wang/Llama3-8B-Chinese-Chat_checkpoint-875,,,,
|
8 |
-
6,shenzhi-wang/Llama3-8B-Chinese-Chat_checkpoint-1050,0.6656666666666666,0.7924121951113166,0.6656666666666666,0.7124311215236507
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d8c2c086a75ff1255303e3336296121696f55a630f2f1930e1ed90faa53c1022
|
3 |
+
size 542
|
|
|
|
|
|
|
|
|
|
results/mgtv-results_merged_model.csv
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
results/mgtv-results_p1_full_metrics.csv
CHANGED
@@ -1,6 +1,3 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
2,internlm/internlm2_5-7b-chat-1m_checkpoint-88,0.7413333333333333,0.8161818707270968,0.7413333333333333,0.7695238425053844
|
5 |
-
3,internlm/internlm2_5-7b-chat-1m_checkpoint-132,0.755,0.8098286657868853,0.755,0.775657157343396
|
6 |
-
4,internlm/internlm2_5-7b-chat-1m_checkpoint-176,0.719,0.8033073302806261,0.719,0.7503194138525128
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7ca185069bf600862bb3e083b5711f7db29e614c2c75ac5b540ff7ccca96ad03
|
3 |
+
size 595
|
|
|
|
|
|
results/mgtv-results_p2_full_metrics.csv
CHANGED
@@ -1,8 +1,3 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
2,internlm/internlm2_5-7b-chat-1m_checkpoint-176,0.7813333333333333,0.8047159646469545,0.7813333333333333,0.7885809515702639
|
5 |
-
3,internlm/internlm2_5-7b-chat-1m_checkpoint-264,0.759,0.8055016850419279,0.759,0.7772366362599777
|
6 |
-
4,internlm/internlm2_5-7b-chat-1m_checkpoint-352,0.7303333333333333,0.790676222309579,0.7303333333333333,0.7537162708213547
|
7 |
-
5,internlm/internlm2_5-7b-chat-1m_checkpoint-440,0.7303333333333333,0.7904201181031161,0.7303333333333333,0.7537502448450035
|
8 |
-
6,internlm/internlm2_5-7b-chat-1m_checkpoint-528,0.716,0.7898918870718658,0.716,0.7448330530646626
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:26ea6352e941de7f756c917a247a09d46d2aa83b1e87349efb740e1c00c360cc
|
3 |
+
size 834
|
|
|
|
|
|
|
|
|
|