MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / to_tensor

Function to_tensor

deepspeed/runtime/utils.py:1123–1124  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

1121 """
1122
1123 def to_tensor(v):
1124 return get_accelerator().FloatTensor([float(v)]).detach()
1125
1126 group_norms = [non_expert_norm]
1127 for exp_name, tensors in expert_tensors.items():

Callers 1

get_norm_with_moe_layersFunction · 0.85

Calls 2

get_acceleratorFunction · 0.90
FloatTensorMethod · 0.45

Tested by

no test coverage detected