浏览代码

Materialize buffers in get_block_size() (#600)

Alexander Borzunov 1 年之前
父节点
当前提交
103ef760da
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/petals/server/block_utils.py

+ 1 - 1
src/petals/server/block_utils.py

@@ -32,7 +32,7 @@ def get_block_size(
             dtype is not None and quant_type is not None
         ), 'get_block_size(..., location="memory") requires to specify dtype and quant_type for calculations'
 
-    with init_empty_weights(include_buffers=True):
+    with init_empty_weights(include_buffers=False):
         block = get_model_block(config)
         n_params = sum(param.numel() for param in block.parameters())