{"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":"ac667aba-076e-4de6-9984-8f6a67cb09cd","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":4,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"0dVRAabNZBrL","outputId":"b977e116-df16-47cd-9160-a24f611da687"},"outputs":[{"data":{"text/plain":["False"]},"execution_count":4,"metadata":{},"output_type":"execute_result"}],"source":["need_to_setup_env = False\n","need_to_setup_env"]},{"cell_type":"code","execution_count":5,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"72f9cf79-7b0d-4d9e-90a0-1fa5251b947f","showTitle":false,"title":""},"executionInfo":{"elapsed":4,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"hKUOfP2HZBrL"},"outputs":[],"source":["if need_to_setup_env:\n"," %pip install -r requirements.txt\n"," %cd /content/\n"," %rm -rf LLaMA-Factory\n"," !git clone https://github.com/hiyouga/LLaMA-Factory.git\n"," %cd LLaMA-Factory\n"," %ls\n"," %pip install -e .[torch,bitsandbytes]\n"," \n"," os.chdir(workding_dir)\n"," sys.path.append(workding_dir)\n"," print(\"workding dir:\", workding_dir)"]},{"cell_type":"code","execution_count":6,"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":6,"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":7,"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":["internlm/internlm2_5-7b-chat-1m None True datasets/mgtv results/mgtv-results_bf16.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","print(model_name, adapter_name_or_path, load_in_4bit, data_path, results_path)"]},{"cell_type":"code","execution_count":8,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"e3ab54ba-7b6d-4817-bf2e-c5d711508b58","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":2,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"mrVEz6UsZBrM","outputId":"8bcff769-2573-4dae-e124-d5b5d2382d71"},"outputs":[{"name":"stdout","output_type":"stream","text":["Thu Jul 11 17:21:42 2024 \n","+---------------------------------------------------------------------------------------+\n","| NVIDIA-SMI 545.23.07 Driver Version: 546.12 CUDA Version: 12.3 |\n","|-----------------------------------------+----------------------+----------------------+\n","| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |\n","| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |\n","| | | MIG M. |\n","|=========================================+======================+======================|\n","| 0 NVIDIA GeForce RTX 4080 ... On | 00000000:01:00.0 Off | N/A |\n","| N/A 50C P8 2W / 150W | 0MiB / 12282MiB | 0% Default |\n","| | | N/A |\n","+-----------------------------------------+----------------------+----------------------+\n"," \n","+---------------------------------------------------------------------------------------+\n","| Processes: |\n","| GPU GI CI PID Type Process name GPU Memory |\n","| ID ID Usage |\n","|=======================================================================================|\n","| No running processes found |\n","+---------------------------------------------------------------------------------------+\n"]}],"source":["!nvidia-smi"]},{"cell_type":"code","execution_count":9,"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 29.7 ms, sys: 12.1 ms, total: 41.8 ms\n","Wall time: 1.24 s\n"]}],"source":["%%time\n","!python --version\n","!pip show flash-attn"]},{"cell_type":"code","execution_count":10,"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"]}],"source":["from llm_toolkit.logical_reasoning_utils import *"]},{"cell_type":"code","execution_count":11,"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":224},"executionInfo":{"elapsed":715,"status":"ok","timestamp":1720679532304,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"muFDE9DpZBrN","outputId":"95672b22-99b7-41b7-f992-18b193994f66"},"outputs":[{"name":"stdout","output_type":"stream","text":["loading existing data from: llama-factory/data/alpaca_mgtv_p1.json\n"]},{"data":{"text/html":["
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
instructioninputoutput
0你是一个逻辑游戏的主持人。游戏规则如下:\\n\\n1. 参与者会得到一个谜题。\\n2. 参与者...不是
1你是一个逻辑游戏的主持人。游戏规则如下:\\n\\n1. 参与者会得到一个谜题。\\n2. 参与者...不是
2你是一个逻辑游戏的主持人。游戏规则如下:\\n\\n1. 参与者会得到一个谜题。\\n2. 参与者...不重要
3你是一个逻辑游戏的主持人。游戏规则如下:\\n\\n1. 参与者会得到一个谜题。\\n2. 参与者...不是
4你是一个逻辑游戏的主持人。游戏规则如下:\\n\\n1. 参与者会得到一个谜题。\\n2. 参与者...
\n","
"],"text/plain":[" instruction input output\n","0 你是一个逻辑游戏的主持人。游戏规则如下:\\n\\n1. 参与者会得到一个谜题。\\n2. 参与者... 不是\n","1 你是一个逻辑游戏的主持人。游戏规则如下:\\n\\n1. 参与者会得到一个谜题。\\n2. 参与者... 不是\n","2 你是一个逻辑游戏的主持人。游戏规则如下:\\n\\n1. 参与者会得到一个谜题。\\n2. 参与者... 不重要\n","3 你是一个逻辑游戏的主持人。游戏规则如下:\\n\\n1. 参与者会得到一个谜题。\\n2. 参与者... 不是\n","4 你是一个逻辑游戏的主持人。游戏规则如下:\\n\\n1. 参与者会得到一个谜题。\\n2. 参与者... 是"]},"execution_count":11,"metadata":{},"output_type":"execute_result"}],"source":["df_alpaca = load_alpaca_data(data_path)\n","df_alpaca.head()"]},{"cell_type":"code","execution_count":12,"metadata":{"id":"L370pvGTZBrN"},"outputs":[],"source":["def evaluate_model_all_epochs(model_name, adapter_path_base, num_train_epochs, start_epoch=0, load_in_4bit=True, num_of_entries=-1):\n"," os.environ[\"MODEL_NAME\"] = model_name\n"," os.environ[\"LOAD_IN_4BIT\"] = \"true\" if load_in_4bit else \"false\"\n"," for i in range(start_epoch, num_train_epochs + 1):\n"," print(f\"Epoch {i}\")\n"," if i == 0:\n"," os.unsetenv(\"ADAPTER_NAME_OR_PATH\")\n"," else:\n"," adapter_path = f\"{adapter_path_base}/checkpoint-{562 * i}\"\n"," os.environ[\"ADAPTER_NAME_OR_PATH\"] = adapter_path\n","\n"," !python llm_toolkit/eval_logical_reasoning.py {num_of_entries}"]},{"cell_type":"code","execution_count":13,"metadata":{"id":"WUFjhxmiZBrN"},"outputs":[{"name":"stdout","output_type":"stream","text":["Epoch 0\n","loading env vars from: /home/inflaton/code/projects/courses/logical-reasoning/.env\n","Adding /home/inflaton/code/projects/courses/logical-reasoning to sys.path\n","loading /home/inflaton/code/projects/courses/logical-reasoning/llm_toolkit/logical_reasoning_utils.py\n","internlm/internlm2_5-7b-chat-1m None False datasets/mgtv results/mgtv-results_bf16.csv\n","(1) GPU = NVIDIA GeForce RTX 4080 Laptop GPU. Max memory = 11.994 GB.\n","0.0 GB of memory reserved.\n","loading model: internlm/internlm2_5-7b-chat-1m\n","Loading checkpoint shards: 100%|██████████████████| 8/8 [10:28<00:00, 78.57s/it]\n","WARNING:root:Some parameters are on the meta device device because they were offloaded to the cpu.\n","(2) GPU = NVIDIA GeForce RTX 4080 Laptop GPU. Max memory = 11.994 GB.\n","8.834 GB of memory reserved.\n","loading train/test data files\n","Map: 100%|███████████████████████| 25000/25000 [00:04<00:00, 6031.16 examples/s]\n","Map: 100%|█████████████████████████| 3000/3000 [00:00<00:00, 3264.59 examples/s]\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","--------------------------------------------------\n","text: 甄加索是自杀吗\n","--------------------------------------------------\n","label: 不是\n","--------------------------------------------------\n","answer: nan\n","--------------------------------------------------\n","title: 海岸之谜\n","--------------------------------------------------\n","puzzle: 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任何打斗的迹象。请问甄加索的死因是什么?\n","--------------------------------------------------\n","truth: 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在创作一幅描绘海洋生物的画作。在画即将完成的前一天晚上,他骑着自行车外出,打算在海边观赏夜景。然而,他在沙滩上意外发现了一只搁浅的海豚,为了救助这只海豚,他耗费了极大的体力,最终成功将其送回海中。筋疲力尽的甄加索在沙滩上睡着了,由于他患有严重的心脏病,却未告知旁人,在寒冷的海风中,他的心脏停止了跳动。因此,警方在现场只发现了车轮痕迹和未完成的画作,而没有发现任何他杀的迹象。\n","--------------------------------------------------\n","train_text: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任何打斗的迹象。请问甄加索的死因是什么?\n","\n","实际情况: 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在创作一幅描绘海洋生物的画作。在画即将完成的前一天晚上,他骑着自行车外出,打算在海边观赏夜景。然而,他在沙滩上意外发现了一只搁浅的海豚,为了救助这只海豚,他耗费了极大的体力,最终成功将其送回海中。筋疲力尽的甄加索在沙滩上睡着了,由于他患有严重的心脏病,却未告知旁人,在寒冷的海风中,他的心脏停止了跳动。因此,警方在现场只发现了车轮痕迹和未完成的画作,而没有发现任何他杀的迹象。\n","\n","参与者提出的问题: 甄加索是自杀吗\n","<|im_end|>\n","<|im_start|>assistant\n","不是\n","--------------------------------------------------\n","prompt: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任何打斗的迹象。请问甄加索的死因是什么?\n","\n","实际情况: 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在创作一幅描绘海洋生物的画作。在画即将完成的前一天晚上,他骑着自行车外出,打算在海边观赏夜景。然而,他在沙滩上意外发现了一只搁浅的海豚,为了救助这只海豚,他耗费了极大的体力,最终成功将其送回海中。筋疲力尽的甄加索在沙滩上睡着了,由于他患有严重的心脏病,却未告知旁人,在寒冷的海风中,他的心脏停止了跳动。因此,警方在现场只发现了车轮痕迹和未完成的画作,而没有发现任何他杀的迹象。\n","\n","参与者提出的问题: 甄加索是自杀吗\n","<|im_end|>\n","<|im_start|>assistant\n","\n","--------------------------------------------------\n","text: 死者受伤了吗\n","--------------------------------------------------\n","label: 不是\n","--------------------------------------------------\n","answer: nan\n","--------------------------------------------------\n","title: 甄庄哭声\n","--------------------------------------------------\n","puzzle: 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","--------------------------------------------------\n","truth: 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","--------------------------------------------------\n","train_text: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","实际情况: 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","\n","参与者提出的问题: 死者受伤了吗\n","<|im_end|>\n","<|im_start|>assistant\n","不是\n","--------------------------------------------------\n","prompt: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","实际情况: 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","\n","参与者提出的问题: 死者受伤了吗\n","<|im_end|>\n","<|im_start|>assistant\n","\n","Evaluating model: internlm/internlm2_5-7b-chat-1m\n"," 0%| | 0/3000 [00:00\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n","100%|█████████████████████████████████████| 3000/3000 [2:45:55<00:00, 3.32s/it]\n","(3) GPU = NVIDIA GeForce RTX 4080 Laptop GPU. Max memory = 11.994 GB.\n","9.9 GB of memory reserved.\n"," text ... internlm/internlm2_5-7b-chat-1m\n","0 甄加索是自杀吗 ... 不是\n","\n","[1 rows x 6 columns]\n","{'accuracy': 0.7586666666666667, 'incorrect_ids': [2, 9, 11, 14, 15, 16, 18, 19, 29, 31, 36, 48, 52, 53, 59, 61, 66, 67, 75, 76, 78, 80, 81, 82, 83, 84, 88, 91, 93, 94, 96, 99, 103, 104, 105, 106, 113, 115, 117, 120, 121, 123, 126, 128, 129, 136, 141, 143, 149, 150, 153, 155, 161, 164, 173, 190, 191, 193, 199, 200, 201, 202, 218, 224, 226, 227, 228, 230, 234, 236, 237, 238, 245, 248, 250, 252, 259, 260, 261, 264, 269, 275, 276, 278, 279, 283, 284, 290, 293, 295, 299, 308, 311, 314, 318, 319, 320, 324, 325, 328, 334, 335, 337, 338, 339, 343, 346, 349, 356, 361, 368, 370, 375, 377, 383, 384, 386, 389, 397, 409, 410, 425, 429, 430, 432, 438, 445, 447, 450, 452, 453, 454, 456, 457, 458, 464, 465, 469, 470, 471, 472, 478, 481, 486, 490, 492, 495, 497, 501, 502, 503, 506, 507, 510, 515, 516, 517, 518, 519, 520, 533, 536, 538, 540, 541, 543, 560, 561, 566, 570, 571, 579, 581, 589, 593, 597, 614, 622, 635, 636, 647, 649, 650, 651, 666, 671, 680, 693, 695, 700, 708, 720, 721, 727, 730, 734, 738, 742, 748, 754, 758, 760, 764, 768, 769, 770, 774, 778, 781, 788, 794, 801, 807, 819, 820, 821, 823, 824, 826, 828, 832, 837, 840, 841, 844, 847, 848, 856, 862, 866, 869, 870, 875, 886, 889, 890, 894, 899, 904, 913, 919, 921, 922, 927, 930, 932, 935, 940, 942, 943, 945, 952, 960, 964, 965, 966, 969, 974, 980, 982, 989, 991, 998, 1001, 1003, 1005, 1006, 1011, 1014, 1016, 1018, 1019, 1023, 1024, 1027, 1029, 1030, 1033, 1036, 1038, 1040, 1043, 1051, 1052, 1053, 1056, 1057, 1061, 1062, 1076, 1083, 1087, 1089, 1096, 1114, 1120, 1121, 1125, 1126, 1129, 1133, 1161, 1164, 1166, 1170, 1174, 1177, 1180, 1181, 1183, 1185, 1188, 1196, 1198, 1203, 1209, 1212, 1222, 1228, 1232, 1238, 1239, 1240, 1241, 1251, 1252, 1254, 1258, 1259, 1266, 1276, 1278, 1279, 1282, 1288, 1289, 1298, 1305, 1308, 1313, 1314, 1315, 1317, 1324, 1331, 1339, 1342, 1345, 1349, 1353, 1357, 1363, 1364, 1367, 1373, 1377, 1386, 1387, 1388, 1390, 1400, 1402, 1405, 1406, 1409, 1412, 1417, 1420, 1422, 1426, 1436, 1438, 1440, 1443, 1446, 1449, 1451, 1453, 1454, 1459, 1462, 1469, 1476, 1478, 1484, 1486, 1490, 1491, 1494, 1496, 1501, 1506, 1510, 1512, 1517, 1519, 1525, 1526, 1543, 1544, 1547, 1551, 1554, 1559, 1562, 1572, 1577, 1580, 1593, 1596, 1603, 1604, 1605, 1613, 1614, 1623, 1627, 1633, 1637, 1641, 1643, 1645, 1647, 1648, 1650, 1652, 1653, 1654, 1655, 1659, 1662, 1665, 1672, 1678, 1679, 1685, 1686, 1691, 1694, 1695, 1698, 1716, 1717, 1718, 1726, 1727, 1734, 1736, 1739, 1751, 1755, 1756, 1757, 1762, 1766, 1769, 1773, 1780, 1785, 1790, 1791, 1798, 1804, 1812, 1816, 1818, 1826, 1827, 1835, 1839, 1841, 1848, 1858, 1867, 1869, 1879, 1884, 1888, 1894, 1899, 1902, 1903, 1907, 1914, 1919, 1933, 1941, 1953, 1958, 1963, 1976, 1977, 1978, 1981, 1983, 1984, 1985, 1986, 1989, 1991, 1995, 2002, 2017, 2021, 2024, 2028, 2029, 2031, 2035, 2036, 2039, 2043, 2044, 2049, 2054, 2067, 2068, 2069, 2076, 2077, 2093, 2099, 2106, 2109, 2110, 2111, 2119, 2120, 2121, 2126, 2133, 2147, 2159, 2161, 2162, 2164, 2169, 2174, 2177, 2181, 2185, 2186, 2188, 2189, 2193, 2194, 2195, 2196, 2199, 2208, 2212, 2223, 2226, 2237, 2240, 2248, 2257, 2262, 2265, 2274, 2277, 2280, 2281, 2285, 2297, 2302, 2304, 2311, 2312, 2320, 2322, 2324, 2330, 2331, 2333, 2334, 2339, 2344, 2348, 2354, 2355, 2356, 2358, 2360, 2364, 2366, 2370, 2378, 2380, 2381, 2389, 2396, 2398, 2400, 2406, 2409, 2410, 2421, 2422, 2423, 2425, 2427, 2429, 2437, 2440, 2442, 2460, 2463, 2471, 2476, 2495, 2503, 2506, 2512, 2515, 2517, 2522, 2524, 2529, 2530, 2532, 2535, 2539, 2546, 2556, 2559, 2581, 2589, 2590, 2594, 2600, 2602, 2616, 2629, 2632, 2634, 2640, 2644, 2649, 2658, 2661, 2663, 2664, 2667, 2672, 2676, 2678, 2681, 2692, 2701, 2707, 2708, 2710, 2714, 2716, 2727, 2731, 2736, 2742, 2745, 2749, 2751, 2753, 2757, 2758, 2762, 2766, 2770, 2775, 2777, 2786, 2787, 2788, 2789, 2794, 2797, 2798, 2805, 2806, 2807, 2809, 2814, 2815, 2816, 2820, 2823, 2834, 2837, 2840, 2843, 2854, 2857, 2858, 2860, 2861, 2866, 2876, 2877, 2884, 2901, 2905, 2912, 2913, 2916, 2917, 2921, 2922, 2927, 2929, 2933, 2937, 2939, 2942, 2944, 2948, 2949, 2953, 2964, 2967, 2973, 2977, 2979, 2995, 2998]}\n","Epoch 1\n","loading env vars from: /home/inflaton/code/projects/courses/logical-reasoning/.env\n","Adding /home/inflaton/code/projects/courses/logical-reasoning to sys.path\n","loading /home/inflaton/code/projects/courses/logical-reasoning/llm_toolkit/logical_reasoning_utils.py\n","internlm/internlm2_5-7b-chat-1m llama-factory/saves/internlm2_5_7b/lora/sft_bf16/checkpoint-562 False datasets/mgtv results/mgtv-results_bf16.csv\n","(1) GPU = NVIDIA GeForce RTX 4080 Laptop GPU. Max memory = 11.994 GB.\n","0.0 GB of memory reserved.\n","loading model: internlm/internlm2_5-7b-chat-1m\n","[INFO|tokenization_utils_base.py:2161] 2024-07-11 20:18:47,395 >> loading file ./tokenizer.model from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/./tokenizer.model\n","[INFO|tokenization_utils_base.py:2161] 2024-07-11 20:18:47,395 >> loading file added_tokens.json from cache at None\n","[INFO|tokenization_utils_base.py:2161] 2024-07-11 20:18:47,395 >> loading file special_tokens_map.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/special_tokens_map.json\n","[INFO|tokenization_utils_base.py:2161] 2024-07-11 20:18:47,395 >> loading file tokenizer_config.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/tokenizer_config.json\n","[INFO|tokenization_utils_base.py:2161] 2024-07-11 20:18:47,395 >> loading file tokenizer.json from cache at None\n","07/11/2024 20:18:48 - INFO - llamafactory.data.template - Replace eos token: <|im_end|>\n","07/11/2024 20:18:48 - INFO - llamafactory.data.template - Add <|im_start|> to stop words.\n","[INFO|configuration_utils.py:733] 2024-07-11 20:18:48,882 >> loading configuration file config.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/config.json\n","[INFO|configuration_utils.py:733] 2024-07-11 20:18:49,600 >> loading configuration file config.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/config.json\n","[INFO|configuration_utils.py:800] 2024-07-11 20:18:49,600 >> Model config InternLM2Config {\n"," \"_name_or_path\": \"internlm/internlm2_5-7b-chat-1m\",\n"," \"architectures\": [\n"," \"InternLM2ForCausalLM\"\n"," ],\n"," \"attn_implementation\": \"eager\",\n"," \"auto_map\": {\n"," \"AutoConfig\": \"internlm/internlm2_5-7b-chat-1m--configuration_internlm2.InternLM2Config\",\n"," \"AutoModel\": \"internlm/internlm2_5-7b-chat-1m--modeling_internlm2.InternLM2ForCausalLM\",\n"," \"AutoModelForCausalLM\": \"internlm/internlm2_5-7b-chat-1m--modeling_internlm2.InternLM2ForCausalLM\"\n"," },\n"," \"bias\": false,\n"," \"bos_token_id\": 1,\n"," \"eos_token_id\": 2,\n"," \"hidden_act\": \"silu\",\n"," \"hidden_size\": 4096,\n"," \"initializer_range\": 0.02,\n"," \"intermediate_size\": 14336,\n"," \"max_position_embeddings\": 262144,\n"," \"model_type\": \"internlm2\",\n"," \"num_attention_heads\": 32,\n"," \"num_hidden_layers\": 32,\n"," \"num_key_value_heads\": 8,\n"," \"pad_token_id\": 2,\n"," \"pretraining_tp\": 1,\n"," \"rms_norm_eps\": 1e-05,\n"," \"rope_scaling\": {\n"," \"factor\": 2.5,\n"," \"type\": \"dynamic\"\n"," },\n"," \"rope_theta\": 50000000,\n"," \"tie_word_embeddings\": false,\n"," \"torch_dtype\": \"bfloat16\",\n"," \"transformers_version\": \"4.42.3\",\n"," \"use_cache\": true,\n"," \"vocab_size\": 92544\n","}\n","\n","07/11/2024 20:18:49 - INFO - llamafactory.model.patcher - Using KV cache for faster generation.\n","[INFO|modeling_utils.py:3556] 2024-07-11 20:18:50,171 >> loading weights file model.safetensors from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/model.safetensors.index.json\n","[INFO|modeling_utils.py:1531] 2024-07-11 20:18:50,321 >> Instantiating InternLM2ForCausalLM model under default dtype torch.bfloat16.\n","[INFO|configuration_utils.py:1000] 2024-07-11 20:18:50,321 >> Generate config GenerationConfig {\n"," \"bos_token_id\": 1,\n"," \"eos_token_id\": 2,\n"," \"pad_token_id\": 2\n","}\n","\n","Loading checkpoint shards: 100%|██████████████████| 8/8 [03:28<00:00, 26.01s/it]\n","[INFO|modeling_utils.py:4364] 2024-07-11 20:22:18,614 >> All model checkpoint weights were used when initializing InternLM2ForCausalLM.\n","\n","[INFO|modeling_utils.py:4372] 2024-07-11 20:22:18,614 >> All the weights of InternLM2ForCausalLM were initialized from the model checkpoint at internlm/internlm2_5-7b-chat-1m.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use InternLM2ForCausalLM for predictions without further training.\n","[INFO|configuration_utils.py:955] 2024-07-11 20:22:18,877 >> loading configuration file generation_config.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/generation_config.json\n","[INFO|configuration_utils.py:1000] 2024-07-11 20:22:18,877 >> Generate config GenerationConfig {\n"," \"bos_token_id\": 1,\n"," \"eos_token_id\": [\n"," 2,\n"," 92542\n"," ],\n"," \"pad_token_id\": 2\n","}\n","\n","WARNING:root:Some parameters are on the meta device device because they were offloaded to the cpu.\n","07/11/2024 20:22:18 - INFO - llamafactory.model.model_utils.attention - Using vanilla attention implementation.\n","INFO:llamafactory.model.model_utils.attention:Using vanilla attention implementation.\n","WARNING:root:Some parameters are on the meta device device because they were offloaded to the cpu.\n","07/11/2024 20:24:25 - INFO - llamafactory.model.adapter - Merged 1 adapter(s).\n","INFO:llamafactory.model.adapter:Merged 1 adapter(s).\n","07/11/2024 20:24:25 - INFO - llamafactory.model.adapter - Loaded adapter(s): llama-factory/saves/internlm2_5_7b/lora/sft_bf16/checkpoint-562\n","INFO:llamafactory.model.adapter:Loaded adapter(s): llama-factory/saves/internlm2_5_7b/lora/sft_bf16/checkpoint-562\n","07/11/2024 20:24:25 - INFO - llamafactory.model.loader - all params: 7,737,708,544\n","INFO:llamafactory.model.loader:all params: 7,737,708,544\n","(2) GPU = NVIDIA GeForce RTX 4080 Laptop GPU. Max memory = 11.994 GB.\n","14.451 GB of memory reserved.\n","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","--------------------------------------------------\n","text: 甄加索是自杀吗\n","--------------------------------------------------\n","label: 不是\n","--------------------------------------------------\n","answer: nan\n","--------------------------------------------------\n","title: 海岸之谜\n","--------------------------------------------------\n","puzzle: 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任何打斗的迹象。请问甄加索的死因是什么?\n","--------------------------------------------------\n","truth: 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在创作一幅描绘海洋生物的画作。在画即将完成的前一天晚上,他骑着自行车外出,打算在海边观赏夜景。然而,他在沙滩上意外发现了一只搁浅的海豚,为了救助这只海豚,他耗费了极大的体力,最终成功将其送回海中。筋疲力尽的甄加索在沙滩上睡着了,由于他患有严重的心脏病,却未告知旁人,在寒冷的海风中,他的心脏停止了跳动。因此,警方在现场只发现了车轮痕迹和未完成的画作,而没有发现任何他杀的迹象。\n","--------------------------------------------------\n","train_text: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任何打斗的迹象。请问甄加索的死因是什么?\n","\n","实际情况: 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在创作一幅描绘海洋生物的画作。在画即将完成的前一天晚上,他骑着自行车外出,打算在海边观赏夜景。然而,他在沙滩上意外发现了一只搁浅的海豚,为了救助这只海豚,他耗费了极大的体力,最终成功将其送回海中。筋疲力尽的甄加索在沙滩上睡着了,由于他患有严重的心脏病,却未告知旁人,在寒冷的海风中,他的心脏停止了跳动。因此,警方在现场只发现了车轮痕迹和未完成的画作,而没有发现任何他杀的迹象。\n","\n","参与者提出的问题: 甄加索是自杀吗\n","<|im_end|>\n","<|im_start|>assistant\n","不是<|im_end|>\n","--------------------------------------------------\n","prompt: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任何打斗的迹象。请问甄加索的死因是什么?\n","\n","实际情况: 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在创作一幅描绘海洋生物的画作。在画即将完成的前一天晚上,他骑着自行车外出,打算在海边观赏夜景。然而,他在沙滩上意外发现了一只搁浅的海豚,为了救助这只海豚,他耗费了极大的体力,最终成功将其送回海中。筋疲力尽的甄加索在沙滩上睡着了,由于他患有严重的心脏病,却未告知旁人,在寒冷的海风中,他的心脏停止了跳动。因此,警方在现场只发现了车轮痕迹和未完成的画作,而没有发现任何他杀的迹象。\n","\n","参与者提出的问题: 甄加索是自杀吗\n","<|im_end|>\n","<|im_start|>assistant\n","\n","--------------------------------------------------\n","text: 死者受伤了吗\n","--------------------------------------------------\n","label: 不是\n","--------------------------------------------------\n","answer: nan\n","--------------------------------------------------\n","title: 甄庄哭声\n","--------------------------------------------------\n","puzzle: 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","--------------------------------------------------\n","truth: 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","--------------------------------------------------\n","train_text: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","实际情况: 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","\n","参与者提出的问题: 死者受伤了吗\n","<|im_end|>\n","<|im_start|>assistant\n","不是<|im_end|>\n","--------------------------------------------------\n","prompt: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","实际情况: 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","\n","参与者提出的问题: 死者受伤了吗\n","<|im_end|>\n","<|im_start|>assistant\n","\n","Evaluating model: internlm/internlm2_5-7b-chat-1m\n"," 0%| | 0/3000 [00:00\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n","100%|█████████████████████████████████████| 3000/3000 [2:58:45<00:00, 3.58s/it]\n","(3) GPU = NVIDIA GeForce RTX 4080 Laptop GPU. Max memory = 11.994 GB.\n","14.451 GB of memory reserved.\n"," text ... internlm/internlm2_5-7b-chat-1m_checkpoint-562\n","0 甄加索是自杀吗 ... 不是\n","\n","[1 rows x 7 columns]\n","{'accuracy': 0.359, 'incorrect_ids': [4, 7, 8, 9, 11, 12, 13, 17, 19, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 43, 44, 45, 50, 51, 55, 56, 57, 60, 61, 63, 65, 66, 67, 68, 69, 70, 77, 78, 82, 83, 84, 85, 86, 88, 93, 94, 95, 96, 97, 99, 100, 102, 103, 104, 106, 107, 108, 109, 110, 112, 114, 115, 117, 118, 119, 120, 121, 122, 123, 124, 125, 128, 129, 135, 136, 137, 138, 139, 140, 147, 148, 149, 150, 151, 152, 153, 155, 156, 158, 160, 161, 162, 163, 164, 168, 169, 170, 171, 172, 173, 176, 179, 180, 181, 184, 185, 186, 187, 190, 193, 194, 195, 196, 199, 200, 202, 203, 204, 207, 209, 216, 218, 221, 222, 224, 225, 226, 227, 228, 229, 230, 232, 234, 235, 236, 239, 240, 241, 242, 243, 245, 248, 250, 252, 253, 254, 255, 256, 259, 260, 261, 262, 265, 269, 271, 273, 275, 276, 278, 279, 280, 282, 283, 284, 285, 286, 287, 289, 292, 293, 294, 295, 299, 301, 303, 304, 306, 307, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 320, 321, 322, 323, 326, 327, 328, 329, 330, 332, 333, 334, 335, 337, 338, 341, 342, 344, 345, 346, 347, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 376, 377, 380, 381, 382, 383, 386, 388, 389, 391, 392, 393, 395, 397, 399, 401, 402, 403, 404, 405, 407, 408, 410, 412, 413, 414, 416, 417, 419, 420, 421, 422, 423, 425, 428, 429, 430, 432, 438, 440, 442, 443, 445, 446, 447, 448, 450, 452, 454, 455, 456, 458, 461, 462, 467, 469, 470, 471, 472, 473, 474, 475, 476, 478, 479, 480, 482, 483, 484, 485, 486, 488, 489, 490, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 517, 518, 520, 521, 522, 524, 526, 527, 528, 529, 530, 531, 533, 534, 536, 538, 540, 543, 549, 550, 551, 552, 556, 558, 559, 560, 561, 566, 568, 570, 571, 572, 574, 577, 579, 580, 581, 582, 585, 591, 592, 593, 594, 596, 597, 598, 599, 600, 601, 603, 604, 609, 610, 612, 613, 614, 617, 619, 620, 621, 625, 626, 628, 629, 632, 637, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 653, 655, 657, 658, 659, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 677, 678, 680, 681, 682, 684, 685, 686, 687, 688, 689, 690, 695, 696, 697, 699, 701, 702, 704, 705, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 729, 730, 731, 732, 733, 734, 735, 737, 739, 740, 741, 743, 744, 746, 750, 751, 752, 755, 756, 757, 758, 759, 760, 762, 763, 765, 766, 767, 768, 769, 770, 771, 772, 774, 775, 776, 777, 778, 779, 781, 783, 785, 786, 787, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 808, 809, 810, 812, 813, 814, 816, 817, 818, 819, 820, 821, 822, 823, 824, 829, 830, 831, 832, 833, 835, 837, 838, 840, 841, 842, 844, 846, 848, 851, 853, 855, 856, 857, 858, 859, 861, 862, 865, 867, 868, 869, 870, 872, 873, 876, 877, 878, 879, 880, 881, 882, 884, 885, 887, 888, 889, 890, 891, 892, 894, 895, 898, 899, 900, 901, 902, 903, 904, 906, 908, 910, 912, 913, 916, 917, 925, 927, 929, 930, 931, 934, 935, 937, 940, 941, 942, 943, 944, 945, 946, 948, 950, 951, 952, 957, 958, 962, 963, 964, 967, 968, 970, 971, 972, 975, 978, 980, 982, 985, 986, 988, 989, 990, 991, 992, 993, 994, 995, 998, 1001, 1002, 1003, 1005, 1006, 1007, 1009, 1010, 1011, 1012, 1013, 1015, 1017, 1020, 1021, 1022, 1023, 1025, 1031, 1036, 1037, 1040, 1041, 1043, 1045, 1046, 1047, 1050, 1051, 1053, 1055, 1056, 1060, 1061, 1066, 1067, 1068, 1070, 1071, 1072, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1087, 1089, 1091, 1092, 1094, 1095, 1096, 1097, 1098, 1099, 1104, 1105, 1107, 1108, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1126, 1127, 1129, 1131, 1135, 1138, 1139, 1144, 1145, 1146, 1148, 1149, 1151, 1153, 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1163, 1164, 1165, 1167, 1168, 1169, 1170, 1172, 1173, 1175, 1177, 1178, 1184, 1185, 1189, 1190, 1191, 1192, 1196, 1197, 1199, 1200, 1202, 1203, 1204, 1207, 1209, 1212, 1213, 1216, 1218, 1225, 1228, 1232, 1233, 1234, 1239, 1240, 1241, 1242, 1243, 1244, 1246, 1248, 1249, 1250, 1253, 1254, 1255, 1256, 1258, 1260, 1261, 1262, 1263, 1266, 1268, 1269, 1275, 1277, 1285, 1288, 1289, 1291, 1294, 1296, 1300, 1301, 1302, 1303, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1314, 1315, 1317, 1321, 1323, 1326, 1328, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1341, 1342, 1345, 1347, 1348, 1349, 1350, 1351, 1353, 1354, 1355, 1356, 1357, 1362, 1363, 1365, 1366, 1367, 1369, 1370, 1372, 1374, 1376, 1380, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1398, 1399, 1400, 1407, 1408, 1409, 1411, 1412, 1413, 1416, 1417, 1418, 1420, 1422, 1425, 1427, 1428, 1429, 1430, 1431, 1435, 1437, 1438, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1461, 1462, 1463, 1465, 1467, 1468, 1469, 1470, 1472, 1473, 1476, 1478, 1479, 1480, 1481, 1482, 1486, 1487, 1488, 1490, 1493, 1494, 1496, 1498, 1500, 1501, 1504, 1510, 1511, 1512, 1513, 1514, 1517, 1518, 1519, 1520, 1523, 1525, 1526, 1528, 1529, 1530, 1531, 1532, 1533, 1534, 1536, 1538, 1540, 1544, 1545, 1547, 1552, 1553, 1556, 1557, 1558, 1559, 1560, 1562, 1563, 1564, 1565, 1566, 1567, 1569, 1572, 1573, 1579, 1581, 1582, 1583, 1585, 1586, 1587, 1588, 1590, 1591, 1593, 1594, 1595, 1596, 1598, 1601, 1602, 1603, 1604, 1605, 1606, 1608, 1610, 1615, 1616, 1617, 1620, 1621, 1622, 1624, 1625, 1626, 1627, 1631, 1632, 1633, 1636, 1637, 1640, 1641, 1645, 1646, 1647, 1648, 1650, 1654, 1655, 1656, 1658, 1659, 1663, 1664, 1666, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1676, 1678, 1679, 1681, 1682, 1683, 1685, 1686, 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1698, 1700, 1701, 1703, 1704, 1706, 1707, 1708, 1715, 1716, 1717, 1718, 1720, 1721, 1723, 1726, 1727, 1731, 1734, 1736, 1738, 1739, 1740, 1743, 1744, 1745, 1748, 1749, 1750, 1751, 1753, 1755, 1756, 1757, 1758, 1760, 1761, 1763, 1764, 1766, 1768, 1769, 1770, 1772, 1773, 1774, 1775, 1776, 1780, 1784, 1785, 1786, 1787, 1789, 1790, 1792, 1794, 1795, 1796, 1797, 1799, 1800, 1802, 1803, 1804, 1805, 1807, 1808, 1809, 1812, 1813, 1814, 1816, 1818, 1819, 1820, 1821, 1823, 1825, 1826, 1827, 1828, 1829, 1830, 1832, 1833, 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1843, 1845, 1846, 1847, 1848, 1849, 1851, 1852, 1854, 1858, 1860, 1862, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1877, 1878, 1879, 1880, 1881, 1883, 1888, 1890, 1894, 1895, 1896, 1897, 1898, 1904, 1905, 1907, 1909, 1910, 1911, 1912, 1913, 1914, 1917, 1921, 1922, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1932, 1933, 1934, 1935, 1939, 1941, 1943, 1944, 1945, 1947, 1949, 1950, 1952, 1953, 1954, 1955, 1957, 1958, 1959, 1960, 1962, 1963, 1964, 1966, 1967, 1968, 1969, 1970, 1971, 1973, 1975, 1978, 1979, 1981, 1982, 1984, 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2005, 2006, 2007, 2008, 2010, 2011, 2014, 2015, 2017, 2018, 2021, 2022, 2023, 2025, 2027, 2029, 2030, 2032, 2034, 2035, 2037, 2038, 2039, 2045, 2046, 2047, 2050, 2051, 2052, 2053, 2054, 2055, 2057, 2059, 2061, 2062, 2063, 2064, 2065, 2066, 2070, 2072, 2073, 2075, 2077, 2080, 2081, 2082, 2083, 2086, 2089, 2090, 2091, 2092, 2094, 2095, 2096, 2097, 2098, 2100, 2101, 2102, 2103, 2104, 2106, 2107, 2109, 2110, 2111, 2112, 2116, 2117, 2118, 2119, 2121, 2122, 2123, 2126, 2127, 2128, 2129, 2130, 2131, 2133, 2134, 2135, 2138, 2139, 2140, 2143, 2144, 2145, 2147, 2148, 2149, 2150, 2151, 2154, 2155, 2156, 2158, 2160, 2161, 2162, 2163, 2164, 2166, 2168, 2169, 2171, 2173, 2176, 2177, 2178, 2179, 2180, 2181, 2185, 2186, 2187, 2188, 2189, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2199, 2205, 2207, 2208, 2209, 2211, 2214, 2215, 2217, 2220, 2221, 2222, 2223, 2224, 2226, 2230, 2231, 2232, 2233, 2234, 2236, 2239, 2240, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 2250, 2251, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2269, 2270, 2273, 2274, 2276, 2278, 2280, 2282, 2283, 2285, 2286, 2287, 2290, 2292, 2293, 2296, 2297, 2301, 2304, 2305, 2307, 2308, 2309, 2311, 2312, 2313, 2314, 2316, 2317, 2319, 2320, 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2329, 2330, 2332, 2333, 2334, 2335, 2336, 2338, 2339, 2340, 2341, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 2350, 2355, 2356, 2359, 2360, 2362, 2363, 2364, 2366, 2367, 2368, 2369, 2371, 2372, 2374, 2375, 2376, 2378, 2380, 2383, 2387, 2388, 2390, 2391, 2393, 2394, 2395, 2397, 2398, 2399, 2400, 2402, 2403, 2404, 2405, 2407, 2408, 2410, 2411, 2412, 2415, 2418, 2419, 2423, 2424, 2425, 2429, 2430, 2431, 2432, 2435, 2437, 2439, 2440, 2441, 2442, 2444, 2445, 2446, 2447, 2448, 2449, 2451, 2452, 2454, 2457, 2458, 2460, 2461, 2463, 2464, 2465, 2466, 2468, 2469, 2471, 2474, 2475, 2476, 2477, 2478, 2479, 2481, 2482, 2483, 2484, 2485, 2487, 2488, 2489, 2491, 2492, 2493, 2494, 2495, 2498, 2499, 2500, 2501, 2504, 2508, 2511, 2512, 2514, 2515, 2516, 2517, 2518, 2519, 2521, 2522, 2523, 2525, 2526, 2527, 2528, 2529, 2530, 2531, 2532, 2533, 2534, 2535, 2537, 2538, 2539, 2541, 2543, 2545, 2546, 2547, 2548, 2549, 2550, 2551, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 2560, 2562, 2563, 2564, 2565, 2566, 2567, 2568, 2569, 2572, 2574, 2575, 2577, 2578, 2580, 2583, 2584, 2586, 2587, 2588, 2589, 2590, 2591, 2592, 2594, 2595, 2597, 2598, 2599, 2600, 2605, 2606, 2607, 2608, 2610, 2611, 2612, 2613, 2615, 2618, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2629, 2630, 2632, 2635, 2636, 2639, 2643, 2644, 2646, 2648, 2649, 2651, 2652, 2654, 2655, 2659, 2660, 2661, 2662, 2663, 2664, 2665, 2667, 2668, 2669, 2670, 2671, 2672, 2673, 2675, 2676, 2678, 2679, 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2689, 2690, 2691, 2695, 2697, 2698, 2699, 2702, 2703, 2704, 2705, 2707, 2708, 2710, 2711, 2714, 2715, 2716, 2718, 2719, 2720, 2721, 2723, 2724, 2725, 2727, 2728, 2731, 2732, 2733, 2735, 2736, 2737, 2739, 2740, 2741, 2742, 2743, 2744, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2754, 2755, 2756, 2760, 2761, 2762, 2763, 2764, 2765, 2766, 2767, 2770, 2772, 2773, 2775, 2777, 2779, 2780, 2781, 2783, 2788, 2791, 2795, 2797, 2798, 2799, 2801, 2802, 2803, 2805, 2807, 2808, 2809, 2811, 2812, 2815, 2816, 2817, 2818, 2820, 2823, 2825, 2829, 2831, 2832, 2833, 2834, 2835, 2837, 2838, 2839, 2840, 2841, 2842, 2844, 2845, 2846, 2849, 2850, 2853, 2855, 2856, 2857, 2858, 2859, 2860, 2861, 2864, 2867, 2868, 2869, 2872, 2874, 2876, 2877, 2878, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2888, 2889, 2890, 2891, 2893, 2894, 2895, 2896, 2898, 2899, 2900, 2902, 2903, 2905, 2908, 2909, 2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 2920, 2921, 2923, 2925, 2927, 2928, 2932, 2933, 2936, 2937, 2938, 2940, 2942, 2943, 2944, 2947, 2949, 2950, 2953, 2955, 2957, 2962, 2963, 2964, 2965, 2969, 2970, 2972, 2973, 2974, 2975, 2976, 2977, 2979, 2980, 2981, 2983, 2985, 2986, 2988, 2990, 2991, 2992, 2995, 2996, 2998, 2999]}\n","Epoch 2\n","loading env vars from: /home/inflaton/code/projects/courses/logical-reasoning/.env\n","Adding /home/inflaton/code/projects/courses/logical-reasoning to sys.path\n","loading /home/inflaton/code/projects/courses/logical-reasoning/llm_toolkit/logical_reasoning_utils.py\n","internlm/internlm2_5-7b-chat-1m llama-factory/saves/internlm2_5_7b/lora/sft_bf16/checkpoint-1124 False datasets/mgtv results/mgtv-results_bf16.csv\n","(1) GPU = NVIDIA GeForce RTX 4080 Laptop GPU. Max memory = 11.994 GB.\n","0.0 GB of memory reserved.\n","loading model: internlm/internlm2_5-7b-chat-1m\n","[INFO|tokenization_utils_base.py:2161] 2024-07-11 23:23:24,376 >> loading file ./tokenizer.model from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/./tokenizer.model\n","[INFO|tokenization_utils_base.py:2161] 2024-07-11 23:23:24,376 >> loading file added_tokens.json from cache at None\n","[INFO|tokenization_utils_base.py:2161] 2024-07-11 23:23:24,376 >> loading file special_tokens_map.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/special_tokens_map.json\n","[INFO|tokenization_utils_base.py:2161] 2024-07-11 23:23:24,376 >> loading file tokenizer_config.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/tokenizer_config.json\n","[INFO|tokenization_utils_base.py:2161] 2024-07-11 23:23:24,376 >> loading file tokenizer.json from cache at None\n","07/11/2024 23:23:25 - INFO - llamafactory.data.template - Replace eos token: <|im_end|>\n","07/11/2024 23:23:25 - INFO - llamafactory.data.template - Add <|im_start|> to stop words.\n","[INFO|configuration_utils.py:733] 2024-07-11 23:23:26,063 >> loading configuration file config.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/config.json\n","[INFO|configuration_utils.py:733] 2024-07-11 23:23:26,950 >> loading configuration file config.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/config.json\n","[INFO|configuration_utils.py:800] 2024-07-11 23:23:26,951 >> Model config InternLM2Config {\n"," \"_name_or_path\": \"internlm/internlm2_5-7b-chat-1m\",\n"," \"architectures\": [\n"," \"InternLM2ForCausalLM\"\n"," ],\n"," \"attn_implementation\": \"eager\",\n"," \"auto_map\": {\n"," \"AutoConfig\": \"internlm/internlm2_5-7b-chat-1m--configuration_internlm2.InternLM2Config\",\n"," \"AutoModel\": \"internlm/internlm2_5-7b-chat-1m--modeling_internlm2.InternLM2ForCausalLM\",\n"," \"AutoModelForCausalLM\": \"internlm/internlm2_5-7b-chat-1m--modeling_internlm2.InternLM2ForCausalLM\"\n"," },\n"," \"bias\": false,\n"," \"bos_token_id\": 1,\n"," \"eos_token_id\": 2,\n"," \"hidden_act\": \"silu\",\n"," \"hidden_size\": 4096,\n"," \"initializer_range\": 0.02,\n"," \"intermediate_size\": 14336,\n"," \"max_position_embeddings\": 262144,\n"," \"model_type\": \"internlm2\",\n"," \"num_attention_heads\": 32,\n"," \"num_hidden_layers\": 32,\n"," \"num_key_value_heads\": 8,\n"," \"pad_token_id\": 2,\n"," \"pretraining_tp\": 1,\n"," \"rms_norm_eps\": 1e-05,\n"," \"rope_scaling\": {\n"," \"factor\": 2.5,\n"," \"type\": \"dynamic\"\n"," },\n"," \"rope_theta\": 50000000,\n"," \"tie_word_embeddings\": false,\n"," \"torch_dtype\": \"bfloat16\",\n"," \"transformers_version\": \"4.42.3\",\n"," \"use_cache\": true,\n"," \"vocab_size\": 92544\n","}\n","\n","07/11/2024 23:23:26 - INFO - llamafactory.model.patcher - Using KV cache for faster generation.\n","[INFO|modeling_utils.py:3556] 2024-07-11 23:23:27,616 >> loading weights file model.safetensors from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/model.safetensors.index.json\n","[INFO|modeling_utils.py:1531] 2024-07-11 23:23:27,892 >> Instantiating InternLM2ForCausalLM model under default dtype torch.bfloat16.\n","[INFO|configuration_utils.py:1000] 2024-07-11 23:23:27,893 >> Generate config GenerationConfig {\n"," \"bos_token_id\": 1,\n"," \"eos_token_id\": 2,\n"," \"pad_token_id\": 2\n","}\n","\n","Loading checkpoint shards: 100%|██████████████████| 8/8 [03:51<00:00, 28.98s/it]\n","[INFO|modeling_utils.py:4364] 2024-07-11 23:27:20,431 >> All model checkpoint weights were used when initializing InternLM2ForCausalLM.\n","\n","[INFO|modeling_utils.py:4372] 2024-07-11 23:27:20,431 >> All the weights of InternLM2ForCausalLM were initialized from the model checkpoint at internlm/internlm2_5-7b-chat-1m.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use InternLM2ForCausalLM for predictions without further training.\n","[INFO|configuration_utils.py:955] 2024-07-11 23:27:20,728 >> loading configuration file generation_config.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/generation_config.json\n","[INFO|configuration_utils.py:1000] 2024-07-11 23:27:20,729 >> Generate config GenerationConfig {\n"," \"bos_token_id\": 1,\n"," \"eos_token_id\": [\n"," 2,\n"," 92542\n"," ],\n"," \"pad_token_id\": 2\n","}\n","\n","WARNING:root:Some parameters are on the meta device device because they were offloaded to the cpu.\n","07/11/2024 23:27:20 - INFO - llamafactory.model.model_utils.attention - Using vanilla attention implementation.\n","INFO:llamafactory.model.model_utils.attention:Using vanilla attention implementation.\n","WARNING:root:Some parameters are on the meta device device because they were offloaded to the cpu.\n","07/11/2024 23:29:54 - INFO - llamafactory.model.adapter - Merged 1 adapter(s).\n","INFO:llamafactory.model.adapter:Merged 1 adapter(s).\n","07/11/2024 23:29:54 - INFO - llamafactory.model.adapter - Loaded adapter(s): llama-factory/saves/internlm2_5_7b/lora/sft_bf16/checkpoint-1124\n","INFO:llamafactory.model.adapter:Loaded adapter(s): llama-factory/saves/internlm2_5_7b/lora/sft_bf16/checkpoint-1124\n","07/11/2024 23:29:54 - INFO - llamafactory.model.loader - all params: 7,737,708,544\n","INFO:llamafactory.model.loader:all params: 7,737,708,544\n","(2) GPU = NVIDIA GeForce RTX 4080 Laptop GPU. Max memory = 11.994 GB.\n","14.451 GB of memory reserved.\n","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","--------------------------------------------------\n","text: 甄加索是自杀吗\n","--------------------------------------------------\n","label: 不是\n","--------------------------------------------------\n","answer: nan\n","--------------------------------------------------\n","title: 海岸之谜\n","--------------------------------------------------\n","puzzle: 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任何打斗的迹象。请问甄加索的死因是什么?\n","--------------------------------------------------\n","truth: 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在创作一幅描绘海洋生物的画作。在画即将完成的前一天晚上,他骑着自行车外出,打算在海边观赏夜景。然而,他在沙滩上意外发现了一只搁浅的海豚,为了救助这只海豚,他耗费了极大的体力,最终成功将其送回海中。筋疲力尽的甄加索在沙滩上睡着了,由于他患有严重的心脏病,却未告知旁人,在寒冷的海风中,他的心脏停止了跳动。因此,警方在现场只发现了车轮痕迹和未完成的画作,而没有发现任何他杀的迹象。\n","--------------------------------------------------\n","train_text: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任何打斗的迹象。请问甄加索的死因是什么?\n","\n","实际情况: 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在创作一幅描绘海洋生物的画作。在画即将完成的前一天晚上,他骑着自行车外出,打算在海边观赏夜景。然而,他在沙滩上意外发现了一只搁浅的海豚,为了救助这只海豚,他耗费了极大的体力,最终成功将其送回海中。筋疲力尽的甄加索在沙滩上睡着了,由于他患有严重的心脏病,却未告知旁人,在寒冷的海风中,他的心脏停止了跳动。因此,警方在现场只发现了车轮痕迹和未完成的画作,而没有发现任何他杀的迹象。\n","\n","参与者提出的问题: 甄加索是自杀吗\n","<|im_end|>\n","<|im_start|>assistant\n","不是<|im_end|>\n","--------------------------------------------------\n","prompt: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任何打斗的迹象。请问甄加索的死因是什么?\n","\n","实际情况: 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在创作一幅描绘海洋生物的画作。在画即将完成的前一天晚上,他骑着自行车外出,打算在海边观赏夜景。然而,他在沙滩上意外发现了一只搁浅的海豚,为了救助这只海豚,他耗费了极大的体力,最终成功将其送回海中。筋疲力尽的甄加索在沙滩上睡着了,由于他患有严重的心脏病,却未告知旁人,在寒冷的海风中,他的心脏停止了跳动。因此,警方在现场只发现了车轮痕迹和未完成的画作,而没有发现任何他杀的迹象。\n","\n","参与者提出的问题: 甄加索是自杀吗\n","<|im_end|>\n","<|im_start|>assistant\n","\n","--------------------------------------------------\n","text: 死者受伤了吗\n","--------------------------------------------------\n","label: 不是\n","--------------------------------------------------\n","answer: nan\n","--------------------------------------------------\n","title: 甄庄哭声\n","--------------------------------------------------\n","puzzle: 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","--------------------------------------------------\n","truth: 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","--------------------------------------------------\n","train_text: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","实际情况: 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","\n","参与者提出的问题: 死者受伤了吗\n","<|im_end|>\n","<|im_start|>assistant\n","不是<|im_end|>\n","--------------------------------------------------\n","prompt: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","实际情况: 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","\n","参与者提出的问题: 死者受伤了吗\n","<|im_end|>\n","<|im_start|>assistant\n","\n","Evaluating model: internlm/internlm2_5-7b-chat-1m\n"," 0%| | 0/3000 [00:00\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n","100%|█████████████████████████████████████| 3000/3000 [3:05:53<00:00, 3.72s/it]\n","(3) GPU = NVIDIA GeForce RTX 4080 Laptop GPU. Max memory = 11.994 GB.\n","14.451 GB of memory reserved.\n"," text ... internlm/internlm2_5-7b-chat-1m_checkpoint-1124\n","0 甄加索是自杀吗 ... 不是\n","\n","[1 rows x 8 columns]\n","{'accuracy': 0.6043333333333333, 'incorrect_ids': [2, 5, 9, 11, 12, 15, 16, 17, 24, 25, 26, 27, 28, 29, 31, 33, 34, 35, 36, 37, 38, 58, 59, 60, 61, 65, 66, 67, 75, 77, 78, 79, 82, 83, 84, 88, 93, 94, 96, 99, 104, 106, 107, 108, 109, 112, 113, 114, 115, 119, 120, 121, 122, 123, 128, 129, 135, 136, 137, 138, 139, 143, 149, 150, 152, 153, 155, 156, 159, 160, 161, 162, 163, 164, 170, 172, 179, 180, 184, 185, 190, 193, 199, 200, 202, 210, 216, 218, 224, 225, 227, 228, 234, 236, 240, 241, 242, 243, 245, 248, 250, 252, 253, 259, 260, 265, 266, 275, 276, 278, 283, 284, 286, 288, 294, 295, 296, 299, 300, 301, 302, 303, 304, 311, 314, 316, 317, 318, 320, 321, 323, 328, 330, 333, 334, 335, 337, 338, 339, 346, 349, 350, 351, 352, 353, 354, 355, 356, 358, 359, 360, 361, 362, 363, 368, 370, 371, 372, 373, 374, 376, 377, 386, 389, 391, 393, 395, 396, 397, 398, 402, 403, 404, 406, 409, 410, 411, 414, 416, 419, 422, 423, 428, 429, 430, 432, 438, 440, 445, 447, 450, 452, 454, 456, 458, 461, 462, 464, 468, 471, 472, 473, 476, 477, 478, 480, 486, 488, 490, 492, 493, 494, 495, 496, 497, 501, 502, 504, 506, 507, 508, 509, 510, 511, 512, 513, 514, 517, 519, 520, 526, 529, 530, 533, 534, 536, 537, 538, 540, 549, 550, 556, 560, 561, 565, 566, 570, 571, 579, 581, 585, 589, 591, 592, 593, 594, 596, 597, 601, 603, 609, 612, 613, 614, 621, 625, 626, 628, 629, 632, 636, 637, 643, 644, 647, 649, 653, 663, 666, 671, 674, 682, 683, 686, 690, 692, 694, 695, 697, 701, 702, 703, 704, 705, 706, 707, 708, 711, 716, 718, 719, 720, 721, 722, 725, 729, 730, 734, 735, 739, 740, 741, 743, 747, 752, 754, 757, 758, 763, 765, 770, 771, 772, 774, 778, 785, 791, 795, 798, 799, 805, 808, 809, 810, 812, 813, 814, 816, 817, 818, 819, 820, 821, 822, 823, 824, 826, 827, 832, 833, 834, 835, 837, 841, 842, 847, 848, 853, 856, 857, 861, 866, 869, 870, 873, 875, 876, 878, 884, 886, 889, 890, 891, 894, 899, 901, 904, 906, 910, 912, 913, 917, 920, 926, 927, 929, 932, 933, 937, 940, 945, 948, 953, 954, 956, 960, 961, 962, 966, 969, 970, 972, 980, 981, 982, 984, 986, 988, 989, 991, 993, 994, 995, 998, 1003, 1006, 1011, 1012, 1015, 1017, 1022, 1025, 1028, 1031, 1032, 1036, 1038, 1040, 1041, 1043, 1046, 1049, 1051, 1053, 1054, 1055, 1056, 1066, 1069, 1071, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1084, 1087, 1089, 1102, 1108, 1111, 1113, 1114, 1116, 1120, 1121, 1124, 1125, 1129, 1134, 1135, 1136, 1140, 1141, 1143, 1151, 1158, 1159, 1161, 1163, 1164, 1166, 1168, 1172, 1177, 1178, 1181, 1185, 1188, 1192, 1196, 1203, 1212, 1216, 1220, 1228, 1230, 1231, 1232, 1236, 1237, 1239, 1241, 1242, 1245, 1252, 1254, 1256, 1259, 1260, 1262, 1266, 1267, 1269, 1273, 1274, 1278, 1282, 1289, 1292, 1296, 1299, 1300, 1305, 1308, 1311, 1313, 1314, 1315, 1317, 1322, 1323, 1326, 1331, 1332, 1336, 1342, 1345, 1347, 1348, 1349, 1353, 1358, 1359, 1360, 1362, 1363, 1364, 1365, 1366, 1367, 1370, 1371, 1373, 1377, 1382, 1384, 1385, 1386, 1387, 1388, 1389, 1391, 1392, 1393, 1395, 1406, 1412, 1420, 1423, 1425, 1426, 1428, 1430, 1431, 1432, 1435, 1437, 1438, 1440, 1443, 1444, 1445, 1448, 1450, 1451, 1452, 1453, 1454, 1455, 1457, 1459, 1462, 1463, 1467, 1469, 1473, 1474, 1476, 1477, 1478, 1481, 1482, 1484, 1490, 1495, 1496, 1499, 1504, 1506, 1512, 1515, 1516, 1517, 1518, 1525, 1526, 1537, 1544, 1545, 1546, 1547, 1548, 1551, 1552, 1556, 1558, 1560, 1561, 1564, 1568, 1573, 1577, 1581, 1585, 1586, 1587, 1589, 1590, 1591, 1593, 1594, 1596, 1600, 1602, 1603, 1604, 1605, 1606, 1608, 1611, 1612, 1613, 1614, 1615, 1619, 1620, 1622, 1624, 1627, 1631, 1632, 1633, 1636, 1637, 1641, 1645, 1647, 1648, 1650, 1652, 1653, 1654, 1655, 1658, 1668, 1669, 1672, 1673, 1674, 1676, 1678, 1679, 1680, 1684, 1686, 1689, 1690, 1691, 1695, 1697, 1698, 1710, 1711, 1716, 1718, 1726, 1727, 1731, 1734, 1735, 1736, 1737, 1738, 1739, 1741, 1743, 1751, 1753, 1754, 1755, 1756, 1758, 1763, 1766, 1767, 1768, 1770, 1772, 1773, 1774, 1778, 1780, 1784, 1786, 1787, 1789, 1791, 1794, 1796, 1798, 1799, 1805, 1809, 1810, 1811, 1812, 1814, 1816, 1818, 1820, 1823, 1824, 1827, 1830, 1831, 1834, 1835, 1837, 1840, 1841, 1845, 1848, 1849, 1851, 1852, 1857, 1858, 1860, 1866, 1867, 1870, 1872, 1873, 1879, 1882, 1888, 1890, 1899, 1903, 1904, 1909, 1915, 1919, 1923, 1926, 1928, 1930, 1933, 1934, 1935, 1941, 1943, 1944, 1945, 1948, 1949, 1950, 1953, 1955, 1958, 1961, 1962, 1963, 1964, 1965, 1973, 1978, 1979, 1981, 1982, 1984, 1988, 1989, 1990, 1994, 1995, 1998, 2000, 2001, 2002, 2005, 2007, 2008, 2010, 2013, 2017, 2019, 2025, 2029, 2031, 2035, 2037, 2038, 2039, 2041, 2042, 2046, 2048, 2053, 2054, 2058, 2059, 2062, 2063, 2064, 2068, 2070, 2076, 2077, 2081, 2088, 2092, 2099, 2100, 2102, 2105, 2106, 2109, 2110, 2112, 2114, 2119, 2121, 2124, 2126, 2128, 2130, 2132, 2133, 2135, 2138, 2139, 2140, 2142, 2144, 2145, 2146, 2147, 2155, 2160, 2161, 2162, 2164, 2169, 2173, 2177, 2179, 2180, 2181, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2192, 2193, 2194, 2196, 2197, 2198, 2199, 2210, 2212, 2215, 2219, 2221, 2222, 2223, 2226, 2229, 2230, 2231, 2233, 2240, 2243, 2245, 2246, 2247, 2249, 2250, 2251, 2253, 2256, 2262, 2263, 2265, 2267, 2274, 2276, 2278, 2279, 2280, 2285, 2287, 2290, 2293, 2297, 2298, 2301, 2311, 2312, 2317, 2318, 2319, 2320, 2322, 2324, 2330, 2333, 2335, 2339, 2344, 2348, 2349, 2355, 2360, 2364, 2366, 2370, 2372, 2379, 2388, 2389, 2395, 2400, 2404, 2406, 2408, 2410, 2412, 2416, 2418, 2420, 2421, 2423, 2424, 2425, 2429, 2437, 2439, 2440, 2441, 2442, 2444, 2445, 2446, 2448, 2449, 2461, 2463, 2464, 2466, 2469, 2471, 2472, 2475, 2486, 2488, 2493, 2496, 2498, 2499, 2501, 2503, 2508, 2512, 2515, 2516, 2517, 2518, 2522, 2525, 2526, 2528, 2529, 2530, 2532, 2534, 2535, 2538, 2539, 2540, 2544, 2546, 2547, 2548, 2549, 2550, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 2560, 2562, 2563, 2564, 2565, 2566, 2574, 2575, 2577, 2589, 2590, 2595, 2597, 2598, 2604, 2606, 2607, 2609, 2610, 2616, 2620, 2622, 2623, 2624, 2626, 2628, 2629, 2636, 2642, 2644, 2653, 2657, 2658, 2663, 2664, 2667, 2670, 2672, 2676, 2678, 2682, 2683, 2689, 2694, 2695, 2701, 2707, 2708, 2709, 2710, 2711, 2713, 2714, 2721, 2727, 2730, 2731, 2733, 2735, 2736, 2737, 2742, 2744, 2746, 2747, 2748, 2751, 2754, 2756, 2757, 2760, 2761, 2762, 2763, 2764, 2766, 2767, 2768, 2769, 2772, 2776, 2777, 2781, 2782, 2786, 2788, 2791, 2798, 2801, 2803, 2805, 2807, 2810, 2811, 2814, 2815, 2816, 2819, 2821, 2822, 2824, 2829, 2833, 2837, 2841, 2843, 2846, 2851, 2852, 2857, 2858, 2860, 2861, 2865, 2866, 2870, 2874, 2875, 2877, 2880, 2882, 2884, 2886, 2888, 2889, 2896, 2899, 2902, 2905, 2906, 2912, 2913, 2915, 2916, 2919, 2920, 2921, 2931, 2933, 2935, 2937, 2938, 2944, 2949, 2953, 2957, 2963, 2965, 2966, 2967, 2968, 2975, 2976, 2977, 2978, 2979, 2980, 2983, 2985, 2990, 2991, 2994, 2995, 2998]}\n","Epoch 3\n","loading env vars from: /home/inflaton/code/projects/courses/logical-reasoning/.env\n","Adding /home/inflaton/code/projects/courses/logical-reasoning to sys.path\n","loading /home/inflaton/code/projects/courses/logical-reasoning/llm_toolkit/logical_reasoning_utils.py\n","internlm/internlm2_5-7b-chat-1m llama-factory/saves/internlm2_5_7b/lora/sft_bf16/checkpoint-1686 False datasets/mgtv results/mgtv-results_bf16.csv\n","(1) GPU = NVIDIA GeForce RTX 4080 Laptop GPU. Max memory = 11.994 GB.\n","0.0 GB of memory reserved.\n","loading model: internlm/internlm2_5-7b-chat-1m\n","[INFO|tokenization_utils_base.py:2161] 2024-07-12 02:36:19,448 >> loading file ./tokenizer.model from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/./tokenizer.model\n","[INFO|tokenization_utils_base.py:2161] 2024-07-12 02:36:19,449 >> loading file added_tokens.json from cache at None\n","[INFO|tokenization_utils_base.py:2161] 2024-07-12 02:36:19,449 >> loading file special_tokens_map.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/special_tokens_map.json\n","[INFO|tokenization_utils_base.py:2161] 2024-07-12 02:36:19,449 >> loading file tokenizer_config.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/tokenizer_config.json\n","[INFO|tokenization_utils_base.py:2161] 2024-07-12 02:36:19,449 >> loading file tokenizer.json from cache at None\n","07/12/2024 02:36:20 - INFO - llamafactory.data.template - Replace eos token: <|im_end|>\n","07/12/2024 02:36:20 - INFO - llamafactory.data.template - Add <|im_start|> to stop words.\n","[INFO|configuration_utils.py:733] 2024-07-12 02:36:30,975 >> loading configuration file config.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/config.json\n","[INFO|configuration_utils.py:733] 2024-07-12 02:36:51,396 >> loading configuration file config.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/config.json\n","[INFO|configuration_utils.py:800] 2024-07-12 02:36:51,397 >> Model config InternLM2Config {\n"," \"_name_or_path\": \"internlm/internlm2_5-7b-chat-1m\",\n"," \"architectures\": [\n"," \"InternLM2ForCausalLM\"\n"," ],\n"," \"attn_implementation\": \"eager\",\n"," \"auto_map\": {\n"," \"AutoConfig\": \"internlm/internlm2_5-7b-chat-1m--configuration_internlm2.InternLM2Config\",\n"," \"AutoModel\": \"internlm/internlm2_5-7b-chat-1m--modeling_internlm2.InternLM2ForCausalLM\",\n"," \"AutoModelForCausalLM\": \"internlm/internlm2_5-7b-chat-1m--modeling_internlm2.InternLM2ForCausalLM\"\n"," },\n"," \"bias\": false,\n"," \"bos_token_id\": 1,\n"," \"eos_token_id\": 2,\n"," \"hidden_act\": \"silu\",\n"," \"hidden_size\": 4096,\n"," \"initializer_range\": 0.02,\n"," \"intermediate_size\": 14336,\n"," \"max_position_embeddings\": 262144,\n"," \"model_type\": \"internlm2\",\n"," \"num_attention_heads\": 32,\n"," \"num_hidden_layers\": 32,\n"," \"num_key_value_heads\": 8,\n"," \"pad_token_id\": 2,\n"," \"pretraining_tp\": 1,\n"," \"rms_norm_eps\": 1e-05,\n"," \"rope_scaling\": {\n"," \"factor\": 2.5,\n"," \"type\": \"dynamic\"\n"," },\n"," \"rope_theta\": 50000000,\n"," \"tie_word_embeddings\": false,\n"," \"torch_dtype\": \"bfloat16\",\n"," \"transformers_version\": \"4.42.3\",\n"," \"use_cache\": true,\n"," \"vocab_size\": 92544\n","}\n","\n","07/12/2024 02:36:51 - INFO - llamafactory.model.patcher - Using KV cache for faster generation.\n","[INFO|modeling_utils.py:3556] 2024-07-12 02:37:02,034 >> loading weights file model.safetensors from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/model.safetensors.index.json\n","[INFO|modeling_utils.py:1531] 2024-07-12 02:37:02,899 >> Instantiating InternLM2ForCausalLM model under default dtype torch.bfloat16.\n","[INFO|configuration_utils.py:1000] 2024-07-12 02:37:02,900 >> Generate config GenerationConfig {\n"," \"bos_token_id\": 1,\n"," \"eos_token_id\": 2,\n"," \"pad_token_id\": 2\n","}\n","\n","Loading checkpoint shards: 100%|██████████████████| 8/8 [07:23<00:00, 55.49s/it]\n","[INFO|modeling_utils.py:4364] 2024-07-12 02:44:26,943 >> All model checkpoint weights were used when initializing InternLM2ForCausalLM.\n","\n","[INFO|modeling_utils.py:4372] 2024-07-12 02:44:26,943 >> All the weights of InternLM2ForCausalLM were initialized from the model checkpoint at internlm/internlm2_5-7b-chat-1m.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use InternLM2ForCausalLM for predictions without further training.\n","[INFO|configuration_utils.py:955] 2024-07-12 02:44:37,015 >> loading configuration file generation_config.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/generation_config.json\n","[INFO|configuration_utils.py:1000] 2024-07-12 02:44:37,015 >> Generate config GenerationConfig {\n"," \"bos_token_id\": 1,\n"," \"eos_token_id\": [\n"," 2,\n"," 92542\n"," ],\n"," \"pad_token_id\": 2\n","}\n","\n","WARNING:root:Some parameters are on the meta device device because they were offloaded to the cpu.\n","07/12/2024 02:44:37 - INFO - llamafactory.model.model_utils.attention - Using vanilla attention implementation.\n","INFO:llamafactory.model.model_utils.attention:Using vanilla attention implementation.\n","WARNING:root:Some parameters are on the meta device device because they were offloaded to the cpu.\n","07/12/2024 02:49:31 - INFO - llamafactory.model.adapter - Merged 1 adapter(s).\n","INFO:llamafactory.model.adapter:Merged 1 adapter(s).\n","07/12/2024 02:49:31 - INFO - llamafactory.model.adapter - Loaded adapter(s): llama-factory/saves/internlm2_5_7b/lora/sft_bf16/checkpoint-1686\n","INFO:llamafactory.model.adapter:Loaded adapter(s): llama-factory/saves/internlm2_5_7b/lora/sft_bf16/checkpoint-1686\n","07/12/2024 02:49:31 - INFO - llamafactory.model.loader - all params: 7,737,708,544\n","INFO:llamafactory.model.loader:all params: 7,737,708,544\n","(2) GPU = NVIDIA GeForce RTX 4080 Laptop GPU. Max memory = 11.994 GB.\n","14.451 GB of memory reserved.\n","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","--------------------------------------------------\n","text: 甄加索是自杀吗\n","--------------------------------------------------\n","label: 不是\n","--------------------------------------------------\n","answer: nan\n","--------------------------------------------------\n","title: 海岸之谜\n","--------------------------------------------------\n","puzzle: 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任何打斗的迹象。请问甄加索的死因是什么?\n","--------------------------------------------------\n","truth: 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在创作一幅描绘海洋生物的画作。在画即将完成的前一天晚上,他骑着自行车外出,打算在海边观赏夜景。然而,他在沙滩上意外发现了一只搁浅的海豚,为了救助这只海豚,他耗费了极大的体力,最终成功将其送回海中。筋疲力尽的甄加索在沙滩上睡着了,由于他患有严重的心脏病,却未告知旁人,在寒冷的海风中,他的心脏停止了跳动。因此,警方在现场只发现了车轮痕迹和未完成的画作,而没有发现任何他杀的迹象。\n","--------------------------------------------------\n","train_text: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任何打斗的迹象。请问甄加索的死因是什么?\n","\n","实际情况: 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在创作一幅描绘海洋生物的画作。在画即将完成的前一天晚上,他骑着自行车外出,打算在海边观赏夜景。然而,他在沙滩上意外发现了一只搁浅的海豚,为了救助这只海豚,他耗费了极大的体力,最终成功将其送回海中。筋疲力尽的甄加索在沙滩上睡着了,由于他患有严重的心脏病,却未告知旁人,在寒冷的海风中,他的心脏停止了跳动。因此,警方在现场只发现了车轮痕迹和未完成的画作,而没有发现任何他杀的迹象。\n","\n","参与者提出的问题: 甄加索是自杀吗\n","<|im_end|>\n","<|im_start|>assistant\n","不是<|im_end|>\n","--------------------------------------------------\n","prompt: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任何打斗的迹象。请问甄加索的死因是什么?\n","\n","实际情况: 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在创作一幅描绘海洋生物的画作。在画即将完成的前一天晚上,他骑着自行车外出,打算在海边观赏夜景。然而,他在沙滩上意外发现了一只搁浅的海豚,为了救助这只海豚,他耗费了极大的体力,最终成功将其送回海中。筋疲力尽的甄加索在沙滩上睡着了,由于他患有严重的心脏病,却未告知旁人,在寒冷的海风中,他的心脏停止了跳动。因此,警方在现场只发现了车轮痕迹和未完成的画作,而没有发现任何他杀的迹象。\n","\n","参与者提出的问题: 甄加索是自杀吗\n","<|im_end|>\n","<|im_start|>assistant\n","\n","--------------------------------------------------\n","text: 死者受伤了吗\n","--------------------------------------------------\n","label: 不是\n","--------------------------------------------------\n","answer: nan\n","--------------------------------------------------\n","title: 甄庄哭声\n","--------------------------------------------------\n","puzzle: 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","--------------------------------------------------\n","truth: 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","--------------------------------------------------\n","train_text: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","实际情况: 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","\n","参与者提出的问题: 死者受伤了吗\n","<|im_end|>\n","<|im_start|>assistant\n","不是<|im_end|>\n","--------------------------------------------------\n","prompt: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","实际情况: 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","\n","参与者提出的问题: 死者受伤了吗\n","<|im_end|>\n","<|im_start|>assistant\n","\n","Evaluating model: internlm/internlm2_5-7b-chat-1m\n"," 0%| | 0/3000 [00:00\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n","100%|█████████████████████████████████████| 3000/3000 [3:06:16<00:00, 3.73s/it]\n","(3) GPU = NVIDIA GeForce RTX 4080 Laptop GPU. Max memory = 11.994 GB.\n","14.451 GB of memory reserved.\n"," text ... internlm/internlm2_5-7b-chat-1m_checkpoint-1686\n","0 甄加索是自杀吗 ... 不是\n","\n","[1 rows x 9 columns]\n","{'accuracy': 0.7596666666666667, 'incorrect_ids': [6, 9, 10, 13, 16, 17, 19, 24, 27, 31, 34, 35, 36, 55, 58, 59, 61, 65, 66, 67, 77, 78, 79, 81, 83, 88, 91, 94, 102, 104, 106, 108, 112, 115, 120, 121, 128, 131, 135, 137, 138, 139, 143, 149, 153, 155, 159, 160, 161, 164, 173, 179, 180, 190, 199, 200, 201, 202, 210, 218, 224, 225, 228, 229, 243, 248, 250, 251, 252, 259, 260, 265, 266, 275, 276, 286, 288, 295, 296, 299, 301, 304, 308, 314, 316, 317, 318, 320, 321, 323, 326, 330, 332, 334, 335, 338, 339, 350, 354, 356, 360, 361, 368, 370, 371, 374, 377, 383, 386, 389, 397, 398, 404, 406, 409, 410, 411, 414, 423, 428, 429, 432, 438, 445, 447, 450, 452, 453, 454, 456, 457, 458, 468, 471, 472, 473, 476, 486, 488, 494, 495, 497, 501, 502, 503, 504, 506, 507, 508, 510, 511, 514, 517, 519, 520, 530, 533, 534, 536, 538, 540, 560, 561, 566, 568, 571, 579, 580, 581, 585, 589, 591, 593, 596, 597, 601, 612, 613, 614, 621, 625, 628, 632, 636, 643, 644, 647, 651, 665, 666, 671, 674, 682, 690, 695, 701, 702, 708, 718, 720, 721, 727, 729, 730, 734, 739, 740, 752, 754, 758, 759, 763, 770, 773, 774, 778, 788, 791, 798, 801, 805, 809, 816, 817, 819, 820, 821, 823, 824, 827, 828, 832, 837, 840, 841, 847, 851, 856, 861, 866, 869, 870, 875, 884, 886, 889, 890, 891, 894, 899, 901, 904, 906, 913, 927, 930, 932, 937, 943, 953, 962, 964, 966, 969, 980, 981, 982, 986, 991, 994, 998, 1001, 1003, 1006, 1011, 1012, 1014, 1015, 1018, 1019, 1022, 1024, 1028, 1036, 1040, 1041, 1043, 1051, 1053, 1062, 1075, 1076, 1077, 1078, 1080, 1084, 1087, 1089, 1096, 1108, 1114, 1120, 1125, 1126, 1129, 1141, 1143, 1153, 1158, 1161, 1164, 1166, 1172, 1173, 1174, 1177, 1178, 1180, 1181, 1183, 1185, 1196, 1198, 1203, 1209, 1212, 1220, 1228, 1232, 1235, 1240, 1241, 1251, 1252, 1254, 1258, 1259, 1266, 1274, 1282, 1289, 1292, 1299, 1305, 1308, 1311, 1313, 1315, 1317, 1322, 1324, 1331, 1332, 1339, 1342, 1349, 1353, 1358, 1363, 1364, 1367, 1387, 1388, 1389, 1393, 1395, 1400, 1406, 1409, 1412, 1424, 1426, 1430, 1432, 1440, 1446, 1451, 1452, 1453, 1454, 1459, 1462, 1469, 1476, 1478, 1484, 1486, 1490, 1493, 1494, 1496, 1499, 1500, 1504, 1512, 1515, 1516, 1517, 1518, 1525, 1526, 1537, 1543, 1544, 1545, 1547, 1551, 1554, 1558, 1560, 1561, 1564, 1568, 1585, 1590, 1591, 1593, 1594, 1596, 1603, 1604, 1605, 1612, 1613, 1622, 1627, 1631, 1633, 1636, 1637, 1641, 1643, 1645, 1647, 1648, 1650, 1652, 1653, 1654, 1655, 1662, 1665, 1672, 1673, 1674, 1679, 1686, 1691, 1694, 1695, 1716, 1718, 1726, 1727, 1731, 1734, 1736, 1751, 1753, 1755, 1756, 1773, 1780, 1791, 1796, 1799, 1804, 1809, 1810, 1812, 1814, 1818, 1820, 1824, 1827, 1835, 1858, 1860, 1879, 1888, 1890, 1903, 1907, 1915, 1919, 1928, 1935, 1941, 1950, 1953, 1958, 1959, 1964, 1973, 1978, 1979, 1981, 1983, 1984, 1989, 1990, 1998, 2017, 2021, 2035, 2036, 2044, 2049, 2054, 2058, 2059, 2064, 2067, 2072, 2076, 2077, 2088, 2106, 2109, 2110, 2112, 2119, 2120, 2121, 2126, 2133, 2139, 2145, 2147, 2159, 2161, 2162, 2164, 2169, 2171, 2177, 2185, 2186, 2188, 2189, 2193, 2194, 2196, 2197, 2199, 2212, 2215, 2223, 2226, 2230, 2240, 2243, 2245, 2246, 2248, 2261, 2262, 2265, 2272, 2274, 2285, 2297, 2311, 2313, 2320, 2322, 2324, 2330, 2333, 2339, 2342, 2344, 2348, 2354, 2355, 2360, 2364, 2366, 2372, 2378, 2381, 2395, 2400, 2401, 2404, 2406, 2408, 2409, 2410, 2412, 2421, 2423, 2424, 2425, 2429, 2437, 2440, 2442, 2444, 2463, 2464, 2469, 2472, 2488, 2503, 2517, 2522, 2529, 2530, 2535, 2538, 2546, 2547, 2548, 2549, 2553, 2555, 2556, 2558, 2559, 2562, 2563, 2565, 2574, 2575, 2577, 2581, 2589, 2590, 2592, 2616, 2623, 2624, 2626, 2628, 2629, 2644, 2652, 2657, 2663, 2667, 2671, 2682, 2701, 2714, 2716, 2719, 2727, 2730, 2736, 2742, 2745, 2746, 2749, 2754, 2756, 2757, 2762, 2766, 2767, 2769, 2777, 2788, 2791, 2798, 2801, 2803, 2806, 2807, 2810, 2814, 2815, 2816, 2820, 2822, 2823, 2824, 2829, 2833, 2837, 2840, 2843, 2851, 2854, 2857, 2860, 2861, 2867, 2877, 2878, 2880, 2882, 2884, 2899, 2901, 2904, 2905, 2912, 2913, 2915, 2916, 2921, 2922, 2926, 2933, 2937, 2938, 2944, 2949, 2953, 2955, 2957, 2963, 2968, 2975, 2977, 2979, 2985, 2991, 2995, 2998]}\n","CPU times: user 10min 58s, sys: 3min 47s, total: 14min 46s\n","Wall time: 12h 34min 15s\n"]}],"source":["%%time\n","\n","evaluate_model_all_epochs(\"internlm/internlm2_5-7b-chat-1m\", \"llama-factory/saves/internlm2_5_7b/lora/sft_bf16\", 3, start_epoch=0, load_in_4bit=False, num_of_entries=-1)"]},{"cell_type":"code","execution_count":14,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["Epoch 4\n","loading env vars from: /home/inflaton/code/projects/courses/logical-reasoning/.env\n","Adding /home/inflaton/code/projects/courses/logical-reasoning to sys.path\n","loading /home/inflaton/code/projects/courses/logical-reasoning/llm_toolkit/logical_reasoning_utils.py\n","internlm/internlm2_5-7b-chat-1m llama-factory/saves/internlm2_5_7b/lora/sft_bf16/checkpoint-2248 False datasets/mgtv results/mgtv-results_bf16.csv\n","(1) GPU = NVIDIA GeForce RTX 4080 Laptop GPU. Max memory = 11.994 GB.\n","0.0 GB of memory reserved.\n","loading model: internlm/internlm2_5-7b-chat-1m\n","[INFO|tokenization_utils_base.py:2161] 2024-07-12 08:47:38,496 >> loading file ./tokenizer.model from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/./tokenizer.model\n","[INFO|tokenization_utils_base.py:2161] 2024-07-12 08:47:38,497 >> loading file added_tokens.json from cache at None\n","[INFO|tokenization_utils_base.py:2161] 2024-07-12 08:47:38,497 >> loading file special_tokens_map.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/special_tokens_map.json\n","[INFO|tokenization_utils_base.py:2161] 2024-07-12 08:47:38,497 >> loading file tokenizer_config.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/tokenizer_config.json\n","[INFO|tokenization_utils_base.py:2161] 2024-07-12 08:47:38,497 >> loading file tokenizer.json from cache at None\n","07/12/2024 08:47:39 - INFO - llamafactory.data.template - Replace eos token: <|im_end|>\n","07/12/2024 08:47:39 - INFO - llamafactory.data.template - Add <|im_start|> to stop words.\n","[INFO|configuration_utils.py:733] 2024-07-12 08:47:39,835 >> loading configuration file config.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/config.json\n","[INFO|configuration_utils.py:733] 2024-07-12 08:47:40,565 >> loading configuration file config.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/config.json\n","[INFO|configuration_utils.py:800] 2024-07-12 08:47:40,566 >> Model config InternLM2Config {\n"," \"_name_or_path\": \"internlm/internlm2_5-7b-chat-1m\",\n"," \"architectures\": [\n"," \"InternLM2ForCausalLM\"\n"," ],\n"," \"attn_implementation\": \"eager\",\n"," \"auto_map\": {\n"," \"AutoConfig\": \"internlm/internlm2_5-7b-chat-1m--configuration_internlm2.InternLM2Config\",\n"," \"AutoModel\": \"internlm/internlm2_5-7b-chat-1m--modeling_internlm2.InternLM2ForCausalLM\",\n"," \"AutoModelForCausalLM\": \"internlm/internlm2_5-7b-chat-1m--modeling_internlm2.InternLM2ForCausalLM\"\n"," },\n"," \"bias\": false,\n"," \"bos_token_id\": 1,\n"," \"eos_token_id\": 2,\n"," \"hidden_act\": \"silu\",\n"," \"hidden_size\": 4096,\n"," \"initializer_range\": 0.02,\n"," \"intermediate_size\": 14336,\n"," \"max_position_embeddings\": 262144,\n"," \"model_type\": \"internlm2\",\n"," \"num_attention_heads\": 32,\n"," \"num_hidden_layers\": 32,\n"," \"num_key_value_heads\": 8,\n"," \"pad_token_id\": 2,\n"," \"pretraining_tp\": 1,\n"," \"rms_norm_eps\": 1e-05,\n"," \"rope_scaling\": {\n"," \"factor\": 2.5,\n"," \"type\": \"dynamic\"\n"," },\n"," \"rope_theta\": 50000000,\n"," \"tie_word_embeddings\": false,\n"," \"torch_dtype\": \"bfloat16\",\n"," \"transformers_version\": \"4.42.3\",\n"," \"use_cache\": true,\n"," \"vocab_size\": 92544\n","}\n","\n","07/12/2024 08:47:40 - INFO - llamafactory.model.patcher - Using KV cache for faster generation.\n","[INFO|modeling_utils.py:3556] 2024-07-12 08:47:41,337 >> loading weights file model.safetensors from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/model.safetensors.index.json\n","[INFO|modeling_utils.py:1531] 2024-07-12 08:47:41,514 >> Instantiating InternLM2ForCausalLM model under default dtype torch.bfloat16.\n","[INFO|configuration_utils.py:1000] 2024-07-12 08:47:41,515 >> Generate config GenerationConfig {\n"," \"bos_token_id\": 1,\n"," \"eos_token_id\": 2,\n"," \"pad_token_id\": 2\n","}\n","\n","Loading checkpoint shards: 100%|██████████████████| 8/8 [05:03<00:00, 37.88s/it]\n","[INFO|modeling_utils.py:4364] 2024-07-12 08:52:44,703 >> All model checkpoint weights were used when initializing InternLM2ForCausalLM.\n","\n","[INFO|modeling_utils.py:4372] 2024-07-12 08:52:44,703 >> All the weights of InternLM2ForCausalLM were initialized from the model checkpoint at internlm/internlm2_5-7b-chat-1m.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use InternLM2ForCausalLM for predictions without further training.\n","[INFO|configuration_utils.py:955] 2024-07-12 08:52:45,066 >> loading configuration file generation_config.json from cache at /home/inflaton/.cache/huggingface/hub/models--internlm--internlm2_5-7b-chat-1m/snapshots/8d1a709a04d71440ef3df6ebbe204672f411c8b6/generation_config.json\n","[INFO|configuration_utils.py:1000] 2024-07-12 08:52:45,066 >> Generate config GenerationConfig {\n"," \"bos_token_id\": 1,\n"," \"eos_token_id\": [\n"," 2,\n"," 92542\n"," ],\n"," \"pad_token_id\": 2\n","}\n","\n","WARNING:root:Some parameters are on the meta device device because they were offloaded to the cpu.\n","07/12/2024 08:52:45 - INFO - llamafactory.model.model_utils.attention - Using vanilla attention implementation.\n","INFO:llamafactory.model.model_utils.attention:Using vanilla attention implementation.\n","WARNING:root:Some parameters are on the meta device device because they were offloaded to the cpu.\n","07/12/2024 08:56:17 - INFO - llamafactory.model.adapter - Merged 1 adapter(s).\n","INFO:llamafactory.model.adapter:Merged 1 adapter(s).\n","07/12/2024 08:56:17 - INFO - llamafactory.model.adapter - Loaded adapter(s): llama-factory/saves/internlm2_5_7b/lora/sft_bf16/checkpoint-2248\n","INFO:llamafactory.model.adapter:Loaded adapter(s): llama-factory/saves/internlm2_5_7b/lora/sft_bf16/checkpoint-2248\n","07/12/2024 08:56:17 - INFO - llamafactory.model.loader - all params: 7,737,708,544\n","INFO:llamafactory.model.loader:all params: 7,737,708,544\n","(2) GPU = NVIDIA GeForce RTX 4080 Laptop GPU. Max memory = 11.994 GB.\n","14.451 GB of memory reserved.\n","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","--------------------------------------------------\n","text: 甄加索是自杀吗\n","--------------------------------------------------\n","label: 不是\n","--------------------------------------------------\n","answer: nan\n","--------------------------------------------------\n","title: 海岸之谜\n","--------------------------------------------------\n","puzzle: 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任何打斗的迹象。请问甄加索的死因是什么?\n","--------------------------------------------------\n","truth: 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在创作一幅描绘海洋生物的画作。在画即将完成的前一天晚上,他骑着自行车外出,打算在海边观赏夜景。然而,他在沙滩上意外发现了一只搁浅的海豚,为了救助这只海豚,他耗费了极大的体力,最终成功将其送回海中。筋疲力尽的甄加索在沙滩上睡着了,由于他患有严重的心脏病,却未告知旁人,在寒冷的海风中,他的心脏停止了跳动。因此,警方在现场只发现了车轮痕迹和未完成的画作,而没有发现任何他杀的迹象。\n","--------------------------------------------------\n","train_text: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任何打斗的迹象。请问甄加索的死因是什么?\n","\n","实际情况: 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在创作一幅描绘海洋生物的画作。在画即将完成的前一天晚上,他骑着自行车外出,打算在海边观赏夜景。然而,他在沙滩上意外发现了一只搁浅的海豚,为了救助这只海豚,他耗费了极大的体力,最终成功将其送回海中。筋疲力尽的甄加索在沙滩上睡着了,由于他患有严重的心脏病,却未告知旁人,在寒冷的海风中,他的心脏停止了跳动。因此,警方在现场只发现了车轮痕迹和未完成的画作,而没有发现任何他杀的迹象。\n","\n","参与者提出的问题: 甄加索是自杀吗\n","<|im_end|>\n","<|im_start|>assistant\n","不是<|im_end|>\n","--------------------------------------------------\n","prompt: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任何打斗的迹象。请问甄加索的死因是什么?\n","\n","实际情况: 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在创作一幅描绘海洋生物的画作。在画即将完成的前一天晚上,他骑着自行车外出,打算在海边观赏夜景。然而,他在沙滩上意外发现了一只搁浅的海豚,为了救助这只海豚,他耗费了极大的体力,最终成功将其送回海中。筋疲力尽的甄加索在沙滩上睡着了,由于他患有严重的心脏病,却未告知旁人,在寒冷的海风中,他的心脏停止了跳动。因此,警方在现场只发现了车轮痕迹和未完成的画作,而没有发现任何他杀的迹象。\n","\n","参与者提出的问题: 甄加索是自杀吗\n","<|im_end|>\n","<|im_start|>assistant\n","\n","--------------------------------------------------\n","text: 死者受伤了吗\n","--------------------------------------------------\n","label: 不是\n","--------------------------------------------------\n","answer: nan\n","--------------------------------------------------\n","title: 甄庄哭声\n","--------------------------------------------------\n","puzzle: 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","--------------------------------------------------\n","truth: 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","--------------------------------------------------\n","train_text: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","实际情况: 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","\n","参与者提出的问题: 死者受伤了吗\n","<|im_end|>\n","<|im_start|>assistant\n","不是<|im_end|>\n","--------------------------------------------------\n","prompt: <|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","5. 参与者需要根据回答来推理,并最终找出谜题的正确答案。\n","\n","请严格按照这些规则回答参与者提出的问题。\n","\n","谜题: 在一个安静的夜晚,小村庄的湖边突然传来了阵阵哭泣声。第二天早晨,村长甄锐发现湖边的石头上放着一顶破旧的帽子,但没有人知道这顶帽子是从哪里来的,哭泣声又是为何。请还原故事真相。\n","\n","实际情况: 原来,这顶破旧的帽子属于一个小男孩,他小时候与爷爷在湖边生活。爷爷教他钓鱼、游泳,还告诉他湖中的海龟是他们的朋友。后来,小男孩随父母去了城市生活,但每年夏天都会回到村子探望爷爷。然而,去年夏天,爷爷因病去世,小男孩伤心欲绝。今年夏天,他回到村子,来到湖边,想起和爷爷的美好回忆,忍不住哭泣。他将爷爷的帽子放在湖边的石头上,希望能让爷爷的在天之灵得到安慰。那晚的哭泣声正是小男孩在祭莫他亲爱的爷爷。\n","\n","参与者提出的问题: 死者受伤了吗\n","<|im_end|>\n","<|im_start|>assistant\n","\n","Evaluating model: internlm/internlm2_5-7b-chat-1m\n"," 0%| | 0/3000 [00:00\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n","100%|█████████████████████████████████████| 3000/3000 [3:32:49<00:00, 4.26s/it]\n","(3) GPU = NVIDIA GeForce RTX 4080 Laptop GPU. Max memory = 11.994 GB.\n","14.451 GB of memory reserved.\n"," text ... internlm/internlm2_5-7b-chat-1m_checkpoint-2248\n","0 甄加索是自杀吗 ... 不是\n","\n","[1 rows x 10 columns]\n","{'accuracy': 0.68, 'incorrect_ids': [6, 12, 13, 17, 24, 25, 27, 28, 31, 33, 34, 35, 36, 55, 58, 59, 61, 65, 66, 67, 77, 78, 81, 82, 83, 84, 91, 93, 94, 96, 104, 106, 108, 109, 110, 112, 115, 117, 120, 121, 124, 128, 129, 131, 135, 136, 137, 138, 139, 143, 149, 150, 153, 155, 160, 161, 163, 164, 170, 172, 173, 174, 179, 180, 190, 192, 193, 200, 202, 210, 216, 218, 224, 225, 227, 229, 234, 236, 240, 241, 242, 243, 245, 248, 250, 252, 253, 259, 260, 261, 275, 276, 278, 286, 292, 295, 299, 301, 304, 308, 314, 316, 318, 320, 321, 323, 328, 330, 332, 333, 334, 335, 339, 342, 346, 350, 352, 353, 354, 355, 356, 357, 359, 360, 362, 365, 368, 370, 371, 373, 374, 376, 377, 383, 386, 389, 395, 397, 403, 404, 406, 410, 411, 423, 428, 429, 430, 432, 438, 447, 450, 452, 454, 456, 458, 462, 465, 467, 471, 472, 473, 475, 476, 480, 481, 482, 486, 488, 490, 492, 493, 494, 495, 497, 501, 502, 504, 506, 507, 510, 511, 514, 515, 517, 519, 520, 530, 534, 536, 540, 555, 560, 561, 566, 568, 570, 571, 579, 580, 581, 589, 591, 593, 596, 597, 598, 601, 604, 609, 612, 613, 614, 621, 625, 626, 628, 629, 632, 636, 637, 643, 644, 646, 647, 649, 653, 663, 665, 666, 671, 678, 682, 683, 686, 690, 695, 701, 702, 705, 708, 709, 718, 720, 721, 727, 729, 730, 734, 739, 740, 747, 752, 754, 758, 760, 763, 770, 771, 772, 774, 778, 785, 788, 791, 798, 799, 800, 801, 805, 809, 816, 818, 819, 820, 821, 822, 823, 824, 828, 833, 834, 837, 840, 841, 843, 847, 848, 849, 851, 856, 859, 861, 866, 867, 869, 870, 873, 875, 876, 884, 886, 888, 889, 890, 891, 899, 901, 904, 906, 913, 917, 920, 927, 930, 932, 935, 937, 940, 942, 943, 945, 946, 948, 952, 954, 958, 962, 964, 966, 969, 970, 980, 982, 986, 988, 991, 993, 998, 1001, 1003, 1006, 1007, 1011, 1012, 1014, 1015, 1017, 1018, 1021, 1022, 1023, 1028, 1031, 1036, 1040, 1043, 1045, 1046, 1051, 1053, 1056, 1066, 1073, 1075, 1076, 1077, 1078, 1080, 1082, 1084, 1087, 1089, 1096, 1098, 1107, 1108, 1111, 1114, 1116, 1120, 1121, 1124, 1125, 1126, 1129, 1138, 1140, 1153, 1154, 1155, 1158, 1161, 1163, 1164, 1166, 1167, 1169, 1172, 1173, 1174, 1177, 1178, 1180, 1181, 1183, 1185, 1196, 1203, 1209, 1212, 1216, 1230, 1232, 1235, 1237, 1240, 1241, 1242, 1243, 1251, 1252, 1254, 1258, 1259, 1262, 1266, 1267, 1274, 1282, 1289, 1296, 1300, 1305, 1306, 1308, 1311, 1313, 1315, 1317, 1323, 1324, 1331, 1339, 1340, 1342, 1348, 1349, 1353, 1354, 1357, 1364, 1367, 1369, 1370, 1374, 1385, 1386, 1387, 1388, 1389, 1391, 1392, 1393, 1395, 1400, 1406, 1407, 1412, 1413, 1420, 1422, 1424, 1426, 1427, 1430, 1435, 1438, 1440, 1441, 1443, 1444, 1445, 1446, 1448, 1450, 1451, 1452, 1453, 1454, 1455, 1457, 1459, 1460, 1462, 1469, 1473, 1476, 1478, 1482, 1487, 1493, 1496, 1499, 1504, 1512, 1515, 1517, 1519, 1525, 1526, 1528, 1533, 1537, 1545, 1546, 1547, 1552, 1554, 1558, 1560, 1564, 1569, 1572, 1581, 1585, 1586, 1590, 1591, 1593, 1594, 1603, 1604, 1605, 1606, 1612, 1613, 1622, 1627, 1631, 1632, 1633, 1636, 1637, 1641, 1645, 1647, 1648, 1650, 1653, 1654, 1655, 1659, 1662, 1665, 1672, 1673, 1676, 1678, 1683, 1686, 1690, 1691, 1694, 1695, 1711, 1712, 1716, 1717, 1718, 1726, 1727, 1731, 1734, 1736, 1741, 1745, 1751, 1753, 1755, 1756, 1758, 1768, 1772, 1780, 1784, 1786, 1787, 1791, 1792, 1796, 1799, 1804, 1809, 1812, 1814, 1816, 1818, 1820, 1827, 1833, 1835, 1839, 1845, 1846, 1848, 1851, 1858, 1860, 1869, 1870, 1879, 1881, 1884, 1888, 1890, 1907, 1913, 1914, 1919, 1928, 1930, 1935, 1941, 1944, 1950, 1953, 1958, 1961, 1963, 1964, 1973, 1978, 1981, 1983, 1984, 1988, 1989, 1990, 1992, 1994, 1995, 1996, 1998, 2001, 2002, 2005, 2008, 2010, 2014, 2017, 2021, 2025, 2028, 2029, 2035, 2036, 2038, 2042, 2044, 2046, 2049, 2054, 2059, 2062, 2063, 2064, 2070, 2076, 2077, 2082, 2097, 2100, 2101, 2106, 2109, 2110, 2112, 2114, 2119, 2121, 2126, 2133, 2139, 2145, 2147, 2156, 2161, 2162, 2164, 2169, 2173, 2177, 2179, 2184, 2185, 2186, 2188, 2193, 2194, 2195, 2197, 2198, 2199, 2205, 2212, 2215, 2219, 2223, 2226, 2230, 2237, 2240, 2243, 2245, 2247, 2248, 2250, 2251, 2254, 2260, 2261, 2262, 2265, 2267, 2274, 2285, 2287, 2293, 2297, 2304, 2311, 2312, 2313, 2314, 2319, 2320, 2322, 2323, 2324, 2330, 2333, 2334, 2335, 2339, 2348, 2349, 2355, 2359, 2360, 2364, 2366, 2372, 2376, 2378, 2379, 2388, 2389, 2395, 2400, 2401, 2404, 2406, 2408, 2409, 2410, 2412, 2419, 2422, 2423, 2424, 2425, 2429, 2437, 2440, 2442, 2444, 2445, 2446, 2448, 2459, 2461, 2463, 2464, 2465, 2466, 2469, 2471, 2476, 2477, 2484, 2488, 2491, 2493, 2495, 2496, 2503, 2515, 2517, 2520, 2522, 2526, 2529, 2530, 2532, 2535, 2538, 2539, 2540, 2542, 2546, 2547, 2548, 2549, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 2560, 2562, 2563, 2564, 2565, 2566, 2574, 2575, 2577, 2581, 2589, 2590, 2592, 2595, 2606, 2607, 2610, 2623, 2624, 2626, 2628, 2629, 2644, 2652, 2657, 2659, 2660, 2663, 2667, 2670, 2671, 2672, 2676, 2678, 2681, 2682, 2684, 2687, 2691, 2694, 2695, 2702, 2714, 2716, 2721, 2727, 2730, 2731, 2733, 2735, 2736, 2737, 2742, 2744, 2745, 2746, 2749, 2751, 2754, 2755, 2756, 2757, 2760, 2761, 2762, 2764, 2766, 2767, 2777, 2788, 2794, 2798, 2801, 2803, 2806, 2807, 2809, 2811, 2814, 2815, 2816, 2820, 2821, 2822, 2823, 2831, 2833, 2834, 2837, 2840, 2841, 2843, 2844, 2845, 2854, 2857, 2858, 2861, 2867, 2874, 2877, 2878, 2880, 2884, 2885, 2886, 2888, 2889, 2899, 2905, 2912, 2913, 2915, 2916, 2921, 2922, 2933, 2937, 2938, 2939, 2944, 2949, 2953, 2955, 2957, 2960, 2963, 2968, 2975, 2976, 2977, 2978, 2979, 2980, 2981, 2985, 2990, 2991, 2995, 2998]}\n","CPU times: user 2min 58s, sys: 58.3 s, total: 3min 57s\n","Wall time: 3h 41min 39s\n"]}],"source":["%%time\n","\n","evaluate_model_all_epochs(\"internlm/internlm2_5-7b-chat-1m\", \"llama-factory/saves/internlm2_5_7b/lora/sft_bf16\", 4, start_epoch=4, load_in_4bit=False, num_of_entries=-1)"]}],"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}