Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/zai-org/CodeGeeX
/ zero
Method
zero
codegeex/megatron/model/distributed.py:37–39 ·
view source on GitHub ↗
Reset the buffer to zero.
(self)
Source
from the content-addressed store, hash-verified
35
)
36
37
def
zero(self):
38
""
"Reset the buffer to zero."
""
39
self.data.zero_()
40
41
def
get(self, shape, start_index):
42
""
"Return a tensor
with
the input `shape`
as
a view into the
Callers
1
zero_grad_buffer
Method · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected