Skip to content

Commit

Permalink
fix benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
SiriusNEO committed Apr 17, 2024
1 parent 0c88d58 commit 680606e
Show file tree
Hide file tree
Showing 74 changed files with 19 additions and 45 deletions.
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ sample_configs/engine/openai*
!sample_configs/engine/openai-example-config.json

# Benchmark workloads
benchmark/workloads/*/*.json
benchmark/workloads/*/*.jsonl
artifact_osdi24/workloads/*/*.json
artifact_osdi24/workloads/*/*.jsonl
*.parquet
# It's safe!
!benchmark/workloads/gpts/*.json
!artifact_osdi24/workloads/gpts/*.json

# Safe to upload
!benchmark/workloads/metagpt/*.json
!benchmark/workloads/metagpt/*.jsonl
!artifact_osdi24/workloads/metagpt/*.json
!artifact_osdi24/workloads/metagpt/*.jsonl

# Evaluation data
!benchmark/*/results/*/*.log
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 7 additions & 5 deletions benchmark/microbench/bench_parrot_builtin_iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ def _init(model):

prompt_len = 3000

fill1 = Fill(pid=0, tid=0, context_id=0, parent_context_id=-1, token_ids=[100])
fill1 = Fill(
session_id=0, task_id=0, context_id=0, parent_context_id=-1, token_ids=[100]
)

fill2 = Fill(
pid=0,
tid=0,
session_id=0,
task_id=0,
context_id=0,
parent_context_id=-1,
token_ids=[100] * prompt_len,
Expand All @@ -36,8 +38,8 @@ def _init(model):
)

gen = Generate(
pid=0,
tid=0,
session_id=0,
task_id=0,
context_id=0,
parent_context_id=-1,
sampling_config=sampling_config,
Expand Down
2 changes: 1 addition & 1 deletion benchmark/microbench/bench_parrot_multi_gpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Please manually do this by:
# bash sample_configs/launch/launch_4_vicuna_7b.sh

import parrot as P
from parrot import P
import asyncio
import time

Expand Down
12 changes: 6 additions & 6 deletions benchmark/microbench/bench_shared_prompt_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ def __init__(
def push(self, prompt_token_ids: list[int], parent_context_id: int, gen_limit: int):
context_idx = self._jobs.index(None)
self._jobs[context_idx] = Fill(
pid=0,
tid=0,
session_id=0,
task_id=0,
context_id=context_idx,
parent_context_id=parent_context_id,
token_ids=prompt_token_ids,
Expand All @@ -150,8 +150,8 @@ def run(self):
else:
if isinstance(job, Fill):
self._jobs[context_idx] = Generate(
pid=0,
tid=0,
session_id=0,
task_id=0,
context_id=job.context_id,
parent_context_id=job.parent_context_id,
sampling_config=self._sampling_config,
Expand Down Expand Up @@ -213,8 +213,8 @@ def profile_bing_chat(

if shared:
shared_fill = Fill(
pid=0,
tid=0,
session_id=0,
task_id=0,
context_id=batch_size,
parent_context_id=-1,
token_ids=prompt_token_ids[0][:shared_ids],
Expand Down
28 changes: 0 additions & 28 deletions benchmark/microbench/bench_single_function.py

This file was deleted.

0 comments on commit 680606e

Please sign in to comment.