llm-benchmark


Namellm-benchmark JSON
Version 0.3.22 PyPI version JSON
download
home_pagehttps://github.com/aidatatools/ollama-benchmark/
SummaryLLM Benchmark for Throughputs via Ollama
upload_time2024-07-24 20:50:06
maintainerNone
docs_urlNone
authorJason Chuang
requires_python<4.0,>=3.8
licenseMIT
keywords benchmark llama ollama llms local
VCS
bugtrack_url
requirements anyio certifi charset-normalizer cli-exit-tools click colorama exceptiongroup fake-winreg GPUtil h11 httpcore httpx idna lib-detect-testenv lib-platform lib-registry markdown-it-py mdurl ollama psutil Pygments PyYAML requests rich shellingham sniffio typer typing_extensions urllib3 wrapt
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # llm-benchmark (ollama-benchmark)

LLM Benchmark for Throughput via Ollama (Local LLMs)

## Installation Steps

```bash
pip install llm-benchmark
```

## Usage for general users directly

```bash
llm_benchmark run
```

## Installation and Usage in Video format

![llm-benchmark](https://github.com/aidatatools/ollama-benchmark/blob/main/llm-benchmark.gif)

It's tested on Python 3.9 and above.

## ollama installation with the following models installed

7B model can be run on machines with 8GB of RAM

13B model can be run on machines with 16GB of RAM

## Usage explaination

On Windows, Linux, and macOS, it will detect memory RAM size to first download required LLM models.

When memory RAM size is greater than or equal to 4GB, but less than 7GB, it will check if gemma:2b exist. The program implicitly pull the model.

```bash
ollama pull qwen:1.8b
ollama pull gemma:2b
ollama pull phi:2.7b
ollama pull phi3:3.8b
```

When memory RAM size is greater than 7GB, but less than 15GB, it will check if these models exist. The program implicitly pull these models

```bash
ollama pull phi3:3.8b
ollama pull qwen2:7b
ollama pull gemma2:9b
ollama pull mistral:7b
ollama pull llama3.1:8b
ollama pull llava:7b
```

When memory RAM siz is greater than 15GB, it will check if these models exist. The program implicitly pull these models

```bash
ollama pull phi3:3.8b
ollama pull qwen2:7b
ollama pull gemma2:9b
ollama pull mistral:7b
ollama pull llama3.1:8b
ollama pull llava:7b
ollama pull llava:13b
```

## Python Poetry manually(advanced) installation

<https://python-poetry.org/docs/#installing-manually>

## For developers to develop new features on Windows Powershell or on Ubuntu Linux or macOS

```bash
python3 -m venv .venv
. ./.venv/bin/activate
pip install -U pip setuptools
pip install poetry
```

## Usage in Python virtual environment

```bash
poetry shell
poetry install
llm_benchmark hello jason
```

### Example #1 send systeminfo and benchmark results to a remote server

```bash
llm_benchmark run
```

### Example #2 Do not send systeminfo and benchmark results to a remote server

```bash
llm_benchmark run --no-sendinfo
```

### Example #3 Benchmark run on explicitly given the path to the ollama executable (When you built your own developer version of ollama)

```bash
llm_benchmark run --ollamabin=~/code/ollama/ollama
```

## Reference

[Ollama](https://ollama.com)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/aidatatools/ollama-benchmark/",
    "name": "llm-benchmark",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "benchmark, llama, ollama, llms, local",
    "author": "Jason Chuang",
    "author_email": "chuangtcee@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/36/32/eee5e1231d988fb58070f15ebbdde8ae2e0f54ca6d0acdb1ea06efd9606c/llm_benchmark-0.3.22.tar.gz",
    "platform": null,
    "description": "# llm-benchmark (ollama-benchmark)\n\nLLM Benchmark for Throughput via Ollama (Local LLMs)\n\n## Installation Steps\n\n```bash\npip install llm-benchmark\n```\n\n## Usage for general users directly\n\n```bash\nllm_benchmark run\n```\n\n## Installation and Usage in Video format\n\n![llm-benchmark](https://github.com/aidatatools/ollama-benchmark/blob/main/llm-benchmark.gif)\n\nIt's tested on Python 3.9 and above.\n\n## ollama installation with the following models installed\n\n7B model can be run on machines with 8GB of RAM\n\n13B model can be run on machines with 16GB of RAM\n\n## Usage explaination\n\nOn Windows, Linux, and macOS, it will detect memory RAM size to first download required LLM models.\n\nWhen memory RAM size is greater than or equal to 4GB, but less than 7GB, it will check if gemma:2b exist. The program implicitly pull the model.\n\n```bash\nollama pull qwen:1.8b\nollama pull gemma:2b\nollama pull phi:2.7b\nollama pull phi3:3.8b\n```\n\nWhen memory RAM size is greater than 7GB, but less than 15GB, it will check if these models exist. The program implicitly pull these models\n\n```bash\nollama pull phi3:3.8b\nollama pull qwen2:7b\nollama pull gemma2:9b\nollama pull mistral:7b\nollama pull llama3.1:8b\nollama pull llava:7b\n```\n\nWhen memory RAM siz is greater than 15GB, it will check if these models exist. The program implicitly pull these models\n\n```bash\nollama pull phi3:3.8b\nollama pull qwen2:7b\nollama pull gemma2:9b\nollama pull mistral:7b\nollama pull llama3.1:8b\nollama pull llava:7b\nollama pull llava:13b\n```\n\n## Python Poetry manually(advanced) installation\n\n<https://python-poetry.org/docs/#installing-manually>\n\n## For developers to develop new features on Windows Powershell or on Ubuntu Linux or macOS\n\n```bash\npython3 -m venv .venv\n. ./.venv/bin/activate\npip install -U pip setuptools\npip install poetry\n```\n\n## Usage in Python virtual environment\n\n```bash\npoetry shell\npoetry install\nllm_benchmark hello jason\n```\n\n### Example #1 send systeminfo and benchmark results to a remote server\n\n```bash\nllm_benchmark run\n```\n\n### Example #2 Do not send systeminfo and benchmark results to a remote server\n\n```bash\nllm_benchmark run --no-sendinfo\n```\n\n### Example #3 Benchmark run on explicitly given the path to the ollama executable (When you built your own developer version of ollama)\n\n```bash\nllm_benchmark run --ollamabin=~/code/ollama/ollama\n```\n\n## Reference\n\n[Ollama](https://ollama.com)\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "LLM Benchmark for Throughputs via Ollama",
    "version": "0.3.22",
    "project_urls": {
        "Homepage": "https://github.com/aidatatools/ollama-benchmark/"
    },
    "split_keywords": [
        "benchmark",
        " llama",
        " ollama",
        " llms",
        " local"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a90a320aa5392488ad53fb74fccc8ad1369a9a09ca573610156a7416a5c90614",
                "md5": "83ae95f865f9a55f331ab638a0d4c798",
                "sha256": "f92e12c24e3f3bae47f23d3d6dbf905549753c7b5f3fbf39d98ebcff664088ed"
            },
            "downloads": -1,
            "filename": "llm_benchmark-0.3.22-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "83ae95f865f9a55f331ab638a0d4c798",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 2131008,
            "upload_time": "2024-07-24T20:50:04",
            "upload_time_iso_8601": "2024-07-24T20:50:04.941514Z",
            "url": "https://files.pythonhosted.org/packages/a9/0a/320aa5392488ad53fb74fccc8ad1369a9a09ca573610156a7416a5c90614/llm_benchmark-0.3.22-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3632eee5e1231d988fb58070f15ebbdde8ae2e0f54ca6d0acdb1ea06efd9606c",
                "md5": "42141d4549869fcd4d9e1bc6fa1a7aad",
                "sha256": "0eb0889333a4f34b785ff1ca1d4c973bc3173ea4722464aaf744db972b8baa34"
            },
            "downloads": -1,
            "filename": "llm_benchmark-0.3.22.tar.gz",
            "has_sig": false,
            "md5_digest": "42141d4549869fcd4d9e1bc6fa1a7aad",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 2127828,
            "upload_time": "2024-07-24T20:50:06",
            "upload_time_iso_8601": "2024-07-24T20:50:06.598533Z",
            "url": "https://files.pythonhosted.org/packages/36/32/eee5e1231d988fb58070f15ebbdde8ae2e0f54ca6d0acdb1ea06efd9606c/llm_benchmark-0.3.22.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-24 20:50:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aidatatools",
    "github_project": "ollama-benchmark",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "anyio",
            "specs": [
                [
                    "==",
                    "4.3.0"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2024.2.2"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "3.3.2"
                ]
            ]
        },
        {
            "name": "cli-exit-tools",
            "specs": [
                [
                    "==",
                    "1.2.6"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.1.7"
                ]
            ]
        },
        {
            "name": "colorama",
            "specs": [
                [
                    "==",
                    "0.4.6"
                ]
            ]
        },
        {
            "name": "exceptiongroup",
            "specs": [
                [
                    "==",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "fake-winreg",
            "specs": [
                [
                    "==",
                    "1.6.3"
                ]
            ]
        },
        {
            "name": "GPUtil",
            "specs": [
                [
                    "==",
                    "1.4.0"
                ]
            ]
        },
        {
            "name": "h11",
            "specs": [
                [
                    "==",
                    "0.14.0"
                ]
            ]
        },
        {
            "name": "httpcore",
            "specs": [
                [
                    "==",
                    "1.0.5"
                ]
            ]
        },
        {
            "name": "httpx",
            "specs": [
                [
                    "==",
                    "0.27.0"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.6"
                ]
            ]
        },
        {
            "name": "lib-detect-testenv",
            "specs": [
                [
                    "==",
                    "2.0.8"
                ]
            ]
        },
        {
            "name": "lib-platform",
            "specs": [
                [
                    "==",
                    "1.2.10"
                ]
            ]
        },
        {
            "name": "lib-registry",
            "specs": [
                [
                    "==",
                    "2.0.10"
                ]
            ]
        },
        {
            "name": "markdown-it-py",
            "specs": [
                [
                    "==",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "mdurl",
            "specs": [
                [
                    "==",
                    "0.1.2"
                ]
            ]
        },
        {
            "name": "ollama",
            "specs": [
                [
                    "==",
                    "0.1.8"
                ]
            ]
        },
        {
            "name": "psutil",
            "specs": [
                [
                    "==",
                    "5.9.8"
                ]
            ]
        },
        {
            "name": "Pygments",
            "specs": [
                [
                    "==",
                    "2.17.2"
                ]
            ]
        },
        {
            "name": "PyYAML",
            "specs": [
                [
                    "==",
                    "6.0.1"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.31.0"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    "==",
                    "13.7.1"
                ]
            ]
        },
        {
            "name": "shellingham",
            "specs": [
                [
                    "==",
                    "1.5.4"
                ]
            ]
        },
        {
            "name": "sniffio",
            "specs": [
                [
                    "==",
                    "1.3.1"
                ]
            ]
        },
        {
            "name": "typer",
            "specs": [
                [
                    "==",
                    "0.9.4"
                ]
            ]
        },
        {
            "name": "typing_extensions",
            "specs": [
                [
                    "==",
                    "4.10.0"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "2.2.1"
                ]
            ]
        },
        {
            "name": "wrapt",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        }
    ],
    "lcname": "llm-benchmark"
}
        
Elapsed time: 0.43383s