MCPcopy Create free account
hub / github.com/OpenBMB/ToolBench / __init__

Method __init__

toolbench/model/compression.py:29–32  ·  view source on GitHub ↗
(self, weight=None, bias=None, device=None)

Source from the content-addressed store, hash-verified

27 """Compressed Linear Layer."""
28
29 def __init__(self, weight=None, bias=None, device=None):
30 super().__init__()
31 self.weight = weight
32 self.bias = bias
33
34 def forward(self, input):
35 return F.linear(input.to(self.weight.dtype), self.weight, self.bias)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected