Skip to content

Commit

Permalink
update benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
zhtmike committed Sep 27, 2024
1 parent 1675636 commit b45f17f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions examples/opensora_hpcai/tools/caption/llava_next/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,17 @@ starting from the same point. This particular radar chart is showing the perform
The axes represent different metrics or benchmarks, such as MM-Vet, MM-Vet, MM-Vet, MM-Vet, MM-Vet, MM-V
```

## Benchmark

### Inference

To perform the benchmark, you can run `python predict --benchmark` to get the throughput.

| Model | Context | Batch Size | Throughput (tokens/second)|
|-----------------------|---------------|------------|---------------------------|
| llava-v1.6-mistral-7b | D910*x1-MS2.3 | 1 | 21.2 |

> Context: {Ascend chip}-{number of NPUs}-{mindspore version}.\
> Throughput (tokens/second): number of generated tokens per second.\
> We use the second round of inference as the benchmark result.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def main():
start = time.time()
output = pipeline.generate(**inputs)
end = time.time()
logging.info(f"Time Taken: {end-start:.3f}")
logging.info(f"Time Taken: {end-start:.3f}, Tokens/Second: {len(output[0]) / (end - start):.1f}")

print(processor.decode(output[0], skip_special_tokens=True))

Expand Down

0 comments on commit b45f17f

Please sign in to comment.