Skip to content

Commit 240767c

Browse files
committed
remove additional tiying after rebase
1 parent cb1d7c7 commit 240767c

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
@@ -409,10 +409,6 @@ def _get_device_map(
409409
if max_memory is not None and device_name in max_memory:
410410
inferred_max_memory[device_name] = min(inferred_max_memory[device_name], max_memory[device_name])
411411

412-
# Here we need to retie the weights before the call even if they are all on meta device, otherwise accelerate
413-
# mess up the device_map computation
414-
# TODO Cyril: replace this function to avoid re-tying uselessly (and the function is very inefficient)
415-
model.tie_weights()
416412
device_map = infer_auto_device_map(
417413
model,
418414
max_memory=inferred_max_memory,

0 commit comments

Comments
 (0)