Skip to content

Commit

Permalink
feat(server): support RefinedWeb models (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierDehaene authored May 30, 2023
1 parent bf7f1d5 commit b8b950b
Show file tree
Hide file tree
Showing 12 changed files with 3,236 additions and 27 deletions.
16 changes: 14 additions & 2 deletions integration-tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ def event_loop():
def launcher(event_loop):
@contextlib.contextmanager
def local_launcher(
model_id: str, num_shard: Optional[int] = None, quantize: Optional[str] = None
model_id: str,
num_shard: Optional[int] = None,
quantize: Optional[str] = None,
trust_remote_code: bool = False,
):
port = random.randint(8000, 10_000)
master_port = random.randint(10_000, 20_000)
Expand All @@ -230,6 +233,9 @@ def local_launcher(
args.extend(["--num-shard", str(num_shard)])
if quantize:
args.append("--quantize")
args.append("bitsandbytes")
if trust_remote_code:
args.append("--trust-remote-code")

env = os.environ
env["LOG_LEVEL"] = "info,text_generation_router=debug"
Expand All @@ -250,7 +256,10 @@ def local_launcher(

@contextlib.contextmanager
def docker_launcher(
model_id: str, num_shard: Optional[int] = None, quantize: Optional[str] = None
model_id: str,
num_shard: Optional[int] = None,
quantize: Optional[str] = None,
trust_remote_code: bool = False,
):
port = random.randint(8000, 10_000)

Expand All @@ -260,6 +269,9 @@ def docker_launcher(
args.extend(["--num-shard", str(num_shard)])
if quantize:
args.append("--quantize")
args.append("bitsandbytes")
if trust_remote_code:
args.append("--trust-remote-code")

client = docker.from_env()

Expand Down
Loading

0 comments on commit b8b950b

Please sign in to comment.