MCPcopy Create free account
hub / github.com/bitsandbytes-foundation/bitsandbytes / __init__

Method __init__

tests/test_modules.py:26–39  ·  view source on GitHub ↗
(self, dim1, dim2, has_fp16_weights=True, threshold=0.0)

Source from the content-addressed store, hash-verified

24
25class MLP8bit(torch.nn.Module):
26 def __init__(self, dim1, dim2, has_fp16_weights=True, threshold=0.0):
27 super().__init__()
28 self.fc1 = bnb.nn.Linear8bitLt(
29 dim1,
30 dim2,
31 has_fp16_weights=has_fp16_weights,
32 threshold=threshold,
33 )
34 self.fc2 = bnb.nn.Linear8bitLt(
35 dim2,
36 dim1,
37 has_fp16_weights=has_fp16_weights,
38 threshold=threshold,
39 )
40
41 def forward(self, x):
42 x = self.fc1(x)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected