██╗ ██╗██╗███████╗███╗ ██╗████████╗ ██████╗
██║ ██║██║██╔════╝████╗ ██║╚══██╔══╝██╔═══██╗
██║ ██║██║█████╗ ██╔██╗ ██║ ██║ ██║ ██║
╚██╗ ██╔╝██║██╔══╝ ██║╚██╗██║ ██║ ██║ ██║
╚████╔╝ ██║███████╗██║ ╚████║ ██║ ╚██████╔╝
╚═══╝ ╚═╝╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═════╝
⚡ Ultra-Lightweight Distributed Edge Inference Mesh ⚡
Viento is the distributed AI inference mesh, powered by the featherweight Viento SDK (pip install -e SDK/ • CLI: viento).
Transform heterogeneous local workstations, cloud GPUs, and edge rigs into a unified, high-throughput, OpenAI-compatible AI cloud.
🌐 Live Mesh Gateway • 📖 Detailed How-to-Run Guide • 📊 Stress Test Reports • ⚡ Lightning AI GPU Benchmarks
🧭 The 5 Essential Questions
1. What is this?
Viento is an ultra-lightweight, high-performance distributed inference mesh that networks diverse machines—from developer laptops and homelabs to spot cloud GPUs—into a single, virtualized AI compute cluster. It exposes a drop-in OpenAI-compatible chat completion endpoint (POST https://viento.onrender.com/v1/chat/completions) and SDK base URL (https://viento.onrender.com/v1) backed by the Viento edge agent, which connects local inference engines (Ollama, vLLM, llama.cpp, PyTorch) via persistent, reverse asynchronous WebSocket tunnels.
2. Who is it for?
- AI Developers & Indie Hackers: Who want to serve LLMs locally or across free/cheap cloud GPUs (Lightning AI, Kaggle, Colab) and access them through any standard OpenAI client library without paying $100s/month to cloud providers.
- Startups & Teams: Who have multiple workstations or on-prem servers with RTX 3090/4090s and want to pool their compute into an internal API cluster for their engineers.
- Homelab & Self-Hosting Enthusiasts: Who want to run local models behind residential internet/NAT without messing with router port forwarding, DDNS, or exposing their home IP.
- Compute Providers & GPU Owners: Who want to monetize or share idle GPU capacity effortlessly with zero heavyweight daemon overhead.
3. Why would I care?
- 💸 Zero Cloud GPU Lock-In: Stop paying 24/7 pricing for idle cloud GPU instances. Turn on compute only when you need it, wherever you have it.
- 🪶 Ultra-Lightweight Footprint: The Viento agent consumes under 25 MB RAM and virtually 0% idle CPU. No heavy Docker engines required, no kernel modules, just pure asynchronous Python (
asyncio). - 🛡️ Instant Firewall Penetration (Reverse WSS Tunnels): Workers establish outbound secure WebSocket tunnels to
wss://viento.onrender.com/ws/runtime. No public IP, no open ports, and no NAT punch-through required. - ⚡ Instant Socket-Level Cancellation: If a user cancels a query mid-stream, Viento aborts the local engine's generation socket in
< 2 milliseconds, freeing your VRAM immediately instead of wasting GPU compute. - 📦 Zero Token Drop Guarantee: Invariant-tested backpressure queues ensure 100% of tokens arrive to the client intact even during heavy parallel traffic bursts.
4. How do I run it?
You can connect your local machine or cloud GPU to the live production mesh in 3 terminal commands:
# 1. Install the lightweight Viento SDK
pip install -e SDK/
# 2. Make sure your local engine is running (e.g. Ollama)
ollama run llama3:latest
# 3. Connect your node to the live mesh
export VIENTO_BOOTSTRAP_KEY=viento_dev_secret_key_2026
viento run --server wss://viento.onrender.com/ws/runtime
(For comprehensive instructions across Linux, Windows, vLLM, Lightning AI T4, and Kaggle, see the HOW_TO_RUN.md Guide.)
5. What do I do after running it?
Once your node connects, it registers its available models and outputs an authenticated session key. You can immediately:
- Query via OpenAI Python SDK: Point
base_url="https://viento.onrender.com/v1"with your session key to stream completions fromPOST /v1/chat/completionsin real-time. - Direct HTTP / cURL: Send chat completion payloads directly to
https://viento.onrender.com/v1/chat/completions. - Connect Developer Tools: Plug
https://viento.onrender.com/v1into Cursor, Continue.dev, Open-WebUI, LangChain, or LlamaIndex as a drop-in OpenAI replacement. - Scale Compute: Boot up additional instances on free GPUs (like a Lightning AI Tesla T4 or Kaggle notebook) to automatically increase your mesh's parallel capacity.
- Monitor Real-Time Hardware: Run
viento statusto monitor live VRAM, power draw, temperatures, and throughput across your active workers.
🌌 Core Philosophy: Featherweight & Blazing Fast
Traditional distributed AI frameworks require heavyweight distributed runtimes, Kubernetes operators, and static ingress controllers. Viento discards this bloat in favor of minimal, hyper-focused primitives:
- Asynchronous Reverse Multiplexing: Nodes maintain persistent HTTP/2 and WebSocket connections to the cloud gateway. Requests are dispatched downstream as lightweight binary/JSON frames and streamed back token-by-token over Server-Sent Events (SSE).
- Sub-Millisecond Stream Dispatch: Routing decisions and capacity checks occur in memory via
asyncio.Semaphoreguards, introducing negligible latency (< 1ms overhead). - Ephemeral Session Security: Workers receive temporary cryptographically scoped session keys (
vnt_tmp_...) with automatic TTL expiry, isolating clients without heavyweight key infrastructures. - Hardware Agnostic: Run FP16 weights on NVIDIA GPUs, quantized GGUFs on Apple Silicon with Metal, or CPU inference on edge devices seamlessly.
🏛️ System Architecture
Viento operates on a dual-plane architecture: a Cloud Control Plane Gateway hosted at viento.onrender.com, and distributed Viento Edge Runtime Nodes.
flowchart TD
subgraph Clients["Clients & Applications"]
C1["OpenAI Python SDK"]
C2["Web UI / Chatbot"]
C3["LangChain / Agents"]
end
subgraph Gateway["Viento Cloud Gateway (https://viento.onrender.com)"]
GW_API["REST API Router (/v1/chat/completions)"]
DISP["Multi-Tier Capacity Dispatcher"]
REG["Active Session & Model Registry"]
WS_HUB["WebSocket Hub (/ws/runtime)"]
end
subgraph Mesh["Distributed Worker Mesh"]
subgraph Node1["Edge Node A (Local Workstation)"]
V1["Viento Runtime Agent"]
ENG1["Ollama (llama3:8b)"]
end
subgraph Node2["Edge Node B (Cloud GPU - Lightning AI)"]
V2["Viento Runtime Agent"]
ENG2["vLLM (Tesla T4 - FP16)"]
end
subgraph Node3["Edge Node C (Edge Server)"]
V3["Viento Runtime Agent"]
ENG3["llama.cpp (Phi-3 Mini)"]
end
end
C1 & C2 & C3 -->|"HTTPS (SSE Streaming)"| GW_API
GW_API --> DISP
DISP --> REG
DISP --> WS_HUB
WS_HUB <-->|"Secure WSS Reverse Tunnel (Pydantic V2)"| V1
WS_HUB <-->|"Secure WSS Reverse Tunnel (Pydantic V2)"| V2
WS_HUB <-->|"Secure WSS Reverse Tunnel (Pydantic V2)"| V3
V1 <--> ENG1
V2 <--> ENG2
V3 <--> ENG3
🔬 Architectural Deep-Dive
1. Canonical Wire Protocol (Version 1.0)
All communication over the WebSocket mesh tunnel utilizes strictly validated Pydantic V2 Envelopes (extra="forbid"), preventing protocol injection and schema drift:
{
"version": "1.0",
"type": "job_request",
"message_id": "msg_8f12a0c49b1e",
"sequence": 42,
"timestamp": 1725301824.51,
"job_id": "job_a93f1208",
"request_id": "req_55b0a3f1",
"session_id": "vnt_sess_7a3d12c8",
"payload": {
"model": "llama3:latest",
"messages": [{"role": "user", "content": "Explain gravity."}],
"temperature": 0.7,
"max_tokens": 512,
"stream": true
}
}
- Monotonic Directional Sequencing: Ensures packet delivery order is verified across both directions.
- Heartbeat & Liveness: Nodes report hardware stats (CPU, RAM, GPU utilization, VRAM, and temperatures) every 15 seconds. If a node drops, the gateway re-routes jobs automatically.
2. Token Lifecycle & Zero-Token-Drop Pipeline
sequenceDiagram
autonumber
actor User as Client / App
participant Gateway as Cloud Gateway (viento.onrender.com)
participant Viento as Viento Edge Node
participant Engine as Local Inference Engine (Ollama / vLLM)
User->>Gateway: POST /v1/chat/completions (stream=True)
Gateway->>Gateway: Resolve model & match active worker node
Gateway->>Viento: WS Frame: JOB_REQUEST (job_id, prompt)
Viento->>Viento: Enqueue in FIFO Queue & check capacity
Viento->>Gateway: WS Frame: JOB_ACK (queue_position)
Viento->>Engine: Stream generation request via ExecutionHandle
loop Token Streaming
Engine-->>Viento: Token chunk delta
Viento-->>Gateway: WS Frame: TOKEN_CHUNK (token, index)
Gateway-->>User: SSE Chunk: data: {"choices":[{"delta":{"content":...}}]}
end
Engine-->>Viento: Generation finished
Viento-->>Gateway: WS Frame: JOB_COMPLETE (metrics, total_tokens)
Gateway-->>User: SSE Chunk: data: [DONE]
3. Atomic Concurrency Bounding & Backpressure Protection
Each Viento node protects itself from resource exhaustion using an internal multi-stage queue and semaphore supervisor:
asyncio.Semaphore(max_concurrency): Limits the number of parallel inference requests touching local GPU/CPU compute simultaneously.- Bounded FIFO Queue (
max_queue_depth=50): When incoming traffic surges beyond maximum queue depth, Viento immediately rejects excess jobs withJOB_ERROR (queue_full), signaling the Cloud Gateway to shed load or route to an alternate worker. - Instant Cancellation (
ExecutionHandle.cancel()): If a client cancels their request or closes their browser, the Gateway sends aCANCEL_JOBframe. Viento immediately closes the HTTP connection to Ollama/vLLM, terminating compute generation within < 2 milliseconds.
⚡ Cloud GPU Validation: NVIDIA Tesla T4
To prove Viento's cross-environment capability, the full system was launched and evaluated on a live cloud instance featuring an NVIDIA Tesla T4 GPU (16 GB VRAM) on Lightning AI:
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.173.02 Driver Version: 580.173.02 CUDA Version: 13.0 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
|=========================================+========================+======================|
| 0 Tesla T4 Off | 00000000:00:1E.0 Off | 0 |
| N/A 48C P0 26W / 70W | 1047MiB / 15360MiB | 12% Default |
+-----------------------------------------+------------------------+----------------------+
📈 T4 Benchmark Highlights
- FP16 Matrix Compute: 24.19 TFLOPS sustained on FP16 Tensor Cores.
- Model Loaded:
Qwen/Qwen2.5-0.5B-Instructin pure FP16 (cuda:0). - Cold Boot Time: Model weight loading into VRAM in 1.67 seconds.
- VRAM Footprint: Only 1,047.9 MB VRAM utilized.
- Generation Speed: 28.05 tokens/second generation throughput.
- Test Suite Execution: 71 of 71 unit tests passed in 4.11 seconds directly on the cloud GPU node.
📊 Concurrency Stress & Throughput Benchmarks
We subjected Viento's scheduling core to intensive burst stress tests across varying concurrency levels to validate backpressure enforcement and streaming fidelity:
| Concurrency Level | Total Requests | Total Tokens | Duration | Throughput | p50 Latency | p95 Latency | Dropped Tokens | Status |
|---|---|---|---|---|---|---|---|---|
| 1x | 5 jobs | 60 | 0.13s | 461.5 tok/s | 23.9 ms | 35.1 ms | 0 (0.0%) |
🟢 PASSED |
| 2x | 10 jobs | 120 | 0.13s | 894.6 tok/s | 12.3 ms | 18.1 ms | 0 (0.0%) |
🟢 PASSED |
| 4x | 20 jobs | 240 | 0.14s | 1,714.3 tok/s | 6.4 ms | 9.4 ms | 0 (0.0%) |
🟢 PASSED |
| 8x | 40 jobs | 480 | 0.15s | 3,237.0 tok/s | 3.4 ms | 5.0 ms | 0 (0.0%) |
🟢 PASSED |
| 16x | 80 jobs | 960 | 0.16s | 6,000.0 tok/s | 1.8 ms | 2.7 ms | 0 (0.0%) |
🟢 PASSED |
Detailed Report: See test_results/STRESS_TEST_REPORT.md and test_results/benchmark_report.json for full metrics.
🎯 Supported Inference Backends
Viento abstracts backend engines through a unified interface (InferenceBackend), allowing you to mix and match hardware transparently:
┌──────────────────────┐
│ InferenceBackend │
│ (Abstract Adapter) │
└──────────┬───────────┘
┌───────────────────┼───────────────────┐
▼ ▼ ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ OllamaAdapter │ │ VLLMAdapter │ │ LlamaCppAdapter │
│ • HTTP /api/chat│ │ • Async OpenAI │ │ • C++ Server │
│ • Auto Pull │ │ • PagedAttention│ │ • GGUF Quantized│
│ • Llama3, Phi3 │ │ • High Throughput││ • Pure CPU/Metal│
└──────────────────┘ └──────────────────┘ └──────────────────┘
- Ollama: Default adapter for local development. Auto-discovers local models and handles streaming chunks.
- vLLM: Optimized for multi-GPU cloud instances with PagedAttention and continuous batching.
- llama.cpp: Minimal footprint server adapter for quantized GGUF execution on CPU or Apple Silicon.
- HuggingFace Transformers: Direct in-memory execution for custom fine-tuned weights.
🚀 How to Run Viento
For full step-by-step instructions on running each component, connecting nodes, and deploying on cloud GPUs, read the dedicated guide:
👉 Read the Complete HOW_TO_RUN.md Guide 👈
Quick Command Cheat Sheet:
# 1. Install the lightweight Viento SDK
pip install -e SDK/
# 2. Start your local Ollama or vLLM engine
ollama run llama3:latest
# 3. Connect your node to the live production mesh
export VIENTO_BOOTSTRAP_KEY=viento_dev_secret_key_2026
viento run --server wss://viento.onrender.com/ws/runtime
# 4. Query the mesh via OpenAI SDK
curl https://viento.onrender.com/v1/models
🛡️ Reliability & Test Matrix
Viento includes an exhaustive automated test suite covering protocol invariants, network drops, session recovery, queue overflows, and concurrency stress:
- 79 of 79 Unit & Stress Tests Passing (100%):
test_backends.py: Backend adapter contracts & execution handles (7 passed)test_concurrency_stress.py: Burst bounding, backpressure, rapid cancellation, zero token drop (5 passed)test_e2e_mesh_stress.py: Pydantic V2 schema tampering defense & monotonic sequence validation (3 passed)test_ollama_adapter.py: Stream token dispatch, health checks, model discovery (7 passed)test_protocol.py: Wire serialization, deserialization, and payload invariants (26 passed)test_reconnection.py: Reconnect handshake, session resync, and backoff (10 passed)test_sdk.py: CLI commands, configuration manager, and scheduler draining (9 passed)test_telemetry.py: Non-blocking GPU metrics, thread-safe request counters, secret masking (12 passed)
# Run the test suite locally
pytest SDK/tests -v
🗺️ Roadmap & What's Next
- Canonical Wire Protocol V1.0 with strict Pydantic V2 schemas.
- Multi-engine backend support (Ollama, vLLM, llama.cpp).
- Live Cloud Gateway deployment on
viento.onrender.com. - Validated Cloud GPU execution on NVIDIA Tesla T4.
- High-throughput concurrency stress testing and zero-token-drop verification.
- Distributed Embedding model routing (
/v1/embeddings). - Intelligent Token-Aware Multi-Node Speculative Decoding.
- WebRTC P2P Direct Node-to-Client Data Channels for ultra-low latency.
📄 License
Viento is licensed under the MIT License. Built with ❤️ for decentralized, accessible, and ultra-lightweight AI computing.
Metadata
Release files for viento 0.4.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| viento-0.4.8.tar.gz | 69.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| viento-0.4.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 127.1 kB
Release files / viento-0.4.8.tar.gz
| Download URL | viento-0.4.8.tar.gz |
|---|---|
| Size | 69.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18c7e54f67b72ea5ee38c02ad1725d8d5dcecdd1b96433b79d979d78c20bad6c
|
|
BLAKE2b-256 checksum How to use checksums |
c5b4a5742ca74cf3ed41be905bd92cdced9801de97d40710649ab8b1f0fe85eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / viento-0.4.8-py3-none-any.whl
| Download URL | viento-0.4.8-py3-none-any.whl |
|---|---|
| Size | 58.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b871a470a0c2ef0a3d37f95aa6f7bdf9880cd266d7b6d3f5da38d86c0e0ec67
|
|
BLAKE2b-256 checksum How to use checksums |
1dfc4cb5c6b69bb66cfd175296e7258b71dfdafc3c2e8057e14b2e98b8c735cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|