MCPcopy Index your code
hub / github.com/OpenDriveLab/ReSim / test_model_inference

Function test_model_inference

SwissArmyTransformer/tests/test_inference.py:7–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5
6
7def test_model_inference():
8 from sat.model import RobertaModel, AutoModel
9 model, args1 = RobertaModel.from_pretrained('roberta-base')
10 x = torch.tensor([[1,2,3]], device='cuda')
11 a = model(input_ids=x, position_ids=x, attention_mask=None)
12
13def test_model_inference_create():
14 from sat.model import RobertaModel, AutoModel

Callers

nothing calls this directly

Calls 1

from_pretrainedMethod · 0.45

Tested by

no test coverage detected