You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can either run all available benchamrks (excluding some, or specifying which benchmarks to include) or you can run an individual benchmark. To run all benchmarks:
61
+
62
+
```
63
+
$ construe -e "MacBook Pro 2022 M1" run
64
+
```
65
+
66
+
This will run all available benchmarks. The `-e` flag specifies the environment for comparison purposes and the results will be saved as a JSON file on the local disk.
67
+
68
+
When running each benchmark, the model and dataset for that benchmark is downloaded, the benchmark is executed, then the model and dataset are cleaned up. If you do not want the data to be cleaned up use the `-C` or `--no-cleanup` flag to cache the models and datasets between runs.
69
+
70
+
If you would like to limit the number of instances per run you can use the `-l` or `--limit` flag; this might speed up the benchmarks if you're just trying to get a simple sense of inferening on the device. You can also specify the `-c` or `--count` flag to run each benchmark multiple times on the same instances to get more detailed results.
71
+
72
+
To run an individual benchmark, run it by name; for example to run the `whisper` speech-to-text benchmark:
73
+
74
+
```
75
+
$ construe whisper
76
+
```
77
+
78
+
Alternatively if you want to exclude `whisper` (e.g. run all benchmarks but `whisper`), use the `-E` or `--exclude` flag as follows:
79
+
80
+
```
81
+
$ construe run -E whisper
36
82
```
37
83
38
84
## Basic Benchmarks
@@ -62,25 +108,6 @@ Options:
62
108
-h, --help Show this message and exit.
63
109
```
64
110
65
-
## Moondream Benchmarks
66
-
67
-
The [moondream](https://huggingface.co/vikhyatk/moondream2) package contains small image-to-text computer vision models that can be used in the first step of a [content moderation](https://www.cloudraft.io/blog/content-moderation-using-llamaindex-and-llm) workflow (e.g. image to text, moderate text). This benchmark executes the model for _encoding_ and _inferencing_ on a small number of images and reports the average time for both operations and the line-by-line memory usage of the model.
68
-
69
-
It can be run as follows:
70
-
71
-
```
72
-
$ construe moondream
73
-
```
74
-
75
-
Command usage is as follows:
76
-
77
-
```
78
-
Usage: construe moondream [OPTIONS]
79
-
80
-
Options:
81
-
-h, --help Show this message and exit.
82
-
```
83
-
84
111
## Model References
85
112
86
113
1. Image to Text: [Moondream (vikhyatk/moondream2)](https://huggingface.co/vikhyatk/moondream2)
0 commit comments