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

Method __init__

bitsandbytes/nn/modules.py:853–857  ·  view source on GitHub ↗
(self, num_embeddings, embedding_dim, device=None, dtype=None)

Source from the content-addressed store, hash-verified

851 """
852
853 def __init__(self, num_embeddings, embedding_dim, device=None, dtype=None):
854 super().__init__(num_embeddings, embedding_dim, device=device, dtype=dtype)
855 self.dtype = self.weight.data.dtype
856
857 self.weight = Int8Params(self.weight.data, has_fp16_weights=False, requires_grad=False)
858
859 def _save_to_state_dict(self, destination, prefix, keep_vars):
860 raise NotImplementedError("Saving Embedding8bit module is not implemented")

Callers

nothing calls this directly

Calls 2

Int8ParamsClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected