{"id":39878617,"url":"https://github.com/jasl/simple_inference_server","last_synced_at":"2026-01-18T14:27:38.394Z","repository":{"id":327533715,"uuid":"1108799862","full_name":"jasl/simple_inference_server","owner":"jasl","description":"A straightforward OpenAI-compatible inference API server for hosting multiple small models at the edge.","archived":false,"fork":false,"pushed_at":"2025-12-22T12:00:29.000Z","size":789,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-23T07:27:03.787Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jasl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-12-02T23:52:45.000Z","updated_at":"2025-12-23T03:02:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jasl/simple_inference_server","commit_stats":null,"previous_names":["jasl/simple_inference_server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jasl/simple_inference_server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasl%2Fsimple_inference_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasl%2Fsimple_inference_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasl%2Fsimple_inference_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasl%2Fsimple_inference_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasl","download_url":"https://codeload.github.com/jasl/simple_inference_server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasl%2Fsimple_inference_server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28537578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T13:04:05.990Z","status":"ssl_error","status_checked_at":"2026-01-18T13:01:44.092Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-18T14:27:38.297Z","updated_at":"2026-01-18T14:27:38.377Z","avatar_url":"https://github.com/jasl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Inference Server\n\nAll-in-one OpenAI-compatible inference server for edge deployment.\nRun embeddings, chat, vision, and audio models together on a single device.\n\nBuilt for edge AI scenarios where you need multiple models running concurrently with low latency—think AI-powered NAS, local RAG pipelines, or self-hosted inference for privacy-sensitive applications.\n\n## Why This Project\n\n- **Multi-model, single device**: Run embeddings, chat, vision (Qwen3-VL), and audio (Whisper) models simultaneously without juggling multiple services\n- **Edge-optimized**: Designed for \u003c4B parameter models with smart batching and GPU resource management for high throughput on limited hardware\n- **OpenAI-compatible**: Drop-in replacement for OpenAI APIs—your existing code just works\n- **Unified gateway**: Proxy to upstream services (OpenAI, vLLM) through the same endpoint for models that need more compute\n\n## Features\n\n| Capability | Endpoints | Models |\n|------------|-----------|--------|\n| **Embeddings** | `POST /v1/embeddings` | BGE-M3, Qwen3-Embedding, Gemma |\n| **Chat** | `POST /v1/chat/completions` | Qwen3, Llama 3.2 |\n| **Vision** | `POST /v1/chat/completions` | Qwen3-VL (image inputs) |\n| **Audio** | `POST /v1/audio/transcriptions`, `/translations` | Whisper variants |\n| **Rerank** | `POST /v1/rerank` | Custom rerank models |\n\n**Production-ready features:**\n- Micro-batching for embeddings and chat (configurable windows)\n- Per-capability concurrency limits and queue management\n- LRU embedding cache, warmup on startup\n- Prometheus metrics at `/metrics`\n- Request tracing via `X-Request-ID`\n\n## Quick Start\n\n**Requirements:** Python ≥ 3.12, [uv](https://docs.astral.sh/uv/)\n\n```bash\n# 1. Install dependencies\nuv sync\n\n# 2. Run the server (models download automatically)\nMODELS=BAAI/bge-m3,Qwen/Qwen3-4B-Instruct-2507 uv run python scripts/run_dev.py\n\n# Or with Whisper for audio:\nMODELS=BAAI/bge-m3,openai/whisper-tiny uv run python scripts/run_dev.py\n```\n\n**Test it:**\n\n```bash\n# Embeddings\ncurl -X POST http://localhost:8000/v1/embeddings \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"BAAI/bge-m3\",\"input\":\"hello world\"}'\n\n# Chat\ncurl -X POST http://localhost:8000/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"Qwen/Qwen3-4B-Instruct-2507\",\"messages\":[{\"role\":\"user\",\"content\":\"Hi!\"}],\"max_tokens\":64}'\n\n# Audio transcription\ncurl -X POST http://localhost:8000/v1/audio/transcriptions \\\n  -F \"model=openai/whisper-tiny\" \\\n  -F \"file=@sample.wav\"\n```\n\n## Configuration Essentials\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `MODELS` | *(required)* | Comma-separated model IDs to load |\n| `MODEL_DEVICE` | `auto` | `cpu`, `cuda`, `cuda:\u003cidx\u003e`, `mps`, or `auto` |\n| `MAX_CONCURRENT` | `4` | Max concurrent model forward passes |\n| `MAX_QUEUE_SIZE` | `64` | Request queue capacity |\n\nCopy `env` to `.env` for local configuration. See [Configuration Reference](docs/configuration.md) for all options.\n\n## Documentation\n\n| Document | Description |\n|----------|-------------|\n| [Configuration Reference](docs/configuration.md) | All environment variables and settings |\n| [API Reference](docs/api-reference.md) | Endpoint documentation with examples |\n| [Models Guide](docs/models.md) | Model catalog and how to add custom models |\n| [Performance Tuning](docs/perf_testing.md) | Tuning checklist, load testing, and monitoring |\n| [Upstream Proxy](docs/upstream_proxy.md) | Forward requests to OpenAI/vLLM |\n\n## Benchmarking\n\n```bash\n# Embeddings\nuv run python scripts/benchmark_embeddings.py --models BAAI/bge-m3 --n-requests 50 --concurrency 8\n\n# Chat\nuv run python scripts/benchmark_chat.py --model-name Qwen/Qwen3-4B-Instruct-2507 --n-requests 40 --concurrency 8\n\n# Audio\nMODEL_NAME=openai/whisper-tiny uv run python scripts/benchmark_audio.py -- --n-requests 20 --concurrency 4\n```\n\n## License\n\nMIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasl%2Fsimple_inference_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasl%2Fsimple_inference_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasl%2Fsimple_inference_server/lists"}