MCPcopy Create free account
hub / github.com/InternRobotics/G2VLM / forward

Method forward

modeling/pi3/models/layers/block.py:249–257  ·  view source on GitHub ↗
(self, x_or_x_list)

Source from the content-addressed store, hash-verified

247 return attn_bias.split(x)
248
249 def forward(self, x_or_x_list):
250 if isinstance(x_or_x_list, Tensor):
251 return super().forward(x_or_x_list)
252 elif isinstance(x_or_x_list, list):
253 if not XFORMERS_AVAILABLE:
254 raise AssertionError("xFormers is required for using nested tensors")
255 return self.forward_nested(x_or_x_list)
256 else:
257 raise AssertionError
258
259class BlockRope(nn.Module):
260 def __init__(

Callers

nothing calls this directly

Calls 2

forward_nestedMethod · 0.95
forwardMethod · 0.45

Tested by

no test coverage detected