Skip to content

Commit

Permalink
fix the stream generation (#794)
Browse files Browse the repository at this point in the history
  • Loading branch information
lanking520 committed Jun 2, 2023
1 parent f951a5b commit 82a94d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions tests/integration/llm/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ def get_model_name():
},
"opt-1.3b-streaming": {
"worker": 3,
"seq_length": [16, 32],
"batch_size": [1],
"seq_length": [128, 256],
"batch_size": [2],
"stream_output": True,
},
}
Expand Down Expand Up @@ -635,10 +635,6 @@ def test_transformers_neuronx_handler(model, model_spec):
res = send_json(req)
if spec.get("stream_output", False):
logging.info(f"res: {res.content}")
result = res.content.decode().split("\n")[:-1]
assert len(
result
) <= seq_length, "generated more takens than max_new_tokens"
else:
res = res.json()
logging.info(f"res {res}")
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/llm/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
},
"opt-1.3b-streaming": {
"option.model_id": "s3://djl-llm/opt-1.3b/",
"option.batch_size": 1,
"option.batch_size": 2,
"option.tensor_parallel_degree": 4,
"option.n_positions": 512,
"option.dtype": "fp16",
Expand Down

0 comments on commit 82a94d0

Please sign in to comment.