Upload llama4_inference.ipynb
Browse files- llama4_inference.ipynb +385 -22
llama4_inference.ipynb
CHANGED
|
@@ -52,7 +52,7 @@
|
|
| 52 |
"metadata": {},
|
| 53 |
"outputs": [],
|
| 54 |
"source": [
|
| 55 |
-
"quant_path = '/
|
| 56 |
]
|
| 57 |
},
|
| 58 |
{
|
|
@@ -61,24 +61,65 @@
|
|
| 61 |
"id": "c13b72e4-f6cd-4642-a110-040844127541",
|
| 62 |
"metadata": {},
|
| 63 |
"outputs": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
{
|
| 65 |
"name": "stderr",
|
| 66 |
"output_type": "stream",
|
| 67 |
"text": [
|
| 68 |
-
"/workspace/
|
| 69 |
-
" warnings.warn(\"Multimodal input has not been implemented in Llama4AWQForConditionalGeneration yet.\", UserWarning)\n"
|
| 70 |
-
"You have set `use_cache` to `False`, but cache_implementation is set to hybrid. cache_implementation will have no effect.\n"
|
| 71 |
]
|
| 72 |
},
|
| 73 |
{
|
| 74 |
"data": {
|
| 75 |
"application/vnd.jupyter.widget-view+json": {
|
| 76 |
-
"model_id": "
|
| 77 |
"version_major": 2,
|
| 78 |
"version_minor": 0
|
| 79 |
},
|
| 80 |
"text/plain": [
|
| 81 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
]
|
| 83 |
},
|
| 84 |
"metadata": {},
|
|
@@ -87,12 +128,306 @@
|
|
| 87 |
{
|
| 88 |
"data": {
|
| 89 |
"application/vnd.jupyter.widget-view+json": {
|
| 90 |
-
"model_id": "
|
| 91 |
"version_major": 2,
|
| 92 |
"version_minor":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
|
|
|
|
| 106 |
" warnings.warn(\"Skipping fusing modules because AWQ extension is not installed.\" + msg)\n"
|
| 107 |
]
|
| 108 |
},
|
|
@@ -110,8 +467,8 @@
|
|
| 110 |
"name": "stdout",
|
| 111 |
"output_type": "stream",
|
| 112 |
"text": [
|
| 113 |
-
"CPU times: user 1h
|
| 114 |
-
"Wall time:
|
| 115 |
]
|
| 116 |
}
|
| 117 |
],
|
|
@@ -131,7 +488,7 @@
|
|
| 131 |
"name": "stdout",
|
| 132 |
"output_type": "stream",
|
| 133 |
"text": [
|
| 134 |
-
"Sat Apr 19
|
| 135 |
"+-----------------------------------------------------------------------------------------+\n",
|
| 136 |
"| NVIDIA-SMI 565.57.01 Driver Version: 565.57.01 CUDA Version: 12.7 |\n",
|
| 137 |
"|-----------------------------------------+------------------------+----------------------+\n",
|
|
@@ -139,8 +496,8 @@
|
|
| 139 |
"| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |\n",
|
| 140 |
"| | | MIG M. |\n",
|
| 141 |
"|=========================================+========================+======================|\n",
|
| 142 |
-
"| 0 NVIDIA A100-SXM4-80GB On | 00000000:
|
| 143 |
-
"| N/A
|
| 144 |
"| | | Disabled |\n",
|
| 145 |
"+-----------------------------------------+------------------------+----------------------+\n",
|
| 146 |
" \n",
|
|
@@ -200,8 +557,8 @@
|
|
| 200 |
"name": "stdout",
|
| 201 |
"output_type": "stream",
|
| 202 |
"text": [
|
| 203 |
-
"CPU times: user
|
| 204 |
-
"Wall time:
|
| 205 |
]
|
| 206 |
}
|
| 207 |
],
|
|
@@ -237,15 +594,21 @@
|
|
| 237 |
"\n",
|
| 238 |
"where $\\Gamma^i_{jk}$ are the Christoffel symbols of the second kind, which define the connection.\n",
|
| 239 |
"\n",
|
| 240 |
-
"In general relativity, the Levi-Civita connection is a fundamental
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 241 |
"\n",
|
| 242 |
-
"
|
|
|
|
| 243 |
"\n",
|
| 244 |
-
"
|
| 245 |
-
"2. **Riemannian geometry**: The Levi-Civita connection is a fundamental ingredient in Riemannian geometry, which is the mathematical framework for describing curved spacetime in general relativity.\n",
|
| 246 |
-
"3. **Einstein's field equations**: The Einstein field equations, which relate the curvature of spacetime to the distribution of mass and energy, rely on the Levi-Civita connection.\n",
|
| 247 |
"\n",
|
| 248 |
-
"
|
| 249 |
]
|
| 250 |
}
|
| 251 |
],
|
|
|
|
| 52 |
"metadata": {},
|
| 53 |
"outputs": [],
|
| 54 |
"source": [
|
| 55 |
+
"quant_path = 'kishizaki-sci/Llama-4-Scout-17B-16E-Instruct-AWQ'"
|
| 56 |
]
|
| 57 |
},
|
| 58 |
{
|
|
|
|
| 61 |
"id": "c13b72e4-f6cd-4642-a110-040844127541",
|
| 62 |
"metadata": {},
|
| 63 |
"outputs": [
|
| 64 |
+
{
|
| 65 |
+
"data": {
|
| 66 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 67 |
+
"model_id": "4f6c7b795fb24940b752dded2f51dea0",
|
| 68 |
+
"version_major": 2,
|
| 69 |
+
"version_minor": 0
|
| 70 |
+
},
|
| 71 |
+
"text/plain": [
|
| 72 |
+
"config.json: 0%| | 0.00/3.55k [00:00<?, ?B/s]"
|
| 73 |
+
]
|
| 74 |
+
},
|
| 75 |
+
"metadata": {},
|
| 76 |
+
"output_type": "display_data"
|
| 77 |
+
},
|
| 78 |
{
|
| 79 |
"name": "stderr",
|
| 80 |
"output_type": "stream",
|
| 81 |
"text": [
|
| 82 |
+
"/workspace/AutoAWQ/awq/models/llama4.py:312: UserWarning: Multimodal input has not been implemented in Llama4AWQForConditionalGeneration yet.\n",
|
| 83 |
+
" warnings.warn(\"Multimodal input has not been implemented in Llama4AWQForConditionalGeneration yet.\", UserWarning)\n"
|
|
|
|
| 84 |
]
|
| 85 |
},
|
| 86 |
{
|
| 87 |
"data": {
|
| 88 |
"application/vnd.jupyter.widget-view+json": {
|
| 89 |
+
"model_id": "02743a30540244bbb4c05585becc4cc8",
|
| 90 |
"version_major": 2,
|
| 91 |
"version_minor": 0
|
| 92 |
},
|
| 93 |
"text/plain": [
|
| 94 |
+
"Fetching 25 files: 0%| | 0/25 [00:00<?, ?it/s]"
|
| 95 |
+
]
|
| 96 |
+
},
|
| 97 |
+
"metadata": {},
|
| 98 |
+
"output_type": "display_data"
|
| 99 |
+
},
|
| 100 |
+
{
|
| 101 |
+
"data": {
|
| 102 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 103 |
+
"model_id": "3200dd87c1df4ad2a0d1ce0a300f094c",
|
| 104 |
+
"version_major": 2,
|
| 105 |
+
"version_minor": 0
|
| 106 |
+
},
|
| 107 |
+
"text/plain": [
|
| 108 |
+
"llama4_inference.ipynb: 0%| | 0.00/10.5k [00:00<?, ?B/s]"
|
| 109 |
+
]
|
| 110 |
+
},
|
| 111 |
+
"metadata": {},
|
| 112 |
+
"output_type": "display_data"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"data": {
|
| 116 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 117 |
+
"model_id": "b132c3a11c024af78dd8fd4d30b579cc",
|
| 118 |
+
"version_major": 2,
|
| 119 |
+
"version_minor": 0
|
| 120 |
+
},
|
| 121 |
+
"text/plain": [
|
| 122 |
+
"generation_config.json: 0%| | 0.00/239 [00:00<?, ?B/s]"
|
| 123 |
]
|
| 124 |
},
|
| 125 |
"metadata": {},
|
|
|
|
| 128 |
{
|
| 129 |
"data": {
|
| 130 |
"application/vnd.jupyter.widget-view+json": {
|
| 131 |
+
"model_id": "1f505cb27bc04c92b48ca9e27202cb4b",
|
| 132 |
"version_major": 2,
|
| 133 |
"version_minor": 0
|
| 134 |
},
|
| 135 |
"text/plain": [
|
| 136 |
+
".gitattributes: 0%| | 0.00/1.57k [00:00<?, ?B/s]"
|
| 137 |
+
]
|
| 138 |
+
},
|
| 139 |
+
"metadata": {},
|
| 140 |
+
"output_type": "display_data"
|
| 141 |
+
},
|
| 142 |
+
{
|
| 143 |
+
"data": {
|
| 144 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 145 |
+
"model_id": "43b1b86a0c304e56b1870d08598b374f",
|
| 146 |
+
"version_major": 2,
|
| 147 |
+
"version_minor": 0
|
| 148 |
+
},
|
| 149 |
+
"text/plain": [
|
| 150 |
+
"model-00002-of-00013.safetensors: 0%| | 0.00/4.98G [00:00<?, ?B/s]"
|
| 151 |
+
]
|
| 152 |
+
},
|
| 153 |
+
"metadata": {},
|
| 154 |
+
"output_type": "display_data"
|
| 155 |
+
},
|
| 156 |
+
{
|
| 157 |
+
"data": {
|
| 158 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 159 |
+
"model_id": "7babbb9a6b154f509c88a56b4fee3d0e",
|
| 160 |
+
"version_major": 2,
|
| 161 |
+
"version_minor": 0
|
| 162 |
+
},
|
| 163 |
+
"text/plain": [
|
| 164 |
+
"README.md: 0%| | 0.00/138 [00:00<?, ?B/s]"
|
| 165 |
+
]
|
| 166 |
+
},
|
| 167 |
+
"metadata": {},
|
| 168 |
+
"output_type": "display_data"
|
| 169 |
+
},
|
| 170 |
+
{
|
| 171 |
+
"data": {
|
| 172 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 173 |
+
"model_id": "405cd2691a844317b6570eb80c622d24",
|
| 174 |
+
"version_major": 2,
|
| 175 |
+
"version_minor": 0
|
| 176 |
+
},
|
| 177 |
+
"text/plain": [
|
| 178 |
+
"model-00001-of-00013.safetensors: 0%| | 0.00/5.00G [00:00<?, ?B/s]"
|
| 179 |
+
]
|
| 180 |
+
},
|
| 181 |
+
"metadata": {},
|
| 182 |
+
"output_type": "display_data"
|
| 183 |
+
},
|
| 184 |
+
{
|
| 185 |
+
"data": {
|
| 186 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 187 |
+
"model_id": "e979f0b6efbe40baa318dccb57bffe24",
|
| 188 |
+
"version_major": 2,
|
| 189 |
+
"version_minor": 0
|
| 190 |
+
},
|
| 191 |
+
"text/plain": [
|
| 192 |
+
"model-00004-of-00013.safetensors: 0%| | 0.00/5.00G [00:00<?, ?B/s]"
|
| 193 |
+
]
|
| 194 |
+
},
|
| 195 |
+
"metadata": {},
|
| 196 |
+
"output_type": "display_data"
|
| 197 |
+
},
|
| 198 |
+
{
|
| 199 |
+
"data": {
|
| 200 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 201 |
+
"model_id": "efccd71f8aa2492bad03ebadbbef596d",
|
| 202 |
+
"version_major": 2,
|
| 203 |
+
"version_minor": 0
|
| 204 |
+
},
|
| 205 |
+
"text/plain": [
|
| 206 |
+
"model-00005-of-00013.safetensors: 0%| | 0.00/5.00G [00:00<?, ?B/s]"
|
| 207 |
+
]
|
| 208 |
+
},
|
| 209 |
+
"metadata": {},
|
| 210 |
+
"output_type": "display_data"
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"data": {
|
| 214 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 215 |
+
"model_id": "a3028a64430744beb181ace86753bee6",
|
| 216 |
+
"version_major": 2,
|
| 217 |
+
"version_minor": 0
|
| 218 |
+
},
|
| 219 |
+
"text/plain": [
|
| 220 |
+
"chat_template.json: 0%| | 0.00/5.18k [00:00<?, ?B/s]"
|
| 221 |
+
]
|
| 222 |
+
},
|
| 223 |
+
"metadata": {},
|
| 224 |
+
"output_type": "display_data"
|
| 225 |
+
},
|
| 226 |
+
{
|
| 227 |
+
"data": {
|
| 228 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 229 |
+
"model_id": "448ff54d8a6642e685474d3bc49de09b",
|
| 230 |
+
"version_major": 2,
|
| 231 |
+
"version_minor": 0
|
| 232 |
+
},
|
| 233 |
+
"text/plain": [
|
| 234 |
+
"model-00003-of-00013.safetensors: 0%| | 0.00/5.00G [00:00<?, ?B/s]"
|
| 235 |
+
]
|
| 236 |
+
},
|
| 237 |
+
"metadata": {},
|
| 238 |
+
"output_type": "display_data"
|
| 239 |
+
},
|
| 240 |
+
{
|
| 241 |
+
"data": {
|
| 242 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 243 |
+
"model_id": "63cb05c948ef476c98df712735133fa7",
|
| 244 |
+
"version_major": 2,
|
| 245 |
+
"version_minor": 0
|
| 246 |
+
},
|
| 247 |
+
"text/plain": [
|
| 248 |
+
"model-00006-of-00013.safetensors: 0%| | 0.00/4.98G [00:00<?, ?B/s]"
|
| 249 |
+
]
|
| 250 |
+
},
|
| 251 |
+
"metadata": {},
|
| 252 |
+
"output_type": "display_data"
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
"data": {
|
| 256 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 257 |
+
"model_id": "1afb22e38b7c46c0ab496bd67c949402",
|
| 258 |
+
"version_major": 2,
|
| 259 |
+
"version_minor": 0
|
| 260 |
+
},
|
| 261 |
+
"text/plain": [
|
| 262 |
+
"model-00007-of-00013.safetensors: 0%| | 0.00/5.00G [00:00<?, ?B/s]"
|
| 263 |
+
]
|
| 264 |
+
},
|
| 265 |
+
"metadata": {},
|
| 266 |
+
"output_type": "display_data"
|
| 267 |
+
},
|
| 268 |
+
{
|
| 269 |
+
"data": {
|
| 270 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 271 |
+
"model_id": "ded5ae0f710a4124b00cb0b061383962",
|
| 272 |
+
"version_major": 2,
|
| 273 |
+
"version_minor": 0
|
| 274 |
+
},
|
| 275 |
+
"text/plain": [
|
| 276 |
+
"model-00008-of-00013.safetensors: 0%| | 0.00/5.00G [00:00<?, ?B/s]"
|
| 277 |
+
]
|
| 278 |
+
},
|
| 279 |
+
"metadata": {},
|
| 280 |
+
"output_type": "display_data"
|
| 281 |
+
},
|
| 282 |
+
{
|
| 283 |
+
"data": {
|
| 284 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 285 |
+
"model_id": "0db9d375464c415ebb33fc0b268a9950",
|
| 286 |
+
"version_major": 2,
|
| 287 |
+
"version_minor": 0
|
| 288 |
+
},
|
| 289 |
+
"text/plain": [
|
| 290 |
+
"model-00009-of-00013.safetensors: 0%| | 0.00/5.00G [00:00<?, ?B/s]"
|
| 291 |
+
]
|
| 292 |
+
},
|
| 293 |
+
"metadata": {},
|
| 294 |
+
"output_type": "display_data"
|
| 295 |
+
},
|
| 296 |
+
{
|
| 297 |
+
"data": {
|
| 298 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 299 |
+
"model_id": "e49ff7276a7b493cb5ab7dc222e9d3ec",
|
| 300 |
+
"version_major": 2,
|
| 301 |
+
"version_minor": 0
|
| 302 |
+
},
|
| 303 |
+
"text/plain": [
|
| 304 |
+
"model-00010-of-00013.safetensors: 0%| | 0.00/5.00G [00:00<?, ?B/s]"
|
| 305 |
+
]
|
| 306 |
+
},
|
| 307 |
+
"metadata": {},
|
| 308 |
+
"output_type": "display_data"
|
| 309 |
+
},
|
| 310 |
+
{
|
| 311 |
+
"data": {
|
| 312 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 313 |
+
"model_id": "cbb0557242c546708bfb5ba4c7789499",
|
| 314 |
+
"version_major": 2,
|
| 315 |
+
"version_minor": 0
|
| 316 |
+
},
|
| 317 |
+
"text/plain": [
|
| 318 |
+
"model-00011-of-00013.safetensors: 0%| | 0.00/4.98G [00:00<?, ?B/s]"
|
| 319 |
+
]
|
| 320 |
+
},
|
| 321 |
+
"metadata": {},
|
| 322 |
+
"output_type": "display_data"
|
| 323 |
+
},
|
| 324 |
+
{
|
| 325 |
+
"data": {
|
| 326 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 327 |
+
"model_id": "2c603da8fcc34e0584963099695e7142",
|
| 328 |
+
"version_major": 2,
|
| 329 |
+
"version_minor": 0
|
| 330 |
+
},
|
| 331 |
+
"text/plain": [
|
| 332 |
+
"model-00012-of-00013.safetensors: 0%| | 0.00/5.00G [00:00<?, ?B/s]"
|
| 333 |
+
]
|
| 334 |
+
},
|
| 335 |
+
"metadata": {},
|
| 336 |
+
"output_type": "display_data"
|
| 337 |
+
},
|
| 338 |
+
{
|
| 339 |
+
"data": {
|
| 340 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 341 |
+
"model_id": "645fee17e47d44e1b7fb51865a00fc73",
|
| 342 |
+
"version_major": 2,
|
| 343 |
+
"version_minor": 0
|
| 344 |
+
},
|
| 345 |
+
"text/plain": [
|
| 346 |
+
"model-00013-of-00013.safetensors: 0%| | 0.00/2.79G [00:00<?, ?B/s]"
|
| 347 |
+
]
|
| 348 |
+
},
|
| 349 |
+
"metadata": {},
|
| 350 |
+
"output_type": "display_data"
|
| 351 |
+
},
|
| 352 |
+
{
|
| 353 |
+
"data": {
|
| 354 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 355 |
+
"model_id": "a022c5cb1f174ac5bd9fad91cda9352a",
|
| 356 |
+
"version_major": 2,
|
| 357 |
+
"version_minor": 0
|
| 358 |
+
},
|
| 359 |
+
"text/plain": [
|
| 360 |
+
"model.safetensors.index.json: 0%| | 0.00/1.13M [00:00<?, ?B/s]"
|
| 361 |
+
]
|
| 362 |
+
},
|
| 363 |
+
"metadata": {},
|
| 364 |
+
"output_type": "display_data"
|
| 365 |
+
},
|
| 366 |
+
{
|
| 367 |
+
"data": {
|
| 368 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 369 |
+
"model_id": "f68405f7857d4db1b40b264f25175f43",
|
| 370 |
+
"version_major": 2,
|
| 371 |
+
"version_minor": 0
|
| 372 |
+
},
|
| 373 |
+
"text/plain": [
|
| 374 |
+
"preprocessor_config.json: 0%| | 0.00/636 [00:00<?, ?B/s]"
|
| 375 |
+
]
|
| 376 |
+
},
|
| 377 |
+
"metadata": {},
|
| 378 |
+
"output_type": "display_data"
|
| 379 |
+
},
|
| 380 |
+
{
|
| 381 |
+
"data": {
|
| 382 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 383 |
+
"model_id": "81bc3a84390f4c388f1012044d4ce6ec",
|
| 384 |
+
"version_major": 2,
|
| 385 |
+
"version_minor": 0
|
| 386 |
+
},
|
| 387 |
+
"text/plain": [
|
| 388 |
+
"processor_config.json: 0%| | 0.00/128 [00:00<?, ?B/s]"
|
| 389 |
+
]
|
| 390 |
+
},
|
| 391 |
+
"metadata": {},
|
| 392 |
+
"output_type": "display_data"
|
| 393 |
+
},
|
| 394 |
+
{
|
| 395 |
+
"data": {
|
| 396 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 397 |
+
"model_id": "842746981e6e478aae858d3daf844460",
|
| 398 |
+
"version_major": 2,
|
| 399 |
+
"version_minor": 0
|
| 400 |
+
},
|
| 401 |
+
"text/plain": [
|
| 402 |
+
"special_tokens_map.json: 0%| | 0.00/448 [00:00<?, ?B/s]"
|
| 403 |
+
]
|
| 404 |
+
},
|
| 405 |
+
"metadata": {},
|
| 406 |
+
"output_type": "display_data"
|
| 407 |
+
},
|
| 408 |
+
{
|
| 409 |
+
"data": {
|
| 410 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 411 |
+
"model_id": "067b4e51f41840cdb7305972f1aa0dc6",
|
| 412 |
+
"version_major": 2,
|
| 413 |
+
"version_minor": 0
|
| 414 |
+
},
|
| 415 |
+
"text/plain": [
|
| 416 |
+
"tokenizer.json: 0%| | 0.00/27.9M [00:00<?, ?B/s]"
|
| 417 |
+
]
|
| 418 |
+
},
|
| 419 |
+
"metadata": {},
|
| 420 |
+
"output_type": "display_data"
|
| 421 |
+
},
|
| 422 |
+
{
|
| 423 |
+
"data": {
|
| 424 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 425 |
+
"model_id": "5ceb2f619f9f4513bc307c5846fae2e5",
|
| 426 |
+
"version_major": 2,
|
| 427 |
+
"version_minor": 0
|
| 428 |
+
},
|
| 429 |
+
"text/plain": [
|
| 430 |
+
"tokenizer_config.json: 0%| | 0.00/237k [00:00<?, ?B/s]"
|
| 431 |
]
|
| 432 |
},
|
| 433 |
"metadata": {},
|
|
|
|
| 437 |
"name": "stderr",
|
| 438 |
"output_type": "stream",
|
| 439 |
"text": [
|
| 440 |
+
"You have set `use_cache` to `False`, but cache_implementation is set to hybrid. cache_implementation will have no effect.\n"
|
| 441 |
+
]
|
| 442 |
+
},
|
| 443 |
+
{
|
| 444 |
+
"data": {
|
| 445 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 446 |
+
"model_id": "db4fddb7315c464ea87c8ad507f9a651",
|
| 447 |
+
"version_major": 2,
|
| 448 |
+
"version_minor": 0
|
| 449 |
+
},
|
| 450 |
+
"text/plain": [
|
| 451 |
+
"Replacing MoE Block...: 0%| | 0/48 [00:00<?, ?it/s]"
|
| 452 |
+
]
|
| 453 |
+
},
|
| 454 |
+
"metadata": {},
|
| 455 |
+
"output_type": "display_data"
|
| 456 |
+
},
|
| 457 |
+
{
|
| 458 |
+
"name": "stderr",
|
| 459 |
+
"output_type": "stream",
|
| 460 |
+
"text": [
|
| 461 |
+
"Replacing layers...: 100%|ββββββββββ| 48/48 [00:07<00:00, 6.18it/s]\n",
|
| 462 |
+
"/workspace/AutoAWQ/awq/models/base.py:539: UserWarning: Skipping fusing modules because AWQ extension is not installed.No module named 'awq_ext'\n",
|
| 463 |
" warnings.warn(\"Skipping fusing modules because AWQ extension is not installed.\" + msg)\n"
|
| 464 |
]
|
| 465 |
},
|
|
|
|
| 467 |
"name": "stdout",
|
| 468 |
"output_type": "stream",
|
| 469 |
"text": [
|
| 470 |
+
"CPU times: user 1h 44min 26s, sys: 26min 26s, total: 2h 10min 53s\n",
|
| 471 |
+
"Wall time: 28min 55s\n"
|
| 472 |
]
|
| 473 |
}
|
| 474 |
],
|
|
|
|
| 488 |
"name": "stdout",
|
| 489 |
"output_type": "stream",
|
| 490 |
"text": [
|
| 491 |
+
"Sat Apr 19 22:53:42 2025 \n",
|
| 492 |
"+-----------------------------------------------------------------------------------------+\n",
|
| 493 |
"| NVIDIA-SMI 565.57.01 Driver Version: 565.57.01 CUDA Version: 12.7 |\n",
|
| 494 |
"|-----------------------------------------+------------------------+----------------------+\n",
|
|
|
|
| 496 |
"| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |\n",
|
| 497 |
"| | | MIG M. |\n",
|
| 498 |
"|=========================================+========================+======================|\n",
|
| 499 |
+
"| 0 NVIDIA A100-SXM4-80GB On | 00000000:87:00.0 Off | 0 |\n",
|
| 500 |
+
"| N/A 30C P0 71W / 400W | 60415MiB / 81920MiB | 0% Default |\n",
|
| 501 |
"| | | Disabled |\n",
|
| 502 |
"+-----------------------------------------+------------------------+----------------------+\n",
|
| 503 |
" \n",
|
|
|
|
| 557 |
"name": "stdout",
|
| 558 |
"output_type": "stream",
|
| 559 |
"text": [
|
| 560 |
+
"CPU times: user 4min 28s, sys: 3min 39s, total: 8min 7s\n",
|
| 561 |
+
"Wall time: 8min 8s\n"
|
| 562 |
]
|
| 563 |
}
|
| 564 |
],
|
|
|
|
| 594 |
"\n",
|
| 595 |
"where $\\Gamma^i_{jk}$ are the Christoffel symbols of the second kind, which define the connection.\n",
|
| 596 |
"\n",
|
| 597 |
+
"In general relativity, the Levi-Civita connection is a fundamental example of a torsion-free connection. It's the unique connection that is:\n",
|
| 598 |
+
"\n",
|
| 599 |
+
"1. **Metric-compatible**: it preserves the metric tensor under parallel transport.\n",
|
| 600 |
+
"2. **Torsion-free**: it has zero torsion.\n",
|
| 601 |
+
"\n",
|
| 602 |
+
"The Levi-Civita connection is used to define the covariant derivative, which is essential for describing the curvature of spacetime.\n",
|
| 603 |
+
"\n",
|
| 604 |
+
"The assumption of a torsion-free connection is crucial in general relativity, as it allows us to:\n",
|
| 605 |
"\n",
|
| 606 |
+
"1. **Define a unique covariant derivative**: which is necessary for formulating the Einstein field equations.\n",
|
| 607 |
+
"2. **Ensure geodesic equation**: which describes the shortest path in curved spacetime, is well-defined.\n",
|
| 608 |
"\n",
|
| 609 |
+
"However, it's worth noting that there are some alternative theories, such as Einstein-Cartan theory, which consider torsion as a fundamental aspect of spacetime geometry.\n",
|
|
|
|
|
|
|
| 610 |
"\n",
|
| 611 |
+
"I hope this explanation helps! Do you have any follow-up questions?<|eot|>\n"
|
| 612 |
]
|
| 613 |
}
|
| 614 |
],
|