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

Function get_4bit_config

tests/test_generation.py:12–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10
11
12def get_4bit_config():
13 return transformers.BitsAndBytesConfig(
14 load_in_4bit=True,
15 load_in_8bit=False,
16 llm_int8_threshold=6.0,
17 llm_int8_has_fp16_weight=False,
18 bnb_4bit_compute_dtype=torch.float16,
19 bnb_4bit_use_double_quant=True,
20 bnb_4bit_quant_type="nf4",
21 )
22
23
24def get_model_and_tokenizer(config):

Callers 1

get_model_and_tokenizerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected