Skip to content

Commit 071e2d5

Browse files
committed
hf: show example of passing config to model
1 parent aba54e9 commit 071e2d5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fundamentals/huggingface/test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
low_cpu_mem_usage=False,
1313
device_map=None,
1414
dtype=torch.float32,
15+
config=config,
1516
)
1617
bad = [n for n,p in model.named_parameters() if p.device.type == "meta"]
1718
bad += [f"(buffer) {n}" for n,b in model.named_buffers() if b.device.type == "meta"]

0 commit comments

Comments
 (0)