Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add data collection and some inf2 bug fixes #1047

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add data collection
  • Loading branch information
Qing Lan committed Aug 31, 2023
commit c33e99333835bc42bc8b8d87e65659a9a366a0cd
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,21 @@ def print_rank0(content):
if rank == 0:
print(content)

data_collector = []
def collect_data(result):
done_requests = []
for idx, item in enumerate(result):
if len(data_collector) <= idx:
data_collector[idx] = item["data"]["generated_text"]
else:
data_collector[idx] += item["data"]["generated_text"]
if item['data']['last']:
done_requests.append(data_collector[idx])
for value in done_requests:
print_rank0(f"\nFinish one request: {value}\n")
data_collector.remove(value)



if __name__ == "__main__":
parser = argparse.ArgumentParser()
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 @@ -338,7 +338,7 @@
"option.tensor_parallel_degree": 4,
"option.n_positions": 512,
"option.dtype": "fp16",
"option.model_loading_timeout": 900
"option.model_loading_timeout": 1200
},
"bloom-7b1": {
"option.model_id": "s3://djl-llm/bloom-7b1/",
Expand Down