TinkerLab
ARTIFACT // RUN-SIGMA2-XE3-CLAIRIC-EXTRACTOR.SH (SH)

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.

[KEY VERIFIED TAKEAWAY / TL;DR]This reproducible configuration artifact "LattePanda Sigma 2 (59GB Xe3 UMA + OCuLink) & Cloudflare Clairic / Clef Extraction Runner" (run-sigma2-xe3-clairic-extractor.sh, SH) is paired with Tinker AI Lab's hardware-verified guide "lattepanda-sigma-2-core-ultra-358h-64gb-10gbe-oculink-and-cloudflare-clairic-clef-local-ai". It exposes 5 customizable browser variables (DEPLOY_MODE=clairic_vllm, CLAIRIC_MODEL=Cloudflare/clairic-flash, MAX_CTX=32768, P_NULL_THRESHOLD=0.65, SERVE_PORT=8000) with loopback-first security defaults.
01 // HOMELABLocal AI / HomeLab· Verified: 2026-11-19
Browse All 60 Artifacts →
run-sigma2-xe3-clairic-extractor.sh

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.

View Paired Guide →
Customizable Variables (Saved in Browser)
UTF-8 Encoded · Live Client-Side Compilation
#!/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
PARAMETER SPECIFICATION // 参数化变量规范说明表

Customizable Parameter Reference for run-sigma2-xe3-clairic-extractor.sh

This SH artifact exposes 5 template variables compiled client-side in your browser.

Template TokenParameter DescriptionVerified DefaultExample Format
{{DEPLOY_MODE}}Deploy Mode (clairic_vllm | sigma2_xe3_gguf | clef_router_dual)clairic_vllmclairic_vllm
{{CLAIRIC_MODEL}}HuggingFace Repo or Local Model PathCloudflare/clairic-flashCloudflare/clairic-flash
{{MAX_CTX}}Max Context Length3276832768
{{P_NULL_THRESHOLD}}Explicit Null Probability Threshold (p_null)0.650.65
{{SERVE_PORT}}Local HTTP API Port80008000
PAIRED HARDWARE MANIFEST // 配套实测环境与边界记录

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"

Tested Hardware & OS

LattePanda Sigma 2 (Intel Core Ultra X7 358H · Arc B390 12-Xe3 · 64GB LPDDR5X-8533 · Dual 10GbE · OCuLink · RP2350) ± OCuLink 24GB eGPU

Pinned Stack & Model Versions
Ubuntu 24.04.3 / Linux 6.14+ (Intel xe KMD)vLLM 0.12+ / OpenVINO 2026.3 / llama.cpp v1.0.0+Cloudflare/clairic (27B) & Cloudflare/clairic-flash (9B) [Apache 2.0]Cloudflare/clef (27B) & Cloudflare/clef-flash (9B) [Apache 2.0]
Offline Boundary (100% Private On-Premise Document Extraction, Routing & GPIO Control)

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.

Known Operational Limits & Failure Modes
  • 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.
DEPLOYMENT CHECKLIST // 配置落地核验步骤

3-Step Verification Checklist After Deploying run-sigma2-xe3-clairic-extractor.sh

  1. Verified /dev/dri/renderD128 under Linux 6.14+ (xe driver with 59GB shared VRAM ceiling) on LattePanda Sigma 2 and connected any OCuLink eGPU strictly while powered off.
  2. Configured downstream n8n / Python ingestion to inspect Clairic p_null (>= 0.65 -> explicit null / human review) and span offsets instead of blindly trusting extracted numbers.
  3. Pre-cached Cloudflare/clef-flash and Cloudflare/clairic-flash weights locally and exported HF_HUB_OFFLINE=1 for 100% air-gapped document processing.