ZABIBU TECHNIKA / PHOSH

Local AI.
No network required.

Phosh is the open client for the Fikra Edge Runtime. It keeps sessions alive when the OS kills the app, compacts context instead of forgetting it, manages heat instead of collapsing, and gets more than one token per weight read.

2.3×decode speed from thread tuning
10-30%from n-gram speculation
2 coresreference laptop
0cloud calls in the loop

Why

Built for the hardware people actually own.

Cloud AI assumes a connection, a card and a round trip. That is not the world most devices live in. Phosh runs the model on the device and spends its engineering on the parts that fail first: memory, heat, context and distribution.

01

Offline by default

No network in the hot path. No telemetry, no account, no remote dependency to fail at the worst moment.

02

Survives being killed

History and state are written atomically. Reopening a session resumes where it stopped, without a re-read.

03

Context that compacts

A token budget, a pinned system prompt, merging of old turns and eviction - in that order, on turn boundaries.

04

Speculation that pays

N-gram drafts verified in one pass. Repetitive work gets several tokens per read; free-form prose turns the draft off.

What's inside

One small C interface. The messy parts handled.

01

Sampling that composes

Temperature, top-k and top-p with exact rejection sampling, so sampled output and speculative verification work together.

02

Chat formats

ChatML, Llama 3, Mistral and Gemma applied by the runtime, with end-of-turn stopping. One app, many model families.

03

Engine agnostic

llama.cpp today, other runtimes tomorrow, behind one stable ABI. Adapters never leak into the application.

04

Governors

Thermal and memory ladders that degrade deliberately instead of crashing. The app can query the state.

05

Session persistence

Escaped, line-based history and metadata, written through a temporary file and an atomic replace.

06

Offline distribution

Resumable, checksummed model installs and local sharing over hotspot or USB. Data cost is a design constraint.

Quick start

Two commands to a running client.

BUILDCMAKE 3.20+
# runtime and client
./scripts/build.ps1          # Windows
./scripts/build.sh           # Linux / macOS
RUNLOCAL MODEL
# ChatML is the default for real models
./build/phosh models/fikra-1.5b-q4.gguf \
  "Habari! Jibu kwa Kiswahili kwa ufupi."
MEASURETHIS DEVICE
# find the thread count this machine likes
fikra_measure --model models/fikra-1.5b-q4.gguf \
  --context 512 --max-tokens 64 --autotune

MIT licensed. Built on llama.cpp and ggml, which retain their own licenses. The commercial edition is the Fikra Edge Runtime.

PART OF THE FIKRA STACK

Open client. Commercial runtime.

Phosh is the open edition. Fikra Edge Runtime adds proprietary modules, managed distribution and support for fleets. The core is shared, so fixes land once.