Skip to content

Commit 0ec8979

Browse files
committed
remove additional tiying after rebase
1 parent f2cd562 commit 0ec8979

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/transformers/integrations/accelerate.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,10 +446,6 @@ def _get_device_map(
446446
if max_memory is not None and device_name in max_memory:
447447
inferred_max_memory[device_name] = min(inferred_max_memory[device_name], max_memory[device_name])
448448

449-
# Here we need to retie the weights before the call even if they are all on meta device, otherwise accelerate
450-
# mess up the device_map computation
451-
# TODO Cyril: replace this function to avoid re-tying uselessly (and the function is very inefficient)
452-
model.tie_weights()
453449
device_map = infer_auto_device_map(
454450
model,
455451
max_memory=inferred_max_memory,

0 commit comments

Comments
 (0)