diff --git "a/finetune/2-gpt2-gene-multi-v2-instruction-ft.ipynb" "b/finetune/2-gpt2-gene-multi-v2-instruction-ft.ipynb" new file mode 100644--- /dev/null +++ "b/finetune/2-gpt2-gene-multi-v2-instruction-ft.ipynb" @@ -0,0 +1,1666 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "b28e3499-bbff-4548-9f85-2baee088cabf", + "metadata": {}, + "outputs": [], + "source": [ + "import subprocess\n", + "import os\n", + "# 设置环境变量, autodl一般区域\n", + "result = subprocess.run('bash -c \"source /etc/network_turbo && env | grep proxy\"', shell=True, capture_output=True, text=True)\n", + "output = result.stdout\n", + "for line in output.splitlines():\n", + " if '=' in line:\n", + " var, value = line.split('=', 1)\n", + " os.environ[var] = value\n", + "\n", + "# import os\n", + "\n", + "# # 设置环境变量\n", + "# os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'\n", + "\n", + "# # 打印环境变量以确认设置成功\n", + "# print(os.environ.get('HF_ENDPOINT'))" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "dc04d5e3-7623-4d59-9f3b-ad03e339db11", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Using the latest cached version of the dataset since paws-x couldn't be found on the Hugging Face Hub\n", + "Found the latest cached dataset configuration 'en' at /root/.cache/huggingface/datasets/paws-x/en/0.0.0/4cd8187c404bda33cb1f62b49b001115862acf37 (last modified on Fri Feb 7 01:14:24 2025).\n" + ] + }, + { + "data": { + "text/plain": [ + "DatasetDict({\n", + " train: Dataset({\n", + " features: ['id', 'sentence1', 'sentence2', 'label'],\n", + " num_rows: 49401\n", + " })\n", + " test: Dataset({\n", + " features: ['id', 'sentence1', 'sentence2', 'label'],\n", + " num_rows: 2000\n", + " })\n", + " validation: Dataset({\n", + " features: ['id', 'sentence1', 'sentence2', 'label'],\n", + " num_rows: 2000\n", + " })\n", + "})" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from datasets import load_dataset\n", + "en_dataset = load_dataset('paws-x', 'en')\n", + "en_dataset" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "f7332fa1-3343-4247-b4cc-54733dff6964", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'id': 1,\n", + " 'sentence1': 'In Paris , in October 1560 , he secretly met the English ambassador , Nicolas Throckmorton , asking him for a passport to return to England through Scotland .',\n", + " 'sentence2': 'In October 1560 , he secretly met with the English ambassador , Nicolas Throckmorton , in Paris , and asked him for a passport to return to Scotland through England .',\n", + " 'label': 0}" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "en_dataset[\"train\"][0]" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "id": "93d09d8d-f521-49f7-b0e0-7ac089dfbf49", + "metadata": {}, + "outputs": [], + "source": [ + "def build_prompt_ori(example):\n", + " if int(example['label']) == 1:\n", + " label = 'Yes'\n", + " else:\n", + " label = 'No'\n", + "\n", + " instruction = \"Determine if the following two sentences express the same meaning . The result will be one of the following: Yes, No.\"\n", + " \n", + " sentence1 = example[\"sentence1\"]\n", + " sentence2 = example[\"sentence2\"]\n", + " \n", + "\n", + " input_text = f\"Sentence 1: {sentence1} \\n Sentence 2: {sentence2} \"\n", + "\n", + "\n", + " output = label\n", + "\n", + " prompt = {\"instruction\":instruction, \n", + " \"input\":input_text,\n", + " \"output\":output\n", + " }\n", + "\n", + " return prompt" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "9f9c0e5a-6591-47ac-b358-d746a00dfc0a", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'instruction': 'Determine if the following two sentences express the same meaning .\\xa0The result will be one of the following: Yes, No.', 'input': 'Sentence 1: In Paris , in October 1560 , he secretly met the English ambassador , Nicolas Throckmorton , asking him for a passport to return to England through Scotland . \\n\\xa0Sentence 2: In October 1560 , he secretly met with the English ambassador , Nicolas Throckmorton , in Paris , and asked him for a passport to return to Scotland through England . ', 'output': 'No'}\n" + ] + } + ], + "source": [ + "example = en_dataset[\"train\"][0]\n", + "print(build_prompt(example))" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "83070a23-1604-4d28-b371-e01060331ed5", + "metadata": {}, + "outputs": [], + "source": [ + "import json\n", + "ins_file = open(\"paws-x-en.jsonl\", \"w\")\n", + "for ins in en_dataset[\"train\"]:\n", + " ins = build_prompt_ori(ins)\n", + " ins_file.write(json.dumps(ins)+\"\\n\")\n", + "ins_file.close()" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "89fb8ed3-aa58-462f-b2a6-ce445c597a33", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "137775173bc442efaf1c67186173df35", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Generating train split: 0 examples [00:00, ? examples/s]" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": [ + "DatasetDict({\n", + " train: Dataset({\n", + " features: ['instruction', 'input', 'output'],\n", + " num_rows: 49401\n", + " })\n", + "})" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "en_ft_dataset = load_dataset(\"json\", data_files='paws-x-en.jsonl')\n", + "en_ft_dataset" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "e4f7b75f-6ccb-4fda-8004-40df7d52678f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "DatasetDict({\n", + " train: Dataset({\n", + " features: ['instruction', 'input', 'output'],\n", + " num_rows: 44460\n", + " })\n", + " test: Dataset({\n", + " features: ['instruction', 'input', 'output'],\n", + " num_rows: 4941\n", + " })\n", + "})" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "data = en_ft_dataset[\"train\"].train_test_split(train_size=0.9, seed=42)\n", + "data" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "36d9ee0e-8423-4529-aa7e-fda2728fab2f", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2025-02-09 15:56:14.085267: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n", + "2025-02-09 15:56:14.098333: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n", + "2025-02-09 15:56:14.113407: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n", + "2025-02-09 15:56:14.117840: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n", + "2025-02-09 15:56:14.128889: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n", + "To enable the following instructions: AVX2 AVX512F AVX512_VNNI AVX512_BF16 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n", + "2025-02-09 15:56:15.146754: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n" + ] + } + ], + "source": [ + "# 初始化tokenizer\n", + "from datasets import load_dataset\n", + "from transformers import AutoTokenizer, GPT2LMHeadModel, AutoConfig\n", + "from transformers import GPT2Tokenizer,GPT2Model,AutoModel\n", + "from transformers import DataCollatorForLanguageModeling\n", + "from transformers import Trainer, TrainingArguments\n", + "from tokenizers import Tokenizer\n", + "from transformers import GPT2TokenizerFast\n", + "\n", + "#需要使用生物序列+英文的多模态大模型\n", + "tokenizer = AutoTokenizer.from_pretrained(\"dnagpt/gpt2_gene_multi_v2\")\n", + "tokenizer.pad_token = tokenizer.eos_token" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "871baee0-f06f-4422-a741-af533f7d92e1", + "metadata": {}, + "outputs": [], + "source": [ + "#构建提示词\n", + "def format_input(entry):\n", + " instruction_text = (\n", + " f\"Below is an instruction that describes a task. \"\n", + " f\"Write a response that appropriately completes the request.\"\n", + " f\"\\n\\n### Instruction:\\n{entry['instruction']}\"\n", + " )\n", + "\n", + " input_text = f\"\\n\\n### Input:\\n{entry['input']}\" if entry[\"input\"] else \"\"\n", + "\n", + " return instruction_text + input_text + \"\\n\\n### Response:\\n\"\n", + "\n", + "#构建提示词\n", + "def build_prompt(entry):\n", + "\n", + " input_data = format_input(entry)\n", + "\n", + " desired_response = entry['output']\n", + "\n", + " return input_data + desired_response" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "bca1c275-cc3d-43df-923e-e6604d584226", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'instruction': 'Determine if the following two sentences express the same meaning .\\xa0The result will be one of the following: Yes, No.',\n", + " 'input': 'Sentence 1: Allied armies invaded France in early 1814 , Paris fell , and in April Napoleon surrendered . \\n\\xa0Sentence 2: In early 1814 , Allied armies entered France , Paris surrendered , and Napoleon fell in April . ',\n", + " 'output': 'No'}" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "example = data[\"test\"][0]\n", + "example" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "76f2e027-0a31-4919-bb7e-404c786e1599", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n", + "\n", + "### Instruction:\n", + "Determine if the following two sentences express the same meaning . The result will be one of the following: Yes, No.\n", + "\n", + "### Input:\n", + "Sentence 1: Allied armies invaded France in early 1814 , Paris fell , and in April Napoleon surrendered . \n", + " Sentence 2: In early 1814 , Allied armies entered France , Paris surrendered , and Napoleon fell in April . \n", + "\n", + "### Response:\n", + "No\n" + ] + } + ], + "source": [ + "prompt = build_prompt(example)\n", + "print(prompt)" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "id": "932b54ca-7e27-47cd-b67d-7ef8386b6608", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "tokens: Bel ow is an instruction that describes a task . W rite a response that appropriate ly comple tes the request . # # # Instru ction : D eter mine if the following two sent ences express the same meaning . The result will be one of the following : Yes , No . # # # In put : Sent ence 1 : Allied arm ies in va ded France in early 1814 , Paris fell , and in April Napoleon surrender ed . Sent ence 2 : In early 1814 , Allied arm ies entered France , Paris surrender ed , and Napoleon fell in April . # # # Respon se : No\n" + ] + } + ], + "source": [ + "print('tokens: ', ' '.join(tokenizer.tokenize(prompt)))" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "26671faf-68d0-4a44-978e-e1a24e86c9b1", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "70ac07f3e2b846cd992f72a0451073f6", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Map: 0%| | 0/44460 [00:00, std::allocator >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::logic_error@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::locale::~locale()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_string, std::allocator >::basic_string(std::string const&, unsigned long, unsigned long)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `__cxa_end_catch@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `VTT for std::basic_ofstream >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::logic_error::~logic_error()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for __cxxabiv1::__si_class_type_info@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_ios >::_M_cache_locale(std::locale const&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `VTT for std::basic_stringstream, std::allocator >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `operator new[](unsigned long)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::_M_leak_hard()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::basic_ifstream >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_streambuf >::basic_streambuf(std::basic_streambuf > const&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::append(char const*, unsigned long)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_string, std::allocator >::basic_string(std::string const&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `typeinfo for unsigned short@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::resize(unsigned long, char)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `typeinfo for char const*@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::ctype::_M_widen_init() const@GLIBCXX_3.4.11'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::__throw_invalid_argument(char const*)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::locale::operator=(std::locale const&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_ios >::_M_cache_locale(std::locale const&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base const*)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `__cxa_free_exception@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::condition_variable::notify_one()@GLIBCXX_3.4.11'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::ios_base::Init::~Init()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_string, std::allocator >::~basic_string()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `__cxa_pure_virtual@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::ostream::flush()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for __cxxabiv1::__class_type_info@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `__cxa_rethrow@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::basic_stringbuf, std::allocator >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_fstream >::~basic_fstream()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::compare(char const*) const@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `VTT for std::basic_ostringstream, std::allocator >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::locale::locale()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::chrono::_V2::system_clock::now()@GLIBCXX_3.4.19'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `VTT for std::basic_ifstream >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::_Hash_bytes(void const*, unsigned long, unsigned long)@CXXABI_1.3.5'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::ostream& std::ostream::_M_insert(long long)@GLIBCXX_3.4.9'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `typeinfo for char*@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::__detail::_Prime_rehash_policy::_M_need_rehash(unsigned long, unsigned long, unsigned long) const@GLIBCXX_3.4.18'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::out_of_range@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::ostream& std::ostream::_M_insert(unsigned long)@GLIBCXX_3.4.9'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base const*)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::ios_base::~ios_base()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::range_error::~range_error()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::__basic_file::~__basic_file()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `__cxa_guard_acquire@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::ostream& std::ostream::_M_insert(bool)@GLIBCXX_3.4.9'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::overflow_error@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `VTT for std::basic_fstream >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::range_error@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::basic_ios >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::basic_filebuf >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `operator delete[](void*)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::basic_stringstream, std::allocator >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_string, std::allocator >::basic_string(unsigned long, char, std::allocator const&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, std::__detail::_List_node_base*)@GLIBCXX_3.4.15'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::replace(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `typeinfo for std::exception@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_string, std::allocator >::_Rep::_M_destroy(std::allocator const&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::istream& std::istream::_M_extract(double&)@GLIBCXX_3.4.9'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_filebuf >::close()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::basic_fstream >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_ifstream >::basic_ifstream(char const*, std::_Ios_Openmode)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::append(std::string const&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `operator new(unsigned long)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `VTT for std::basic_istringstream, std::allocator >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `typeinfo for unsigned int@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::append(char const*)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::domain_error@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::find(char, unsigned long) const@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::ostream::put(char)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `typeinfo for int@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::__throw_bad_alloc()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `__cxa_thread_atexit@CXXABI_1.3.7'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_ifstream >::~basic_ifstream()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::ios_base::Init::Init()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::condition_variable::condition_variable()@GLIBCXX_3.4.11'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_filebuf >::basic_filebuf()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `VTT for std::basic_istringstream, std::allocator >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::domain_error::~domain_error()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::cerr@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::find(char const*, unsigned long, unsigned long) const@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::basic_istringstream, std::allocator >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_string, std::allocator >::basic_string(std::allocator const&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_stringbuf, std::allocator >::str() const@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::invalid_argument@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `typeinfo for void*@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::assign(std::string const&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_ostringstream, std::allocator >::~basic_ostringstream()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `typeinfo for unsigned long@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)@GLIBCXX_3.4.15'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::__detail::_List_node_base::_M_unhook()@GLIBCXX_3.4.15'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::basic_ostringstream, std::allocator >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_stringbuf, std::allocator >::_M_sync(char*, unsigned long, unsigned long)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_iostream >::~basic_iostream()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::locale::locale(std::locale const&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::basic_istringstream, std::allocator >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `log2f@GLIBC_2.2.5'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::ostream::operator<<(std::basic_streambuf >*)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::basic_streambuf >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::exception::~exception()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::__basic_file::is_open() const@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_istringstream, std::allocator >::~basic_istringstream()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::swap(std::string&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `typeinfo for unsigned long*@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::basic_ostringstream, std::allocator >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_streambuf >::basic_streambuf(std::basic_streambuf > const&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_ios >::init(std::basic_streambuf >*)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::__throw_bad_cast()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_ios >::clear(std::_Ios_Iostate)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_streambuf >::operator=(std::basic_streambuf > const&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `operator delete(void*)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::ostream::operator<<(int)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::_Rep::_S_empty_rep_storage@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::_Rep::_M_destroy(std::allocator const&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_iostream >::~basic_iostream()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::runtime_error@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::basic_ofstream >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_stringstream, std::allocator >::~basic_stringstream()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `VTT for std::basic_stringstream, std::allocator >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::ostream& std::ostream::_M_insert(long)@GLIBCXX_3.4.9'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::istream::get()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `typeinfo for unsigned long long@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_ostream >& std::operator<< >(std::basic_ostream >&, char const*)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::out_of_range::~out_of_range()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::length_error::~length_error()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, long)@GLIBCXX_3.4.9'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::invalid_argument::~invalid_argument()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_string, std::allocator >::swap(std::basic_string, std::allocator >&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::cout@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::ostream& std::ostream::_M_insert(unsigned long long)@GLIBCXX_3.4.9'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `typeinfo for int*@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::ostream& std::ostream::_M_insert(void const*)@GLIBCXX_3.4.9'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::underflow_error@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::basic_streambuf >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `typeinfo for std::out_of_range@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `__cxa_allocate_exception@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::basic_ios >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `typeinfo for void const*@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_ios >::init(std::basic_streambuf >*)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::reserve(unsigned long)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `__cxa_begin_catch@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `typeinfo for long@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_string, std::allocator >::_Rep::_S_empty_rep_storage@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::_M_leak()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_filebuf >::open(char const*, std::_Ios_Openmode)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_stringbuf, std::allocator >::_M_sync(wchar_t*, unsigned long, unsigned long)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::istream::getline(char*, long, char)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_istream >& std::getline, std::allocator >(std::basic_istream >&, std::basic_string, std::allocator >&, char)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::basic_stringstream, std::allocator >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::condition_variable::~condition_variable()@GLIBCXX_3.4.11'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::basic_stringbuf, std::allocator >@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::insert(unsigned long, char const*, unsigned long)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::string::assign(char const*, unsigned long)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `typeinfo for unsigned char@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::ios_base::ios_base()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::__throw_out_of_range(char const*)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::overflow_error::~overflow_error()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::__throw_length_error(char const*)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::__throw_system_error(int)@GLIBCXX_3.4.11'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_ofstream >::close()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::ostream& std::ostream::_M_insert(double)@GLIBCXX_3.4.9'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_streambuf >::operator=(std::basic_streambuf > const&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `typeinfo for long long@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_string, std::allocator >::basic_string(char const*, unsigned long, std::allocator const&)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_ifstream >::close()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `__cxa_guard_release@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `__cxa_throw@CXXABI_1.3'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::underflow_error::~underflow_error()@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `vtable for std::length_error@GLIBCXX_3.4'\n", + "/root/miniconda3/compiler_compat/ld: /usr/local/cuda/lib64/libcufile.so: undefined reference to `std::basic_filebuf >::~basic_filebuf()@GLIBCXX_3.4'\n", + "collect2: error: ld returned 1 exit status\n" + ] + }, + { + "data": { + "text/html": [ + "\n", + "
\n", + " \n", + " \n", + " [16674/16674 20:37, Epoch 3/3]\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", + " \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", + " \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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
StepTraining Loss
5001.119500
10001.018800
15000.958600
20000.906400
25000.852600
30000.818900
35000.775000
40000.747700
45000.706900
50000.682800
55000.648800
60000.537100
65000.513600
70000.500500
75000.488100
80000.477600
85000.460000
90000.450700
95000.453300
100000.437000
105000.420400
110000.410600
115000.349800
120000.331500
125000.326300
130000.323300
135000.320400
140000.315700
145000.313300
150000.308700
155000.305200
160000.306200
165000.302600

" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": [ + "TrainOutput(global_step=16674, training_loss=0.5395479308653753, metrics={'train_runtime': 1237.6894, 'train_samples_per_second': 107.765, 'train_steps_per_second': 13.472, 'total_flos': 1.742556561408e+16, 'train_loss': 0.5395479308653753, 'epoch': 3.0})" + ] + }, + "execution_count": 36, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 开始训练\n", + "trainer.train()" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "id": "315aae76-44b4-4513-8139-40ef22934873", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Saved model to: gpt2_gene_multi_v2_llm_ft\n" + ] + } + ], + "source": [ + "save_dir = 'gpt2_gene_multi_v2_llm_ft'\n", + "trainer.save_model(save_dir)\n", + "print(\"Saved model to:\", save_dir)" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "id": "28d2dbbc-02ff-4120-b230-b19905a786cd", + "metadata": {}, + "outputs": [], + "source": [ + "save_dir = 'gpt2_gene_multi_v2_llm_ft'\n", + "finetuned_model = GPT2LMHeadModel.from_pretrained(save_dir, local_files_only=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "08987c3c-063a-4e9b-9ebb-e637b0b5bccd", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "GPT2LMHeadModel(\n", + " (transformer): GPT2Model(\n", + " (wte): Embedding(115000, 768)\n", + " (wpe): Embedding(256, 768)\n", + " (drop): Dropout(p=0.1, inplace=False)\n", + " (h): ModuleList(\n", + " (0-11): 12 x GPT2Block(\n", + " (ln_1): LayerNorm((768,), eps=1e-05, elementwise_affine=True)\n", + " (attn): GPT2SdpaAttention(\n", + " (c_attn): Conv1D(nf=2304, nx=768)\n", + " (c_proj): Conv1D(nf=768, nx=768)\n", + " (attn_dropout): Dropout(p=0.1, inplace=False)\n", + " (resid_dropout): Dropout(p=0.1, inplace=False)\n", + " )\n", + " (ln_2): LayerNorm((768,), eps=1e-05, elementwise_affine=True)\n", + " (mlp): GPT2MLP(\n", + " (c_fc): Conv1D(nf=3072, nx=768)\n", + " (c_proj): Conv1D(nf=768, nx=3072)\n", + " (act): NewGELUActivation()\n", + " (dropout): Dropout(p=0.1, inplace=False)\n", + " )\n", + " )\n", + " )\n", + " (ln_f): LayerNorm((768,), eps=1e-05, elementwise_affine=True)\n", + " )\n", + " (lm_head): Linear(in_features=768, out_features=115000, bias=False)\n", + ")" + ] + }, + "execution_count": 39, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "finetuned_model" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "id": "d75010e8-6d6a-40ef-852e-0d705adc3da8", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", + "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "input (test): Below is an instruction that describes a task. Write a response that appropriately completes the request.\n", + "\n", + "### Instruction:\n", + "Determine if the following two sentences express the same meaning . The result will be one of the following: Yes, No.\n", + "\n", + "### Input:\n", + "Sentence 1: Allied armies invaded France in early 1814 , Paris fell , and in April Napoleon surrendered . \n", + " Sentence 2: In early 1814 , Allied armies entered France , Paris surrendered , and Napoleon fell in April . \n", + "\n", + "### Response:\n", + "\n", + "--------------------------\n", + "\n", + "model's answer: \n", + "\n", + "n April . # # # Respon se : Yes , No . #\n", + "--------------------------\n", + "\n", + "real answer: \n", + "\n", + "No\n" + ] + } + ], + "source": [ + "print(\"input (test):\", input_text)\n", + "\n", + "print(\"--------------------------\\n\")\n", + "\n", + "print(\"model's answer: \\n\")\n", + "print(inference(input_text, finetuned_model, tokenizer))\n", + "\n", + "print(\"--------------------------\\n\")\n", + "print(\"real answer: \\n\")\n", + "print(data[\"test\"][0][\"output\"])" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "id": "59f31cb2-ccaf-4aea-b7b6-7c3c7a513b94", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Using the latest cached version of the dataset since dnagpt/gene_lan_transfer couldn't be found on the Hugging Face Hub\n", + "Found the latest cached dataset configuration 'dna_protein_pair_rand' at /root/.cache/huggingface/datasets/dnagpt___gene_lan_transfer/dna_protein_pair_rand/0.0.0/fc103580e7cda0d9bc41947f4058887fdc81188c (last modified on Sat Feb 8 23:35:37 2025).\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "0cbf08860690456daffea40f2a264207", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Map: 0%| | 0/14400 [00:00