Camelid PHP is a PHP-based local LLM runtime for macOS that runs small Llama models on Apple Metal, providing a streaming chat UI, CLI, and HTTP API.

Stars

5

7-day growth

No data

Forks

1

Open issues

0

License

NOASSERTION

Last updated

2026-07-30

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It implements model loading, tokenization, sampling, and generation in PHP while offloading matrix-heavy operations to Apple Metal through FFI, making an LLM stack surprisingly approachable for PHP developers and readable for experimentation.

Who it is for

  • PHP developers interested in LLM and ML internals
  • macOS users who want a private local chat on Apple Silicon
  • Self-hosters needing a simple local HTTP API or CLI for generation
  • Developers learning tokenization, sampling, and Metal integration

Use cases

  • Run a private Llama 3.2 1B chat server locally on macOS
  • Use the CLI for terminal-based text generation
  • Call the streaming HTTP /generate endpoint from custom applications
  • Experiment with model execution and Metal kernels in PHP

Strengths

  • Dependency-free PHP HTTP/SSE server with a responsive streaming chat interface
  • All prompts and conversations remain local, with the server listening on 127.0.0.1 by default
  • Supports Llama 3.2 1B Instruct Q8_0 with a SHA-256-verified downloader and included diagnostics tests
  • Provides CLI options, chat controls, and configurable server settings such as context size and port

Considerations

  • macOS with Apple Metal only; no Linux, Windows, or CPU fallback
  • Generation is sequential: one token at a time, prompt processing is not batched, and requests are handled one after another
  • Only a small, deliberately supported set of GGUF model layouts is accepted

README quick start

Quick start

Related repositories

Similar projects matched by category, topics, and programming language.

Wren-CMS
Wren-CMS GitHub avatar

wren-cms

Wren CMS is a minimal, single-file content management system using PHP and SQLite that lets you create a whole website with no dependencies, no build step, and a one-minute setup.

PHP
24
1227cwx
1227cwx GitHub avatar

HDupay

HDupay is an open-source demo platform for accepting stablecoin payments (USDC/USDT) on EVM networks using hierarchical deterministic wallets, built with Webman (PHP) and Vue 3.

PHP
22
islam-re
islam-re GitHub avatar

Algeria-wilayas

A dataset of all 69 Algerian wilayas (provinces) following the 2026 administrative reform, provided in multiple data formats.

Data & DatabasesDatabases & Storage
15