{"cells":[{"cell_type":"code","execution_count":1,"metadata":{"executionInfo":{"elapsed":476,"status":"ok","timestamp":1720679526275,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"uWKRSV6eZsCn"},"outputs":[],"source":["%load_ext autoreload\n","%autoreload 2"]},{"cell_type":"code","execution_count":2,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"eb33b19f-1206-41ee-84e2-e6258a12eef7","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":2534,"status":"ok","timestamp":1720679529344,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"xwFh14uiZBrI","outputId":"d767799c-34c2-46a5-f052-378146a55321"},"outputs":[],"source":["from pathlib import Path\n","\n","try:\n"," from google.colab import drive\n","\n"," drive.mount(\"/content/drive\")\n"," workding_dir = \"/content/drive/MyDrive/logical-reasoning/\"\n","except ModuleNotFoundError:\n"," workding_dir = str(Path.cwd().parent)"]},{"cell_type":"code","execution_count":3,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"6d394937-6c99-4a7c-9d32-7600a280032f","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":5,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"G5pNu3zgZBrL","outputId":"160a554f-fb08-4aa0-bc00-0422fb7c1fac"},"outputs":[{"name":"stdout","output_type":"stream","text":["workding dir: /home/inflaton/code/projects/courses/logical-reasoning\n"]}],"source":["import os\n","import sys\n","from pathlib import Path\n","\n","os.chdir(workding_dir)\n","sys.path.append(workding_dir)\n","print(\"workding dir:\", workding_dir)"]},{"cell_type":"code","execution_count":4,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"9f67ec60-2f24-411c-84eb-0dd664b44775","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":3,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"hPCC-6m7ZBrM","outputId":"c7aa2c96-5e99-440a-c148-201d79465ff9"},"outputs":[{"name":"stdout","output_type":"stream","text":["loading env vars from: /home/inflaton/code/projects/courses/logical-reasoning/.env\n"]},{"data":{"text/plain":["True"]},"execution_count":4,"metadata":{},"output_type":"execute_result"}],"source":["from dotenv import find_dotenv, load_dotenv\n","\n","found_dotenv = find_dotenv(\".env\")\n","\n","if len(found_dotenv) == 0:\n"," found_dotenv = find_dotenv(\".env.example\")\n","print(f\"loading env vars from: {found_dotenv}\")\n","load_dotenv(found_dotenv, override=True)"]},{"cell_type":"code","execution_count":5,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"f1597656-8042-4878-9d3b-9ebfb8dd86dc","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":3,"status":"ok","timestamp":1720679529345,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"1M3IraVtZBrM","outputId":"29ab35f6-2970-4ade-d85d-3174acf8cda0"},"outputs":[{"name":"stdout","output_type":"stream","text":["inflaton/InternLM_2_5-7b_LR None False datasets/mgtv results/mgtv-results_merged_model.csv\n"]}],"source":["import os\n","\n","model_name = os.getenv(\"MODEL_NAME\")\n","adapter_name_or_path = os.getenv(\"ADAPTER_NAME_OR_PATH\")\n","load_in_4bit = os.getenv(\"LOAD_IN_4BIT\") == \"true\"\n","data_path = os.getenv(\"LOGICAL_REASONING_DATA_PATH\")\n","results_path = os.getenv(\"LOGICAL_REASONING_RESULTS_PATH\")\n","use_english_datasets = os.getenv(\"USE_ENGLISH_DATASETS\") == \"true\"\n","\n","\n","print(model_name, adapter_name_or_path, load_in_4bit, data_path, results_path)"]},{"cell_type":"code","execution_count":6,"metadata":{"application/vnd.databricks.v1+cell":{"cellMetadata":{"byteLimit":2048000,"rowLimit":10000},"inputWidgets":{},"nuid":"b2a43943-9324-4839-9a47-cfa72de2244b","showTitle":false,"title":""},"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":564,"status":"ok","timestamp":1720679529907,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"UgMvt6dIZBrM","outputId":"ce37581c-fd26-46c2-ad87-d933d99f68f7"},"outputs":[{"name":"stdout","output_type":"stream","text":["Python 3.11.9\n","\u001b[33mWARNING: Package(s) not found: flash-attn\u001b[0m\u001b[33m\n","\u001b[0mName: transformers\n","Version: 4.43.0.dev0\n","Summary: State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow\n","Home-page: https://github.com/huggingface/transformers\n","Author: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/transformers/graphs/contributors)\n","Author-email: transformers@huggingface.co\n","License: Apache 2.0 License\n","Location: /home/inflaton/miniconda3/envs/llama-factory/lib/python3.11/site-packages\n","Requires: filelock, huggingface-hub, numpy, packaging, pyyaml, regex, requests, safetensors, tokenizers, tqdm\n","Required-by: llamafactory, peft, trl, vllm\n","CPU times: user 30.7 ms, sys: 1.73 ms, total: 32.4 ms\n","Wall time: 1.99 s\n"]}],"source":["%%time\n","!python --version\n","!pip show flash-attn\n","!pip show transformers"]},{"cell_type":"code","execution_count":7,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":1685,"status":"ok","timestamp":1720679531591,"user":{"displayName":"HUANG DONGHAO _","userId":"00977795705617022768"},"user_tz":-480},"id":"ZuS_FsLyZBrN","outputId":"2cba0105-c505-4395-afbd-2f2fee6581d0"},"outputs":[{"name":"stdout","output_type":"stream","text":["loading /home/inflaton/code/projects/courses/logical-reasoning/llm_toolkit/logical_reasoning_utils.py\n","GPU is available\n"]}],"source":["from llm_toolkit.llm_utils import *\n","from llm_toolkit.logical_reasoning_utils import *\n","\n","device = check_gpu()"]},{"cell_type":"code","execution_count":8,"metadata":{},"outputs":[{"name":"stdout","output_type":"stream","text":["loading model: inflaton/InternLM_2_5-7b_LR\n"]},{"name":"stderr","output_type":"stream","text":["Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n"]},{"data":{"application/vnd.jupyter.widget-view+json":{"model_id":"b3753d6cde4a4c36876ec892af25fd92","version_major":2,"version_minor":0},"text/plain":["Loading checkpoint shards: 0%| | 0/8 [00:00\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [2:12:10<00:00, 2.64s/it] \n"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.1 \\\n","0 不是 \n","\n"," ... \\\n","0 ... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.01 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.02 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.03 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.04 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.05 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.06 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.07 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.08 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.09 \\\n","0 不是 \n","\n"," inflaton/InternLM_2_5-7b_LR_NV4080_rp1.11 \n","0 不是 \n","\n","[1 rows x 21 columns]\n","{'accuracy': 0.4646666666666667}\n","*** Evaluating with repetition_penalty: 1.12\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:02<2:14:53, 2.70s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [1:52:01<00:00, 2.24s/it] \n"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.1 \\\n","0 不是 \n","\n"," ... \\\n","0 ... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.02 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.03 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.04 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.05 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.06 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.07 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.08 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.09 \\\n","0 不是 \n","\n"," inflaton/InternLM_2_5-7b_LR_NV4080_rp1.11 \\\n","0 不是 \n","\n"," inflaton/InternLM_2_5-7b_LR_NV4080_rp1.12 \n","0 不是 \n","\n","[1 rows x 22 columns]\n","{'accuracy': 0.43033333333333335}\n","*** Evaluating with repetition_penalty: 1.1300000000000001\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:01<1:30:17, 1.81s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [1:34:52<00:00, 1.90s/it]\n"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.1 \\\n","0 不是 \n","\n"," ... \\\n","0 ... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.03 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.04 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.05 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.06 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.07 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.08 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.09 \\\n","0 不是 \n","\n"," inflaton/InternLM_2_5-7b_LR_NV4080_rp1.11 \\\n","0 不是 \n","\n"," inflaton/InternLM_2_5-7b_LR_NV4080_rp1.12 \\\n","0 不是 \n","\n"," inflaton/InternLM_2_5-7b_LR_NV4080_rp1.1300000000000001 \n","0 不是 \n","\n","[1 rows x 23 columns]\n","{'accuracy': 0.384}\n","*** Evaluating with repetition_penalty: 1.1400000000000001\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:01<1:18:52, 1.58s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [1:24:16<00:00, 1.69s/it]\n"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.1 \\\n","0 不是 \n","\n"," ... \\\n","0 ... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.04 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.05 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.06 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.07 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.08 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.09 \\\n","0 不是 \n","\n"," inflaton/InternLM_2_5-7b_LR_NV4080_rp1.11 \\\n","0 不是 \n","\n"," inflaton/InternLM_2_5-7b_LR_NV4080_rp1.12 \\\n","0 不是 \n","\n"," inflaton/InternLM_2_5-7b_LR_NV4080_rp1.1300000000000001 \\\n","0 不是 \n","\n"," inflaton/InternLM_2_5-7b_LR_NV4080_rp1.1400000000000001 \n","0 不是 \n","\n","[1 rows x 24 columns]\n","{'accuracy': 0.33066666666666666}\n","*** Evaluating with repetition_penalty: 1.1500000000000001\n"]},{"name":"stderr","output_type":"stream","text":[" 0%| | 1/3000 [00:01<1:20:33, 1.61s/it]"]},{"name":"stdout","output_type":"stream","text":["--------\n","step 1: 不是\n","--------\n","step 2: 不是\n","--------\n","step 3: 不是\n","--------\n","step 4: 不是\n","--------\n","step 5: 不是\n"]},{"name":"stderr","output_type":"stream","text":["100%|██████████| 3000/3000 [1:27:12<00:00, 1.74s/it]"]},{"name":"stdout","output_type":"stream","text":[" text label title puzzle \\\n","0 甄加索是自杀吗 不是 海岸之谜 在远离城市喧嚣的海边小屋,一天清晨,邻居发现甄加索僵卧在沙滩上,已无生命迹象。现场没有发现任... \n","\n"," truth \\\n","0 甄加索是一位热爱自然的画家,他每年都会来到这个海边小屋寻找灵感。在他生命的最后几天,他一直在... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_epoch_6_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_M3 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.1 \\\n","0 不是 \n","\n"," ... \\\n","0 ... \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.05 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.06 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.07 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.08 \\\n","0 不是 \n","\n"," llama-factory/merged_models/internlm2_5-7b-chat-1m_sft_bf16_p2_full_NV4080_rp1.09 \\\n","0 不是 \n","\n"," inflaton/InternLM_2_5-7b_LR_NV4080_rp1.11 \\\n","0 不是 \n","\n"," inflaton/InternLM_2_5-7b_LR_NV4080_rp1.12 \\\n","0 不是 \n","\n"," inflaton/InternLM_2_5-7b_LR_NV4080_rp1.1300000000000001 \\\n","0 不是 \n","\n"," inflaton/InternLM_2_5-7b_LR_NV4080_rp1.1400000000000001 \\\n","0 不是 \n","\n"," inflaton/InternLM_2_5-7b_LR_NV4080_rp1.1500000000000001 \n","0 不是 \n","\n","[1 rows x 25 columns]\n","{'accuracy': 0.259}\n"]},{"name":"stderr","output_type":"stream","text":["\n"]}],"source":["evaluate_model_with_repetition_penalty(model, tokenizer, model_name, datasets[\"test\"])"]}],"metadata":{"accelerator":"GPU","application/vnd.databricks.v1+notebook":{"dashboards":[],"environmentMetadata":null,"language":"python","notebookMetadata":{"mostRecentlyExecutedCommandWithImplicitDF":{"commandId":-1,"dataframes":["_sqldf"]},"pythonIndentUnit":4},"notebookName":"10_eval-lf-medium-py3.11","widgets":{}},"colab":{"gpuType":"L4","provenance":[]},"kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.11.9"}},"nbformat":4,"nbformat_minor":0}