Files
alzeo/docs/embed-lane.md
T
Hasan BasbunarandClaude Opus 5.5 ac4212d78a embeddings lanes: what the review of their memory guard found
MemAvailable is of one instant, and three lanes take more under their longest prompts than at rest: beside the flash lane at
rest both lanes started, with 1 GiB left under its prompts. The Clipstral lane does not start beside the flash lane, Super VL
or Kolibri-1 FP8, nor while the box boots one of the last two, whose Load stops it first; pplx-embed's Load says what the
flash lane leaves. A start of systemd's own, after a death, asks for what the lane holds and the 3 GiB floor alone. A refusal
has a flag and a word of its own (its card read "a file is missing"), its reason is in the past and waits a second to reach the
journal as its unit's, a restart it would not come back from is said, the reading is cut and not rounded, and the pages say
what was measured: an SGLang lane's pool, the cap with the model's file read from the disk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 22:00:20 +01:00

14 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 off and 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 from kgrctxAllocMainCtxBuffer, 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.

What it holds, a lane loaded after it does not get. A GB10 has one memory for its CPU and its GPU, and an SGLang lane sizes its KV cache by what is free when it starts. On the reference box, 2026-12-01: the 27B loaded alone got 895,242 tokens; loaded while this lane and the Clipstral lane ran, 771,373, 14 % fewer. Started after it, the two leave it its whole pool and take their memory from what is left (below). So load the text lane first when its context matters. Enabled at boot, these lanes are ready in 9 to 16 s, long before a text lane sizes its pool: expect the smaller one then. The cockpit fits opencode's limits to the pool a boot got. What a vLLM or a llama.cpp lane loaded after them gets was not measured: a smaller KV cache, or the box keeps less.

What the box had left (MemAvailable), measured on 2026-12-01, the lanes started in this order:

the lane that serves alone with pplx-embed with both at the lowest, at work
Qwen3.8 27B 21.3 GiB 13.6 GiB 13.3 GiB, the two embeddings lanes at work
Qwen3.8 Flash-Next FP4-Local 18.3 GiB 15.4 GiB 10.4 GiB 8.5 GiB, all three at work: a prompt of 153,234 tokens, seven agents, the two indexing
Qwen3.8 Flash-Next Unsloth GGUF 19.4 GiB 16.5 GiB 11.9 GiB 7.2 GiB, the same work

No request failed. So pplx-embed holds about 2.9 GiB and Clipstral 4.6 to 5.0.

Its start asks for the memory it takes. The cap bounds what its container grows to, not what its start takes from the lane that serves, and a GB10 whose memory runs out freezes whole. So the head of its unit asks for 11 GiB of memory available (its cap, rounded up, and the 3 GiB under which the cockpit and the proxy stop the generations that run), and the Clipstral lane's for 12. It waits 30 s, the time for a lane that stops to hand its memory back, then stays failed: its card and its journal give the reason, and its Load says it before the click. A start of systemd's own, after a death, asks for what the lane holds and the 3 GiB alone (6 and 8 GiB).

That reading is of one instant, and three lanes take more under their longest prompts than at rest: the flash lane leaves the box 6.9 GiB at its lowest (and 16.6 at rest), Nemotron 3.5 Super VL 9.1, Kolibri-1 in FP8 10.9. Clipstral does not start beside one of them, nor while the box boots Super VL or Kolibri-1 FP8, whose share of the memory is fixed, and their Load stops it first; the flash lane sizes itself by what is left, so it can be loaded after. pplx-embed starts beside all three: it leaves Super VL's box 6.2 GiB and Kolibri-1's 8.0, and the flash lane's 4.0, which its Load says.

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/embeddings exactly 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, or too little memory available; its card gives the reason), 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/embeddings and 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.