Commit 9c5a2a8
Replace `torch_dtype=dtype` with `dtype=dtype` in all internal calls to
HuggingFace's `from_pretrained()` methods in loading_from_pretrained.py.
The `torch_dtype` parameter is deprecated in recent versions of the
transformers library in favor of `dtype`.
The backwards-compatible acceptance of `torch_dtype` from users (lines
2389-2391) is preserved so existing user code continues to work.
Fixes #1093
Co-authored-by: Zachary Goldfine <zacharygoldfine@Zacharys-Air.attlocal.net>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d1dc12d commit 9c5a2a8
1 file changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2439 | 2439 | | |
2440 | 2440 | | |
2441 | 2441 | | |
2442 | | - | |
| 2442 | + | |
2443 | 2443 | | |
2444 | 2444 | | |
2445 | 2445 | | |
2446 | 2446 | | |
2447 | 2447 | | |
2448 | 2448 | | |
2449 | 2449 | | |
2450 | | - | |
| 2450 | + | |
2451 | 2451 | | |
2452 | 2452 | | |
2453 | 2453 | | |
| |||
2460 | 2460 | | |
2461 | 2461 | | |
2462 | 2462 | | |
2463 | | - | |
| 2463 | + | |
2464 | 2464 | | |
2465 | 2465 | | |
2466 | 2466 | | |
2467 | 2467 | | |
2468 | 2468 | | |
2469 | 2469 | | |
2470 | | - | |
| 2470 | + | |
2471 | 2471 | | |
2472 | 2472 | | |
2473 | 2473 | | |
2474 | 2474 | | |
2475 | 2475 | | |
2476 | 2476 | | |
2477 | | - | |
| 2477 | + | |
2478 | 2478 | | |
2479 | 2479 | | |
2480 | 2480 | | |
2481 | 2481 | | |
2482 | 2482 | | |
2483 | 2483 | | |
2484 | | - | |
| 2484 | + | |
2485 | 2485 | | |
2486 | 2486 | | |
2487 | 2487 | | |
| |||
2491 | 2491 | | |
2492 | 2492 | | |
2493 | 2493 | | |
2494 | | - | |
| 2494 | + | |
2495 | 2495 | | |
2496 | 2496 | | |
2497 | 2497 | | |
2498 | 2498 | | |
2499 | 2499 | | |
2500 | 2500 | | |
2501 | | - | |
| 2501 | + | |
2502 | 2502 | | |
2503 | 2503 | | |
2504 | 2504 | | |
| |||
0 commit comments