MCPcopy Create free account
hub / github.com/THUDM/GLM / forward

Method forward

fp16/fp16.py:72–73  ·  view source on GitHub ↗
(self, *inputs, **kwargs)

Source from the content-addressed store, hash-verified

70 self.add_module('module', module.half())
71
72 def forward(self, *inputs, **kwargs):
73 return fp16_to_fp32(self.module(*(fp32_to_fp16(inputs)), **kwargs))
74
75 def named_parameters(self, prefix: str = '', recurse: bool = True):
76 return self.module.named_parameters(prefix=prefix, recurse=recurse)

Callers

nothing calls this directly

Calls 2

fp16_to_fp32Function · 0.85
fp32_to_fp16Function · 0.85

Tested by

no test coverage detected