{"id":51345621,"url":"https://github.com/youxufkhan/nimbench","last_synced_at":"2026-07-02T11:31:25.610Z","repository":{"id":367646847,"uuid":"1257520421","full_name":"youxufkhan/nimbench","owner":"youxufkhan","description":"A lightweight CLI benchmarking tool for NVIDIA NIM LLMs to measure latency, throughput (TPS), and reliability.","archived":false,"fork":false,"pushed_at":"2026-06-26T21:53:48.000Z","size":219,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-27T00:26:36.624Z","etag":null,"topics":["ai","benchmark","cli","developer-tools","llm","nvidia","nvidia-nim"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/youxufkhan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-02T18:57:14.000Z","updated_at":"2026-06-26T21:59:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/youxufkhan/nimbench","commit_stats":null,"previous_names":["youxufkhan/nimbench"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/youxufkhan/nimbench","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youxufkhan%2Fnimbench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youxufkhan%2Fnimbench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youxufkhan%2Fnimbench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youxufkhan%2Fnimbench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/youxufkhan","download_url":"https://codeload.github.com/youxufkhan/nimbench/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youxufkhan%2Fnimbench/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35045917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","benchmark","cli","developer-tools","llm","nvidia","nvidia-nim"],"created_at":"2026-07-02T11:31:24.902Z","updated_at":"2026-07-02T11:31:25.604Z","avatar_url":"https://github.com/youxufkhan.png","language":"Python","funding_links":[],"categories":["📋 Changelog"],"sub_categories":["2026-07-19 — Weekly Update"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"nimbench/cli.png\" alt=\"nimbench cli\" width=\"500\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eA lightweight, high-performance benchmarking tool for NVIDIA NIM LLMs.\u003c/b\u003e\u003cbr\u003e\n  \u003ci\u003eMeasure latency, throughput, and reliability with style.\u003c/i\u003e\n\u003c/p\u003e\n\n---\n\n## 🚀 Overview\n\n`nimbench` is a surgical CLI tool designed to benchmark NVIDIA NIM (NVIDIA Inference Microservices) chat models. Powered by `httpx` for connection-pooled requests and `rich` for beautiful terminal presentation, it handles model discovery, intelligent filtering, and robust benchmarking, providing you with a clean, formatted performance report.\n\n## ✨ Key Features\n\n- **🔍 Auto-Discovery**: Automatically finds and ranks all available models from your NVIDIA NIM endpoint.\n- **📊 Precise Metrics**: Measures Median, Min, Max latency and Tokens Per Second (TPS).\n- **⏱️ Progress \u0026 ETA**: Live interactive progress bar with percentage and estimated time remaining.\n- **🌈 Rich Terminal UI**: Beautiful, color-coded status tables and highlights using `rich`.\n- **🔌 Connection Pooling**: Uses `httpx` to reuse TCP connections, minimizing handshake overhead for accurate latency comparisons.\n- **🛡️ Intelligent Retries**: Automatically handles rate limits (429) by respecting `Retry-After` headers and applies temperature fallbacks when needed.\n- **📝 Failure Analysis**: Detailed breakdown of failure reasons (Not Provisioned, Timeout, Unsupported, etc.).\n- **💾 Skip Cache**: Remembers failed models to speed up subsequent runs.\n\n---\n\n## 🔬 What it measures\n\n`nimbench` measures wall-clock request time for a minimal `POST /v1/chat/completions` call. It is designed to evaluate **request/response latency** rather than long-form output quality.\n\n**Default Request Shape:**\n- **Prompt:** `Reply with one short word.`\n- **Max Tokens:** `8`\n- **Temperature:** `0.0` (with automatic fallback to `0.1` if rejected).\n\nThe CLI reports tokens per second for each model. It uses server-provided metrics when available, or derives an approximate rate from `completion_tokens / wall_time`.\n\n---\n\n## 🛠️ How it behaves\n\n- **Discovery**: Fetches all models from `GET /v1/models` and filters for likely chat-capable IDs.\n- **Sequential Execution**: Benchmarking is performed sequentially to preserve the **40 RPM** (Requests Per Minute) cap.\n- **Intelligent Skipping**: A local skip cache is maintained for models that are not provisioned, reject chat input, or repeatedly timeout.\n- **Cap Logic**: The `--limit` flag means \"stop after N **successful** benchmarks\", preventing your rate limit from being wasted on unavailable models.\n\n---\n\n## 📦 Installation\n\nRequires Python 3.10+.\n\n```bash\ngit clone https://github.com/your-username/nimbench.git\ncd nimbench\npip install -e .\n```\n\n## 🚀 Quick Start\n\nBenchmark the top 10 most likely chat models:\n```bash\npython3 -m nimbench --limit 10\n```\n\n### Advanced Usage\n```bash\n# Benchmark everything (including non-chat) with 3 repeats each\npython3 -m nimbench --all-models --repeats 3\n\n# Filter for specific models using regex\npython3 -m nimbench --pattern \"llama|nemotron|mistral\"\n\n# Export results to JSON\npython3 -m nimbench --limit 5 --json \u003e results.json\n```\n\n---\n\n## ⚙️ Configuration \u0026 Options\n\n### API Key Precedence\n1. `--api-key` command-line argument.\n2. `NVIDIA_API_KEY` environment variable.\n3. Interactive prompt.\n\n### Options\n| Option | Description |\n| :--- | :--- |\n| `--api-key KEY` | NVIDIA API key |\n| `--base-url URL` | API base URL (Default: `https://integrate.api.nvidia.com/v1`) |\n| `--limit N` | Stop after N successful benchmarks |\n| `--pattern REGEX` | Only consider model ids matching REGEX |\n| `--timeout SECONDS` | Request timeout for each HTTP call |\n| `--repeats N` | Requests per model |\n| `--json` | Emit JSON instead of a text table |\n| `--rpm N` | Request rate cap (Default: 40) |\n| `--all-models` | Benchmark full catalog instead of chat-only default |\n| `--refresh-cache` | Ignore the local skip cache for this run |\n\n### Environment Variables\n- `NVIDIA_API_KEY`: Your NVIDIA API key.\n- `NIMBENCH_CACHE_DIR`: Set this to override the default local skip cache directory.\n\n---\n\n## 🧪 Testing\n\nRun the comprehensive test suite:\n```bash\npython3 -m unittest discover tests\n```\n\n---\n\n\u003cp align=\"center\"\u003e\n  Built with 💚 for the LLM community.\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyouxufkhan%2Fnimbench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyouxufkhan%2Fnimbench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyouxufkhan%2Fnimbench/lists"}