The proxy waited for the lane's answer and looked at nothing else: a client that gave up after a while and asked again had its first job computed to its end for nobody, the second behind it. Its socket is looked at once a second until the answer begins, as _client_left looks at it, under TLS too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 KiB
The embeddings lane: pplx-embed v1 0.6B on the CPU, beside every lane
Perplexity's pplx-embed-v1-0.6b, 0.6B in float32 with mean pooling, served by Hugging Face's
text-embeddings-inference (TEI) on the CPU, on a port of its own (30028) and on 127.0.0.1 alone, answering
/v1/embeddings in the OpenAI shape. It is a lane beside every lane, like the
speech lane: its engine never touches the GPU, so it runs beside whichever lane serves,
its Load stops nothing, and nothing stops for it. The need it serves is an indexing service (discussion #69:
one embedding at the start of a task, the queries of an agent beside it), for which the CPU's throughput is
enough, and a GPU engine would contend with generation.
Why this model, and why TEI
The model's own card documents the engine ("Text Embeddings Inference v1.9.2+ is required"), and TEI
serves the model two ways. Its ORT backend serves the ONNX export the repository holds (onnx/), which
TEI tries first: that is what this lane serves, 3.4 times as fast as the other way on the reference box
(below). Its candle backend serves the safetensors, and knows the pplx architecture natively
(backends/candle/src/models/pplx1.rs at v1.9.4): the lane keeps them beside the export, so candle
serves should ORT not start. Either way the attention is bidirectional, the pooling mean, and the
embeddings come back normalized (floats of norm 1, measured on the box: the int8 vector is the ONNX
export's own pooled output, not what TEI returns). vLLM does not know the architecture, and llama.cpp's converter refuses it (issue
llama.cpp 20055, closed as not planned): the community GGUF conversions record the causal Qwen3
attention, which embeds wrong vectors unless llama-server is told otherwise with
--override-kv qwen3.attention.causal=bool:false.
The GPU path: not yet
x42en asked for this lane in discussion #69, with the
model they index with, and then published how they serve it on the GPU of their own GB10 (2026-11-19):
llama.cpp's server, on the image the repo pins for its llama.cpp lanes (b12316), the F16 GGUF of
bowang0911's conversion (bowang0911/pplx-embed-v1-0.6b-gguf at ab95a3d1), and the override above,
which is their finding. Their measures, on their box: cosine 0.58 against TEI without the override, 0.9994
with it, about 20,000 tokens/s in 2.6 GB at an 8K context, and a chat decode slowed by 19 % beside one
batch of embeddings (39 % beside four). The project answered there on 2026-11-23 that this path would
become the lane "if it holds".
On the reference box, on 2026-11-24, it does not hold yet:
- A request of several texts came back with every value of every vector null (NaN, which JSON
writes null), with their flags as published, with
-fa offand with-np 1. The same texts sent one by one came back finite and of norm 1, but for one of the ten, null alone too. - A new CUDA context beside the 27B that serves failed at its start when the memory was
fragmented: llama-server stopped on "CUDA error: out of memory" in
ggml_cuda_init, and the kernel logged NV_ERR_NO_MEMORY fromkgrctxAllocMainCtxBuffer, the case the NVRM line that looks like a cause describes.
So the lane serves TEI on the CPU, as that answer provided for, and the GPU path is not yet a lane.
Why no key, and why through the proxy
TEI 1.9.4 writes its whole argument list to the journal at start (router/src/main.rs, api_key
unredacted), so no key is passed to it, and it listens on 127.0.0.1 alone: the only door to it from the
network is the keepalive proxy on :30001, which checks the box's key on /v1/embeddings
as on every client route, and relays it to the lane only while its unit is active: a stopped lane
leaves the route to the text engine, whose own answer is a 400 (measured in the lane's proof, before
the lane and after its stop alike). A client that leaves before its answer ends its request at the lane
(proxy v6.66). The 503 engine_unavailable is the unit active with its
engine not answering yet (a start on its way), never a stopped lane. The proxy reads the lane's port from
its unit, so an EMBED_PORT the installer took is followed. Clients keep one base URL and one key, the box's,
for chat and embeddings alike; /v1/models is unchanged and names no embeddings model. Programs on the
box reach the engine directly on its port, with no key, as they do the speech lane's routes.
Installing, loading, removing
It is installed by default and prepared at its first Load, as the image lane and the video lane are: a
plain ./install.sh puts its unit in (the lane's proof received 11 MB and added nothing to the
Hugging Face cache, the 27B's unit untouched), and its first Load pulls TEI's image (about 120 MB to
download, compressed: its registry's manifest) and fetches the model (about 4.8 GB: its
safetensors, 2.4 GB, and its ONNX export, 2.4 GB), then
enables it at boot and starts it, with no sudo and nothing stopped: the 27B answered all through that
Load in the proof (whose box already held the image and the model, from the trial of 2026-11-19: the
download itself has not been measured on the box yet). ./install.sh --with-embeddings installs it whole now and proves it, and --no-embeddings leaves it out of the
run that passes it. A 64 GB DGX Spark refuses it, as every lane never run on one (boxmem.py): no run
of it beside Bolt's share of a 64 GB box was measured.
./prepare-lane.sh embeddings # TEI's image and the model, with no sudo (the cockpit's first Load runs it)
./install-embeddings.sh --uninstall # its unit and its container; the model and the image stay, said
Memory: capped by its cgroup, pinned to the A725 cores
Its 2.22 GB of fp32 weights and its runtime sit in host memory, inside the cap its unit's cgroup sets
(--memory and --memory-swap equal, 7680m at this pin): a batch whose
attention cost grows past the cap kills this container alone, never the box. Its CPUs are the A725
cores (--cpuset-cpus 0-4,10-14, read from lscpu: the ten cores at 2.8 GHz), never the X925 the text
engines' busy threads run on, and --max-batch-tokens (2048, measured: 399 tokens/s on those cores,
a death at 32768) bounds one batch's tokens: an input longer than it is truncated (TEI's
--auto-truncate), which an indexing chunk rarely is. EMBED_MEMORY, EMBED_CPUS and
EMBED_MAX_BATCH_TOKENS are the pins of install-embeddings.sh.
Measured on the box: the engine that serves (2026-11-24)
The pinned image, with the unit's engine flags (its port aside), the A725 cores, the 7680m cap and the
cache mounted read-only and offline, on a cache that held the pinned files alone, once with the safetensors
and the small files (nine files: candle serves) and once with the ONNX export beside them (twelve: ORT
serves), on the reference box (~/qa-tools/etudes/embeddings-tei/essai.log and essai-ort.log):
| ORT, the ONNX export (what the lane serves) | candle, the safetensors | |
|---|---|---|
| ready after its start | 10 s, 3.16 kB received by the container (nothing fetched) | 30 s |
| 16 inputs of 512 tokens in one request | 381 tokens/s (21.5 s, median of 3) | 113 tokens/s |
| two requests of 8 x 512 tokens at once | 380 to 382 tokens/s | 113 to 115 tokens/s |
| one input of 8,000 tokens | truncated to 2,048 (prompt_tokens 2048), 7.8 s |
truncated to 2,048, 29.7 s |
| the container's memory at its peak (docker stats, every second) | 2.87 GiB | 3.2 GiB |
On both, ten texts came back as 1024-dimension vectors of norm 1, none null, sent one by one and sent
together, cosine 1.0 (min and median) with the ONNX reference. ORT batches 8 requests at most: its
journal says "Backend does not support a batch size > 8" at start and forces max_batch_requests to 8.
Measured on the box: the lane's proof (2026-11-20)
Every figure below is the proof's own (~/qa-tools/preuves/v1560/preuve.log), the trial of
2026-11-19 beside it where said. Both ran TEI's ORT backend on the model's ONNX export, as the lane
does since 2026-11-24, but not from the pinned snapshot: the trial served a snapshot that held the
ONNX files, and the proof's unit named the repository, which TEI fetched from the Hub at each start
(its journal: the three ONNX files, then "batch size > 8"), the mounted cache unread. The unit names
the pinned snapshot by its path since the review of v1.60.0, and the lane fetches the export with
the rest since 2026-11-24.
- Vectors. Ten texts through the proxy came back as 1024-dimension vectors of norm 1, cosine 1.0 with the trial's ONNX reference (min and median both 1.0). An input of 2107 tokens was truncated at the 2048 bound and still returned 1024 dimensions.
- Throughput. 64 chunks of 512 tokens through 4 concurrent requests ran at 384 tokens/s, the A725 cores at 64 °C (they were at 63 °C when it started).
- Memory. The cgroup held 5298 MiB at rest and peaked at 5304 MiB over the lane's whole life,
its Load included;
EMBED_MEMORY(7680m) is that peak plus 2 GiB of margin, rounded up to the 512 MiB step (7352 MiB becomes 7680 MiB). - Beside the 27B. The 27B answered all through the lane's Load, and its unit was untouched by the install.
- Stopped and removed. Stopped from the cockpit, the lane left the proxy answering
/v1/embeddingsexactly as before it (the text engine's 400, the same as before the lane); uninstalled, its image and its model stay for the next Load.
The pins
The image is pinned by its digest (the arm64 build: cpu-1.9.4 is amd64 only), the model at its revision,
each file by its sha256 (the safetensors and the three files of the ONNX export) or its git oid (the small
files), the way the speech lane pins its GGUF. check-pins.sh asks the Hub's LFS pointers every day.
| what | pinned |
|---|---|
| the image | ghcr.io/huggingface/text-embeddings-inference@sha256:798cd761... (cpu-arm64-1.9.4) |
| the model | perplexity-ai/pplx-embed-v1-0.6b at 2c4d510dd4a732063c31a0f70193e35067b51fd8, float32, 1024 dimensions |
| its ONNX export | onnx/model.onnx (520,292 bytes), onnx/model.onnx_data (2,094,723,072) and onnx/model.onnx_data_1 (306,225,152), each by its sha256 |
What the cockpit shows
The Lanes view carries its card, pplx-embed v1 0.6B, with Load like the other lanes on demand. Its
state is systemd's word and TEI's own /health, asked on the lane's port: starting from the unit's start
until TEI answers (the proxy's 503 meanwhile), ready then, failed when the unit failed (its preflight's 78:
a file of the model missing, which its Load fetches), with no boot to parse and no belt to feed. It is never
the lane that serves nor the box's boot lane, which take the GPU in turn: it runs beside them. Its Load
prepares what it lacks (every file its unit's preflight checks), puts an update that waited in place,
enables it at boot when the boot does not start it, then starts it, or restarts it when it runs and an
update waited for it or left it owed: no switch drives it, and the lane that serves serves throughout. Its
card takes it out of the boot and back (Do not start with the box, Start with the box), and its
journal is one button away, as any lane's.
Limits
- No chat route: it serves embeddings alone, so no served name in opencode and no proxy ceiling; the
proxy relays
/v1/embeddingsand nothing else of it. - One embedding model: the lane serves pplx-embed v1 0.6B and no other; a second model is a second lane's question, not a target of this one.