|
137 | 137 | "\n",
|
138 | 138 | "# Exercise 3: Evaluate the finetuned LLM"
|
139 | 139 | ]
|
| 140 | + }, |
| 141 | + { |
| 142 | + "cell_type": "markdown", |
| 143 | + "id": "773a25be-5a02-477b-bfea-ffd53e44647b", |
| 144 | + "metadata": {}, |
| 145 | + "source": [ |
| 146 | + "<br>\n", |
| 147 | + "<br>\n", |
| 148 | + "<br>\n", |
| 149 | + "<br>\n", |
| 150 | + "\n", |
| 151 | + "# Solution" |
| 152 | + ] |
| 153 | + }, |
| 154 | + { |
| 155 | + "cell_type": "code", |
| 156 | + "execution_count": 13, |
| 157 | + "id": "6cd718c4-0e83-4a83-84f8-59e3fc4c3404", |
| 158 | + "metadata": {}, |
| 159 | + "outputs": [ |
| 160 | + { |
| 161 | + "name": "stdout", |
| 162 | + "output_type": "stream", |
| 163 | + "text": [ |
| 164 | + "{'batch_size': 4,\n", |
| 165 | + " 'checkpoint_dir': PosixPath('out/finetune/lora/final'),\n", |
| 166 | + " 'device': None,\n", |
| 167 | + " 'dtype': None,\n", |
| 168 | + " 'force_conversion': False,\n", |
| 169 | + " 'limit': None,\n", |
| 170 | + " 'num_fewshot': None,\n", |
| 171 | + " 'out_dir': None,\n", |
| 172 | + " 'save_filepath': None,\n", |
| 173 | + " 'seed': 1234,\n", |
| 174 | + " 'tasks': 'mmlu_philosophy'}\n", |
| 175 | + "2024-07-04:00:57:13,332 INFO [huggingface.py:170] Using device 'cuda'\n", |
| 176 | + "Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n", |
| 177 | + "2024-07-04:00:57:18,981 INFO [evaluator.py:152] Setting random seed to 1234 | Setting numpy seed to 1234 | Setting torch manual seed to 1234\n", |
| 178 | + "2024-07-04:00:57:18,981 INFO [evaluator.py:203] Using pre-initialized model\n", |
| 179 | + "2024-07-04:00:57:24,808 INFO [evaluator.py:261] Setting fewshot random generator seed to 1234\n", |
| 180 | + "2024-07-04:00:57:24,809 INFO [task.py:411] Building contexts for mmlu_philosophy on rank 0...\n", |
| 181 | + "100%|████████████████████████████████████████| 311/311 [00:00<00:00, 807.98it/s]\n", |
| 182 | + "2024-07-04:00:57:25,206 INFO [evaluator.py:438] Running loglikelihood requests\n", |
| 183 | + "Running loglikelihood requests: 0%| | 0/1244 [00:00<?, ?it/s]We detected that you are passing `past_key_values` as a tuple and this is deprecated and will be removed in v4.43. Please use an appropriate `Cache` class (https://huggingface.co/docs/transformers/v4.41.3/en/internal/generation_utils#transformers.Cache)\n", |
| 184 | + "Running loglikelihood requests: 100%|██████| 1244/1244 [00:07<00:00, 158.49it/s]\n", |
| 185 | + "2024-07-04:00:57:33,515 WARNING [huggingface.py:1315] Failed to get model SHA for /teamspace/studios/this_studio/out/finetune/lora/final/evaluate at revision main. Error: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/teamspace/studios/this_studio/out/finetune/lora/final/evaluate'. Use `repo_type` argument if needed.\n", |
| 186 | + "fatal: not a git repository (or any parent up to mount point /teamspace/studios)\n", |
| 187 | + "Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).\n", |
| 188 | + "| Tasks |Version|Filter|n-shot|Metric| |Value | |Stderr|\n", |
| 189 | + "|----------|------:|------|-----:|------|---|-----:|---|-----:|\n", |
| 190 | + "|philosophy| 0|none | 0|acc |↑ |0.5691|± |0.0281|\n", |
| 191 | + "\n" |
| 192 | + ] |
| 193 | + } |
| 194 | + ], |
| 195 | + "source": [ |
| 196 | + "!litgpt evaluate out/finetune/lora/final --tasks \"mmlu_philosophy\" --batch_size 4" |
| 197 | + ] |
140 | 198 | }
|
141 | 199 | ],
|
142 | 200 | "metadata": {
|
|
160 | 218 | "name": "python",
|
161 | 219 | "nbconvert_exporter": "python",
|
162 | 220 | "pygments_lexer": "ipython3",
|
163 |
| - "version": "3.10.6" |
| 221 | + "version": "3.10.10" |
164 | 222 | }
|
165 | 223 | },
|
166 | 224 | "nbformat": 4,
|
|
0 commit comments