Skip to main content

macos-serving

This repository contains a minimal continuous batching LLM engine. The current implementation is a straightforward PyTorch prototype focused on exercising the serving loop and request scheduler.

Current Capabilities

  • Runs a single dense model configuration: Qwen 0.6B.
  • Demonstrates continuous batching to keep GPU execution saturated under streaming request load.

Vision

  • Transition the backend to Metal-accelerated kernels purpose-built for Apple silicon.
  • Broaden model coverage and support quantized variants suited for on-device serving.
  • Introduce production-grade observability, adaptive batching heuristics, and deployment tooling tailored for macOS.

Quick Start

  1. Make sure you have uv installed
uvx macos-serving --model_path Qwen/Qwen3-0.6B

This command will install all required dependencies and run an API on port 4444 by default.

After server goes up you can go to http://localhost:4444 some simple chat page will be exposed there that you can use to test out inference process. Additionally you can use exposed API as openai compatible server and do something like this

from openai import OpenAI
client = OpenAI(base_url="http://localhost:4444/v1", api_key="")
messages = [
    {"role": "system", "content": "You are helpful assistant, answer user questions"},
    {"role": "user", "content": "Who was Shakesphere? Tell me in detail"},
]
response = client.chat.completions.create(messages=messages, model="w/e")
print(response)

Oh and right now there is no sophisticated sampling implemented, during decoding next token is just sampled using argmax from logits.

For now this is just an experimental-exploration project in future there is a plan to further optimize it and play around with metal kernes.

Release files for macos-serving 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for macos-serving 0.1.1
File Size Uploaded
macos_serving-0.1.1.tar.gz 62.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for macos-serving 0.1.1
File Interpreter ABI Platform
macos_serving-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 83.0 kB

Release files / macos_serving-0.1.1.tar.gz

Download URL macos_serving-0.1.1.tar.gz
Size 62.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8cefb6583e785a70604d21feb6e3b4e8c1bd18f15fd36a445fca637b27805f9b
BLAKE2b-256 checksum
How to use checksums
18153e728ff1aee891dc61b4339c526901263c6b690544ee631506abda2bd3fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.2

Release files / macos_serving-0.1.1-py3-none-any.whl

Download URL macos_serving-0.1.1-py3-none-any.whl
Size 20.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d780871bafb4415ff2eea2e78a7a1900911a78d1b6cc4f35c06b6c0c2e520d1
BLAKE2b-256 checksum
How to use checksums
b9b3dd12aab959d319e4ea80dbea2946a40107cc3e997e0bf0e826fb9b0ef0d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.2

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page