Spaces:
Running
Running
|
Download README.md from IDKHowToCodeFr/vera-engine: direct link, hf CLI and curl.
- Browser
- Download file 3.42 kB
-
https://huggingface.co/spaces/IDKHowToCodeFr/vera-engine/resolve/main/README.md
- Command line
-
hf download hf://spaces/IDKHowToCodeFr/vera-engine/README.md
-
curl -L -o README.md https://huggingface.co/spaces/IDKHowToCodeFr/vera-engine/resolve/main/README.md
3.42 kB
metadata
title: Vera Engine
emoji: π
colorFrom: blue
colorTo: purple
sdk: docker
app_port: 8080
pinned: false
π Vera Engine v1.0
High-Performance AI Orchestrator optimized for the magicpin Vera AI Challenge.
ποΈ 1. The Architecture
The system operates on a highly optimized, deterministic fail-fast fallback cascade to guarantee sub-30-second responses on constrained Hugging Face Spaces (2vCPU / 16GB RAM) without compromising reasoning quality.
π 4-Tier Fail-Fast Cascade
Instead of relying on a single point of failure, the engine delegates composition to a highly available 4-tier chain:
- Tier 1 (Speed & Intelligence): NVIDIA NIM (
nvidia/nemotron-3-ultra-550b-a55b) - 5s timeout. - Tier 2 (Fast Failover): Groq (
openai/gpt-oss-20b) - 4s timeout. - Tier 3 (Secondary Failover): Gemini (
gemini-2.5-flash) - 4s timeout. - Tier 4 (Local Airgap): Natively executed
qwen2.5-7b-instructorqwen2.5-3b-instruct(based on system latency) viallama-cpp-pythonwith strict LlamaGrammar enforcement.
Dynamic Time Budgeting If an API returns a
401or429, the orchestrator immediately short-circuits to the next tier. Cloud timeouts are strictly capped at 13 seconds cumulative worst-case, reserving a guaranteed 14-second budget for the local airgapped model.
β‘ 2. Pipeline Strategy
- Context Distiller: Instantly processes 500KB+ JSON payloads into dense factual bullet points in
< 0.001s. - LLM Expander: Takes strict facts and expands them into compelling, natively conversational WhatsApp replies (supporting Hinglish code-mixing).
- Auto-Repair Loop: Automatically intercepts taboo violations, word-count breaches, and CTA proliferation, dynamically calculating time budgets to fire an intra-tier self-correction prompt before failing over.
- Strict Schema Constraints: Hardware-level
LlamaGrammar(Local) andjson_objectformat (Cloud) guarantee zero JSON parsing failures.
π 3. API Contract
| Endpoint | Method | Purpose | Response Schema |
|---|---|---|---|
/v1/healthz |
GET | Compliant Liveness Probe | {"status": "ok", "uptime_seconds": 100} |
/v1/metadata |
GET | System Identity | {"version": "1.0", "model": "..."} |
/v1/context |
POST | Elastic Context Ingestion | {"accepted": true} |
/v1/tick |
POST | Atomic Trigger Processing | {"actions": [...]} |
/v1/reply |
POST | Escalated Shield Handling | `{"action": "send |
π οΈ 4. Technical Stack
- Framework: FastAPI / Uvicorn (Port
8080) - Local SLM Execution:
llama-cpp-python(Pre-compiled CPU Wheels) - Models:
Nemotron 3 Ultra 550B,GPT OSS 20B,Gemini 2.5 Flash,Qwen2.5 7B/3B - Infrastructure: Dockerized
python:3.10-slimon Hugging Face Spaces