LattePanda Sigma 2 (59GB Xe3 UMA + OCuLink) & Cloudflare Clairic / Clef Extraction Runner (run-sigma2-xe3-clairic-extractor.sh)
Audits Intel Arc B390 Xe3 59GB shared VRAM & Dual 10GbE / OCuLink links on LattePanda Sigma 2, and serves Apache-2.0 Cloudflare Clairic-flash (9B) or Clairic (27B) locally with calibrated p_null thresholds for zero-hallucination PDF/receipt extraction.
LattePanda Sigma 2 (59GB Xe3 UMA + OCuLink) & Cloudflare Clairic / Clef Extraction Runner
Audits Intel Arc B390 Xe3 59GB shared VRAM & Dual 10GbE / OCuLink links on LattePanda Sigma 2, and serves Apache-2.0 Cloudflare Clairic-flash (9B) or Clairic (27B) locally with calibrated p_null thresholds for zero-hallucination PDF/receipt extraction.
#!/usr/bin/env bash
# Tinker AI — LattePanda Sigma 2 (Core Ultra X7 358H 64GB) & Cloudflare Clairic / Clef Runner (Guide #58)
set -euo pipefail
MODE="clairic_vllm"
MODEL="Cloudflare/clairic-flash"
CTX="32768"
P_NULL="0.65"
PORT="8000"
echo "=== [Host Check] Auditing Intel Xe3 Render Node, 10GbE Links & OCuLink PCIe ==="
ls -l /dev/dri/renderD* 2>/dev/null || true
lspci | grep -Ei 'VGA|Display|3D|Ethernet' || true
if [ "$MODE" = "clairic_vllm" ]; then
echo "=== [Clairic System-1 Extraction] Serving $MODEL (p_null threshold=$P_NULL, ctx=$CTX) ==="
export HF_HUB_OFFLINE="${HF_HUB_OFFLINE:-0}"
export TINKER_CLAIRIC_P_NULL_MAX="$P_NULL"
exec vllm serve "$MODEL" \
--trust-remote-code \
--max-model-len "$CTX" \
--gpu-memory-utilization 0.88 \
--host 127.0.0.1 --port "$PORT"
elif [ "$MODE" = "sigma2_xe3_gguf" ]; then
echo "=== [LattePanda Sigma 2 Arc B390 Xe3] Launching SYCL / Vulkan GGUF Server (59GB UMA Ceiling) ==="
export GGML_VK_VISIBLE_DEVICES=0
exec llama-server \
-m "$MODEL" -ngl 99 -fa on \
--cache-type-k q8_0 --cache-type-v q8_0 \
-c "$CTX" --host 127.0.0.1 --port "$PORT"
elif [ "$MODE" = "clef_router_dual" ]; then
echo "=== [Dual-Model Pipeline] Starting Clef-Flash 9B Calibrated Router on Port $((PORT + 1)) + $MODEL on $PORT ==="
vllm serve Cloudflare/clef-flash --max-model-len 16384 --gpu-memory-utilization 0.28 --port "$((PORT + 1))" &
exec vllm serve "$MODEL" --max-model-len "$CTX" --gpu-memory-utilization 0.60 --port "$PORT"
else
echo "Unknown DEPLOY_MODE=$MODE (expected: clairic_vllm | sigma2_xe3_gguf | clef_router_dual)" >&2
exit 1
fi
Customizable Parameter Reference for run-sigma2-xe3-clairic-extractor.sh
This SH artifact exposes 5 template variables compiled client-side in your browser.
| Template Token | Parameter Description | Verified Default | Example Format |
|---|---|---|---|
{{DEPLOY_MODE}} | Deploy Mode (clairic_vllm | sigma2_xe3_gguf | clef_router_dual) | clairic_vllm | clairic_vllm |
{{CLAIRIC_MODEL}} | HuggingFace Repo or Local Model Path | Cloudflare/clairic-flash | Cloudflare/clairic-flash |
{{MAX_CTX}} | Max Context Length | 32768 | 32768 |
{{P_NULL_THRESHOLD}} | Explicit Null Probability Threshold (p_null) | 0.65 | 0.65 |
{{SERVE_PORT}} | Local HTTP API Port | 8000 | 8000 |
Verified Environment for "LattePanda Sigma 2 (Core Ultra X7 358H · 64GB · Dual 10GbE · OCuLink) & Cloudflare Clairic / Clef (Apache 2.0): Local "System One" PDF Extraction & 59GB Xe3 Edge Server Guide"
LattePanda Sigma 2 (Intel Core Ultra X7 358H · Arc B390 12-Xe3 · 64GB LPDDR5X-8533 · Dual 10GbE · OCuLink · RP2350) ± OCuLink 24GB eGPU
Cloudflare Clairic (27B / 9B-flash) and Clef (27B / 9B-flash) weights are Apache-2.0 licensed on Hugging Face; once cached locally, set HF_HUB_OFFLINE=1 for strict air-gapped operation.
- LattePanda Sigma 2 64GB LPDDR5X-8533 delivers 136.5 GB/s memory bandwidth (128-bit bus)—excellent for 9B dense models (~18–26 tok/s) and 30B–35B sparse MoEs (~30–42 tok/s), whereas 27B dense Clairic runs at ~6.5–8.5 tok/s on iGPU alone unless paired with an OCuLink discrete GPU.
- Clairic and Clef are purpose-built "System One" programmatic models—they output typed schema slots, confidence scores, character spans, and p_null probabilities rather than open-ended chat or multi-step chain-of-thought essays.
- Hot-unplugging an OCuLink PCIe 4.0 x4 (64Gbps) eGPU while Linux is booted triggers a fatal PCIe bus Surprise Down panic; always power off LattePanda Sigma 2 before connecting or disconnecting the OCuLink cable.
3-Step Verification Checklist After Deploying run-sigma2-xe3-clairic-extractor.sh
- Verified
/dev/dri/renderD128under Linux6.14+(xedriver with59GBshared VRAM ceiling) on LattePanda Sigma 2 and connected any OCuLink eGPU strictly while powered off. - Configured downstream n8n / Python ingestion to inspect Clairic
p_null(>= 0.65-> explicitnull/ human review) andspanoffsets instead of blindly trusting extracted numbers. - Pre-cached
Cloudflare/clef-flashandCloudflare/clairic-flashweights locally and exportedHF_HUB_OFFLINE=1for 100% air-gapped document processing.