From fde9d50850599bad841fba83ea9d91384344864b Mon Sep 17 00:00:00 2001 From: justheuristic Date: Sun, 12 Jun 2022 05:00:01 +0300 Subject: [PATCH] remove slow_but_exact, add quantization --- src/model.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/model.py b/src/model.py index 3775be1..4734109 100644 --- a/src/model.py +++ b/src/model.py @@ -21,12 +21,11 @@ logger = logging.get_logger(__name__) _CHECKPOINT_FOR_DOC = "bigscience/Bloom" _CONFIG_FOR_DOC = "MemoryEfficientBloomConfig" _TOKENIZER_FOR_DOC = "BloomTokenizer" -_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED' class MemoryEfficientBloomConfig(_VanillaBloomConfig): compression: str = 'none' - slow_but_exact = _NOT_IMPLEMENTED + slow_but_exact: bool = False class BloomPreTrainedModel(PreTrainedModel): @@ -144,7 +143,7 @@ BLOOM_INPUTS_DOCSTRING = r""" class BloomModel(BloomPreTrainedModel): def __init__(self, config): super().__init__(config) - assert config.slow_but_exact == _NOT_IMPLEMENTED, "slow_but_exact mode was removed for code simplicity" + assert not config.slow_but_exact, "slow_but_exact mode was removed for code simplicity" self.embed_dim = config.hidden_size self.n_head = config.n_head