https://github.com/tryolabs/nupic-simple-benchmark
Simple benchmark for NuPIC Inference Server
https://github.com/tryolabs/nupic-simple-benchmark
Last synced: 18 days ago
JSON representation
Simple benchmark for NuPIC Inference Server
- Host: GitHub
- URL: https://github.com/tryolabs/nupic-simple-benchmark
- Owner: tryolabs
- Created: 2023-11-21T15:18:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-24T14:39:25.000Z (over 2 years ago)
- Last Synced: 2025-10-07T02:28:12.096Z (10 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NuPIC Simple Benchmark
This repository contains the instructions and code used to benchmark NuPIC Inference Server in [this blogpost](https://tryolabs.com/blog/from-brain-to-binary-cpus-future-ai-inference).
## Preparation
You need to have your Inference Server up and running in `localhost:8000`, and have the `nupic.client` package installed (see the blogpost for more details). Now you need to install the required dependencies with the following command:
```bash
pip install transformers[torch]
```
## Download dataset
Run the following commands to download and prepare the data:
```bash
pip install kaggle
kaggle datasets download -d sbhatti/financial-sentiment-analysis
unzip financial-sentiment-analysis.zip
```
## Run
Now you can run each of the experiments as:
```bash
python run_nupic.py
python run_cpu.py
python run_gpu.py
```
Each experiment will print inference time used to process the `5842` sentences.
> Contributions are welcome. Feel free to open any issues you might find when executing the code.