You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
484 B
Python
16 lines
484 B
Python
import pytest
|
|
import torch
|
|
from test_utils import MODEL_NAME
|
|
|
|
from petals.client import DistributedBloomConfig
|
|
from petals.server.throughput import measure_compute_rps
|
|
|
|
|
|
@pytest.mark.forked
|
|
def test_throughput_basic():
|
|
config = DistributedBloomConfig.from_pretrained(MODEL_NAME)
|
|
throughput = measure_compute_rps(
|
|
config, device=torch.device("cpu"), dtype=torch.bfloat16, load_in_8bit=False, n_steps=10
|
|
)
|
|
assert isinstance(throughput, float) and throughput > 0
|