flunardelli commited on
Commit
205f9be
·
verified ·
1 Parent(s): 4a1c7e2

Upload 2 files

Browse files
hf_llm_metaeval_eval_harness_mixtral_mmlu.ipynb CHANGED
@@ -12,31 +12,10 @@
12
  },
13
  {
14
  "cell_type": "code",
15
- "execution_count": 1,
16
  "id": "106470b4-1be2-4790-a5bf-485a1e3bb2d3",
17
  "metadata": {},
18
- "outputs": [
19
- {
20
- "name": "stderr",
21
- "output_type": "stream",
22
- "text": [
23
- "Token has not been saved to git credential helper.\n"
24
- ]
25
- },
26
- {
27
- "name": "stdout",
28
- "output_type": "stream",
29
- "text": [
30
- "\u001b[1m\u001b[31mCannot authenticate through git-credential as no helper is defined on your machine.\n",
31
- "You might have to re-authenticate when pushing to the Hugging Face Hub.\n",
32
- "Run the following command in your terminal in case you want to set the 'store' credential helper as default.\n",
33
- "\n",
34
- "git config --global credential.helper store\n",
35
- "\n",
36
- "Read https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage for more details.\u001b[0m\n"
37
- ]
38
- }
39
- ],
40
  "source": [
41
  "from datetime import datetime\n",
42
  "import os\n",
@@ -121,7 +100,7 @@
121
  },
122
  {
123
  "cell_type": "code",
124
- "execution_count": 4,
125
  "id": "367d4e84-ba2a-42fb-a5a9-b303ab63dea5",
126
  "metadata": {},
127
  "outputs": [],
@@ -146,29 +125,13 @@
146
  },
147
  {
148
  "cell_type": "code",
149
- "execution_count": 3,
150
  "id": "2bc08732-dea6-43a4-8d31-c407069a6eef",
151
  "metadata": {},
152
- "outputs": [
153
- {
154
- "name": "stderr",
155
- "output_type": "stream",
156
- "text": [
157
- "No files have been modified since last commit. Skipping to prevent empty commit.\n"
158
- ]
159
- }
160
- ],
161
  "source": [
162
  "hf_upload_folder(BASE_FOLDER)"
163
  ]
164
- },
165
- {
166
- "cell_type": "code",
167
- "execution_count": null,
168
- "id": "61157ee0-4cf8-473c-a2ff-f695890a738d",
169
- "metadata": {},
170
- "outputs": [],
171
- "source": []
172
  }
173
  ],
174
  "metadata": {
 
12
  },
13
  {
14
  "cell_type": "code",
15
+ "execution_count": null,
16
  "id": "106470b4-1be2-4790-a5bf-485a1e3bb2d3",
17
  "metadata": {},
18
+ "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  "source": [
20
  "from datetime import datetime\n",
21
  "import os\n",
 
100
  },
101
  {
102
  "cell_type": "code",
103
+ "execution_count": null,
104
  "id": "367d4e84-ba2a-42fb-a5a9-b303ab63dea5",
105
  "metadata": {},
106
  "outputs": [],
 
125
  },
126
  {
127
  "cell_type": "code",
128
+ "execution_count": null,
129
  "id": "2bc08732-dea6-43a4-8d31-c407069a6eef",
130
  "metadata": {},
131
+ "outputs": [],
 
 
 
 
 
 
 
 
132
  "source": [
133
  "hf_upload_folder(BASE_FOLDER)"
134
  ]
 
 
 
 
 
 
 
 
135
  }
136
  ],
137
  "metadata": {
hf_llm_metaeval_eval_harness_mixtral_pub.ipynb CHANGED
@@ -12,31 +12,10 @@
12
  },
13
  {
14
  "cell_type": "code",
15
- "execution_count": 5,
16
  "id": "106470b4-1be2-4790-a5bf-485a1e3bb2d3",
17
  "metadata": {},
18
- "outputs": [
19
- {
20
- "name": "stderr",
21
- "output_type": "stream",
22
- "text": [
23
- "Token has not been saved to git credential helper.\n"
24
- ]
25
- },
26
- {
27
- "name": "stdout",
28
- "output_type": "stream",
29
- "text": [
30
- "\u001b[1m\u001b[31mCannot authenticate through git-credential as no helper is defined on your machine.\n",
31
- "You might have to re-authenticate when pushing to the Hugging Face Hub.\n",
32
- "Run the following command in your terminal in case you want to set the 'store' credential helper as default.\n",
33
- "\n",
34
- "git config --global credential.helper store\n",
35
- "\n",
36
- "Read https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage for more details.\u001b[0m\n"
37
- ]
38
- }
39
- ],
40
  "source": [
41
  "from datetime import datetime\n",
42
  "import os\n",
@@ -76,7 +55,7 @@
76
  },
77
  {
78
  "cell_type": "code",
79
- "execution_count": 6,
80
  "id": "4855d529-22d7-4eaf-b6bd-1cc40b0223a6",
81
  "metadata": {},
82
  "outputs": [],
@@ -137,110 +116,10 @@
137
  },
138
  {
139
  "cell_type": "code",
140
- "execution_count": 7,
141
  "id": "cf3725e2-3a26-49b7-a5ba-71ecb5ba28bc",
142
  "metadata": {},
143
- "outputs": [
144
- {
145
- "name": "stdout",
146
- "output_type": "stream",
147
- "text": [
148
- "The following values were not passed to `accelerate launch` and had defaults used instead:\n",
149
- "\t`--num_processes` was set to a value of `0`\n",
150
- "\t`--num_machines` was set to a value of `1`\n",
151
- "\t`--mixed_precision` was set to a value of `'no'`\n",
152
- "\t`--dynamo_backend` was set to a value of `'no'`\n",
153
- "To avoid this warning pass in values for each of the problematic parameters or run `accelerate config`.\n",
154
- "2024-12-07:13:34:28,398 INFO [__main__.py:279] Verbosity set to INFO\n",
155
- "2024-12-07:13:34:28,398 INFO [__main__.py:303] Including path: ./pub/tasks/.\n",
156
- "2024-12-07:13:34:38,122 INFO [__main__.py:376] Selected Tasks: ['pub_task_1']\n",
157
- "2024-12-07:13:34:38,124 INFO [evaluator.py:164] Setting random seed to 0 | Setting numpy seed to 1234 | Setting torch manual seed to 1234 | Setting fewshot manual seed to 1234\n",
158
- "2024-12-07:13:34:38,124 INFO [evaluator.py:201] Initializing hf model, with arguments: {'pretrained': 'mistralai/Mixtral-8x7B-Instruct-v0.1', 'revision': '41bd4c9e7e4fb318ca40e721131d4933966c2cc1', 'trust_remote_code': False, 'dtype': 'bfloat16', 'parallelize': True}\n",
159
- "config.json: 100%|██████████████████████████████| 720/720 [00:00<00:00, 140kB/s]\n",
160
- "tokenizer_config.json: 100%|████████████████| 2.10k/2.10k [00:00<00:00, 521kB/s]\n",
161
- "tokenizer.model: 100%|████████████████████████| 493k/493k [00:00<00:00, 127MB/s]\n",
162
- "tokenizer.json: 100%|██████████████████████| 1.80M/1.80M [00:00<00:00, 47.8MB/s]\n",
163
- "special_tokens_map.json: 100%|██████████████████| 414/414 [00:00<00:00, 419kB/s]\n",
164
- "2024-12-07:13:34:38,668 INFO [huggingface.py:351] Model parallel was set to True, setting max memory per GPU to {} and device map to auto\n",
165
- "model.safetensors.index.json: 100%|████████| 92.7k/92.7k [00:00<00:00, 17.7MB/s]\n",
166
- "Downloading shards: 0%| | 0/19 [00:00<?, ?it/s]\n",
167
- "model-00001-of-00019.safetensors: 0%| | 0.00/4.89G [00:00<?, ?B/s]\u001b[A\n",
168
- "model-00001-of-00019.safetensors: 0%| | 21.0M/4.89G [00:00<01:59, 40.9MB/s]\u001b[A\n",
169
- "model-00001-of-00019.safetensors: 1%| | 31.5M/4.89G [00:00<01:41, 47.8MB/s]\u001b[A\n",
170
- "model-00001-of-00019.safetensors: 1%| | 41.9M/4.89G [00:00<01:39, 48.9MB/s]\u001b[A\n",
171
- "model-00001-of-00019.safetensors: 1%| | 52.4M/4.89G [00:01<01:43, 46.6MB/s]\u001b[A\n",
172
- "model-00001-of-00019.safetensors: 2%| | 73.4M/4.89G [00:01<01:43, 46.8MB/s]\u001b[A\n",
173
- "model-00001-of-00019.safetensors: 2%| | 83.9M/4.89G [00:01<01:34, 51.0MB/s]\u001b[A\n",
174
- "model-00001-of-00019.safetensors: 2%| | 105M/4.89G [00:02<02:01, 39.4MB/s]\u001b[A\n",
175
- "model-00001-of-00019.safetensors: 2%| | 115M/4.89G [00:02<02:12, 36.1MB/s]\u001b[A\n",
176
- "model-00001-of-00019.safetensors: 3%|▏ | 136M/4.89G [00:03<02:07, 37.3MB/s]\u001b[A\n",
177
- "model-00001-of-00019.safetensors: 3%|▏ | 147M/4.89G [00:03<01:51, 42.7MB/s]\u001b[A\n",
178
- "model-00001-of-00019.safetensors: 3%|▏ | 168M/4.89G [00:03<01:38, 48.1MB/s]\u001b[A\n",
179
- "model-00001-of-00019.safetensors: 4%|▏ | 178M/4.89G [00:04<01:38, 47.9MB/s]\u001b[A\n",
180
- "model-00001-of-00019.safetensors: 4%|▏ | 199M/4.89G [00:04<01:36, 48.5MB/s]\u001b[A\n",
181
- "model-00001-of-00019.safetensors: 4%|▏ | 210M/4.89G [00:04<01:39, 47.1MB/s]\u001b[A\n",
182
- "model-00001-of-00019.safetensors: 5%|▏ | 231M/4.89G [00:05<01:36, 48.3MB/s]\u001b[A\n",
183
- "model-00001-of-00019.safetensors: 5%|▏ | 241M/4.89G [00:05<01:34, 49.2MB/s]\u001b[A\n",
184
- "model-00001-of-00019.safetensors: 5%|▎ | 262M/4.89G [00:05<01:19, 58.1MB/s]\u001b[A^C\n",
185
- "model-00001-of-00019.safetensors: 5%|▎ | 262M/4.89G [00:05<01:41, 45.7MB/s]\n",
186
- "Downloading shards: 0%| | 0/19 [00:05<?, ?it/s]\n",
187
- "Traceback (most recent call last):\n",
188
- " File \"/home/user/miniconda/lib/python3.9/runpy.py\", line 197, in _run_module_as_main\n",
189
- " return _run_code(code, main_globals, None,\n",
190
- " File \"/home/user/miniconda/lib/python3.9/runpy.py\", line 87, in _run_code\n",
191
- " exec(code, run_globals)\n",
192
- " File \"/home/user/miniconda/lib/python3.9/site-packages/lm_eval/__main__.py\", line 461, in <module>\n",
193
- " cli_evaluate()\n",
194
- " File \"/home/user/miniconda/lib/python3.9/site-packages/lm_eval/__main__.py\", line 382, in cli_evaluate\n",
195
- " results = evaluator.simple_evaluate(\n",
196
- " File \"/home/user/miniconda/lib/python3.9/site-packages/lm_eval/utils.py\", line 397, in _wrapper\n",
197
- " return fn(*args, **kwargs)\n",
198
- " File \"/home/user/miniconda/lib/python3.9/site-packages/lm_eval/evaluator.py\", line 204, in simple_evaluate\n",
199
- " lm = lm_eval.api.registry.get_model(model).create_from_arg_string(\n",
200
- " File \"/home/user/miniconda/lib/python3.9/site-packages/lm_eval/api/model.py\", line 147, in create_from_arg_string\n",
201
- " return cls(**args, **args2)\n",
202
- " File \"/home/user/miniconda/lib/python3.9/site-packages/lm_eval/models/huggingface.py\", line 184, in __init__\n",
203
- " self._create_model(\n",
204
- " File \"/home/user/miniconda/lib/python3.9/site-packages/lm_eval/models/huggingface.py\", line 576, in _create_model\n",
205
- " self._model = self.AUTO_MODEL_CLASS.from_pretrained(\n",
206
- " File \"/home/user/miniconda/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py\", line 564, in from_pretrained\n",
207
- " return model_class.from_pretrained(\n",
208
- " File \"/home/user/miniconda/lib/python3.9/site-packages/transformers/modeling_utils.py\", line 3990, in from_pretrained\n",
209
- " resolved_archive_file, sharded_metadata = get_checkpoint_shard_files(\n",
210
- " File \"/home/user/miniconda/lib/python3.9/site-packages/transformers/utils/hub.py\", line 1098, in get_checkpoint_shard_files\n",
211
- " cached_filename = cached_file(\n",
212
- " File \"/home/user/miniconda/lib/python3.9/site-packages/transformers/utils/hub.py\", line 403, in cached_file\n",
213
- " resolved_file = hf_hub_download(\n",
214
- " File \"/home/user/miniconda/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py\", line 114, in _inner_fn\n",
215
- " return fn(*args, **kwargs)\n",
216
- " File \"/home/user/miniconda/lib/python3.9/site-packages/huggingface_hub/file_download.py\", line 862, in hf_hub_download\n",
217
- " return _hf_hub_download_to_cache_dir(\n",
218
- " File \"/home/user/miniconda/lib/python3.9/site-packages/huggingface_hub/file_download.py\", line 1011, in _hf_hub_download_to_cache_dir\n",
219
- " _download_to_tmp_and_move(\n",
220
- " File \"/home/user/miniconda/lib/python3.9/site-packages/huggingface_hub/file_download.py\", line 1545, in _download_to_tmp_and_move\n",
221
- " http_get(\n",
222
- " File \"/home/user/miniconda/lib/python3.9/site-packages/huggingface_hub/file_download.py\", line 454, in http_get\n",
223
- " for chunk in r.iter_content(chunk_size=constants.DOWNLOAD_CHUNK_SIZE):\n",
224
- " File \"/home/user/miniconda/lib/python3.9/site-packages/requests/models.py\", line 820, in generate\n",
225
- " yield from self.raw.stream(chunk_size, decode_content=True)\n",
226
- " File \"/home/user/miniconda/lib/python3.9/site-packages/urllib3/response.py\", line 576, in stream\n",
227
- " data = self.read(amt=amt, decode_content=decode_content)\n",
228
- " File \"/home/user/miniconda/lib/python3.9/site-packages/urllib3/response.py\", line 519, in read\n",
229
- " data = self._fp.read(amt) if not fp_closed else b\"\"\n",
230
- " File \"/home/user/miniconda/lib/python3.9/http/client.py\", line 455, in read\n",
231
- " n = self.readinto(b)\n",
232
- " File \"/home/user/miniconda/lib/python3.9/http/client.py\", line 499, in readinto\n",
233
- " n = self.fp.readinto(b)\n",
234
- " File \"/home/user/miniconda/lib/python3.9/socket.py\", line 704, in readinto\n",
235
- " return self._sock.recv_into(b)\n",
236
- " File \"/home/user/miniconda/lib/python3.9/ssl.py\", line 1241, in recv_into\n",
237
- " return self.read(nbytes, buffer)\n",
238
- " File \"/home/user/miniconda/lib/python3.9/ssl.py\", line 1099, in read\n",
239
- " return self._sslobj.read(len, buffer)\n",
240
- "KeyboardInterrupt\n"
241
- ]
242
- }
243
- ],
244
  "source": [
245
  "!for i in $(echo $TASKS|tr ',' ' '); do accelerate launch -m lm_eval \\\n",
246
  "--model hf --model_args pretrained=mistralai/Mixtral-8x7B-Instruct-v0.1,revision=41bd4c9e7e4fb318ca40e721131d4933966c2cc1,trust_remote_code=False,dtype=bfloat16,parallelize=True \\\n",
 
12
  },
13
  {
14
  "cell_type": "code",
15
+ "execution_count": null,
16
  "id": "106470b4-1be2-4790-a5bf-485a1e3bb2d3",
17
  "metadata": {},
18
+ "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  "source": [
20
  "from datetime import datetime\n",
21
  "import os\n",
 
55
  },
56
  {
57
  "cell_type": "code",
58
+ "execution_count": null,
59
  "id": "4855d529-22d7-4eaf-b6bd-1cc40b0223a6",
60
  "metadata": {},
61
  "outputs": [],
 
116
  },
117
  {
118
  "cell_type": "code",
119
+ "execution_count": null,
120
  "id": "cf3725e2-3a26-49b7-a5ba-71ecb5ba28bc",
121
  "metadata": {},
122
+ "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  "source": [
124
  "!for i in $(echo $TASKS|tr ',' ' '); do accelerate launch -m lm_eval \\\n",
125
  "--model hf --model_args pretrained=mistralai/Mixtral-8x7B-Instruct-v0.1,revision=41bd4c9e7e4fb318ca40e721131d4933966c2cc1,trust_remote_code=False,dtype=bfloat16,parallelize=True \\\n",