Update benchmark scripts (#8)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
## Run benchmark
|
||||
|
||||
NOTE: This is an implementation for replaying a given trace for throughput/latency benchmark purposes. It is not an actual ReAct agent implementation.
|
||||
|
||||
### Benchmark sglang
|
||||
```
|
||||
python -m sglang.launch_server --model-path meta-llama/Llama-2-7b-chat-hf --port 30000
|
||||
|
||||
@@ -124,6 +124,9 @@ def main(args):
|
||||
))
|
||||
return out["result"]
|
||||
|
||||
# warmup
|
||||
call_generate("Hello,", 1.0, 8, ".")
|
||||
|
||||
else:
|
||||
raise ValueError(f"Invalid backend: {args.backend}")
|
||||
|
||||
|
||||
@@ -82,9 +82,10 @@ Action 3: Finish[yes]
|
||||
""" + question)
|
||||
for i in range(1, len(triplets) + 2):
|
||||
s += "Thought " + str(i) + ":"
|
||||
# NOTE: This is an implementation for replaying a given trace for benchmark purposes. It is not an actual ReAct agent implementation.
|
||||
ss = s.fork(1)
|
||||
ss[0] += sgl.gen(name="thought_action", max_tokens=200, stop="Observation")
|
||||
# ss.join()
|
||||
ss.join()
|
||||
# to verify the correctness of output, this should be collected
|
||||
# print(ss[0]["thought_action"])
|
||||
if i > len(triplets):
|
||||
|
||||
100
benchmark/react/hotpotqa_100.jsonl
Normal file
100
benchmark/react/hotpotqa_100.jsonl
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user