MCPcopy
hub / github.com/huggingface/transformers / float

Method float

src/transformers/modeling_utils.py:3741–3749  ·  view source on GitHub ↗
(self, *args)

Source from the content-addressed store, hash-verified

3739 return super().half(*args)
3740
3741 def float(self, *args):
3742 # Checks if the model is quantized
3743 if getattr(self, "is_quantized", False):
3744 raise ValueError(
3745 "`.float()` is not supported for quantized model. Please use the model as it is, since the"
3746 " model has already been casted to the correct `dtype`."
3747 )
3748 else:
3749 return super().float(*args)
3750
3751 @classmethod
3752 def get_init_context(

Callers 15

stepMethod · 0.80
normalizeMethod · 0.80
__call__Method · 0.80
__call__Method · 0.80
__call__Method · 0.80
mask_tokensMethod · 0.80
postprocessMethod · 0.80
postprocessMethod · 0.80

Calls

no outgoing calls