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

Function _get_4bit_code

bitsandbytes/backends/utils.py:69–75  ·  view source on GitHub ↗
(quant_type: str, device: torch.device)

Source from the content-addressed store, hash-verified

67
68
69def _get_4bit_code(quant_type: str, device: torch.device) -> torch.Tensor:
70 key = (quant_type, device)
71 if key not in _code_4bit_cache:
72 from bitsandbytes.functional import get_4bit_type
73
74 _code_4bit_cache[key] = get_4bit_type(quant_type, device=device)
75 return _code_4bit_cache[key]
76
77
78def get_gaudi_sw_version():

Callers 5

_dequantize_4bit_implFunction · 0.85
_Function · 0.85
_Function · 0.85
_Function · 0.85

Calls 1

get_4bit_typeFunction · 0.90

Tested by

no test coverage detected