Two options. Both wrong.
When you build an AI product that needs to answer questions from visual inputs — reading text, identifying objects, understanding scenes — you eventually face a hard architectural choice. It usually arrives during your first serious cost review, or the first time an investor asks "what happens to your margins at scale?"
The first option is pure cloud inference. You send every query to a large model (Gemini, GPT-4o, your own hosted VLM) and get back a high-quality answer. Accuracy is excellent. But you pay per token, every time, at full cloud-GPU pricing. Costs scale linearly — or worse — with your user base.
The second option is pure on-device inference. You run a small model directly on the user's device. Costs drop dramatically. But small models make more mistakes. For anything where accuracy matters — reading a medication label, identifying a hazard, verifying a compliance procedure — this is often not acceptable.
The table below makes the tradeoffs concrete. Neither classic option is acceptable for a production AI product that needs to scale economically while maintaining accuracy that users actually trust.
| Architecture | Accuracy | Cost at scale | Data privacy | Latency |
|---|---|---|---|---|
| Pure cloud API | Excellent | Scales linearly, expensive | Data leaves device | Round-trip delay |
| On-device only | Degrades significantly | Near zero variable cost | Fully private | Very fast |
| Oculosense hybrid | Identical to cloud | ~50% lower than cloud | Data processed locally first | ~35% faster |
What if the device and the cloud cooperated?
The breakthrough insight is this: the expensive part of cloud inference is token generation, not token verification.
A large language model generates tokens one at a time, sequentially. Each token requires a full forward pass through billions of parameters. That sequential process is what makes cloud inference slow and expensive.
But verifying whether a proposed token is correct — checking that a candidate answer matches what the large model would have produced — is dramatically cheaper. You can check multiple candidate tokens in a single parallel forward pass.
This is the foundational insight behind speculative decoding — a technique that has been validated rigorously in academic research (EAGLE-3, NeurIPS 2025; MASSV, Cerebras 2025; SpecVLM, 2025) and that we have productized into a working system deployed across 350+ devices in real-world conditions.
Two models. One answer. Zero compromise.
The system has two components that work together on every query. We call them the drafter and the verifier.
The drafter
The drafter is a small vision-language model that lives entirely on the user's device — a phone, a tablet, or an edge box attached to a camera. It sees the same image, receives the same query, and generates a rapid guess at what the answer should be: four to eight candidate tokens, produced in milliseconds using the device's onboard AI chip (NPU).
The drafter costs nothing to run per query — it uses the customer's own hardware. But it's a small model, so its guesses won't always be correct.
The verifier
The verifier is our full-scale, fine-tuned vision-language model running in our cloud. It receives the drafter's candidate tokens and checks all of them in a single parallel forward pass. This is far cheaper than generating those tokens from scratch — the model only needs to evaluate, not create.
Tokens the drafter got right are accepted for free. Tokens the drafter got wrong are replaced by what the verifier would have generated. The final output is exactly what the cloud verifier alone would have produced.
A mathematical proof, not a promise
Every other cost-reduction strategy in AI inference makes a tradeoff with accuracy. Quantization loses a small percentage. Distillation loses more. Smaller models lose significantly. These are engineering tradeoffs, not architectural ones.
Speculative decoding is different. The output is provably identical to running the full verifier model alone — not because the drafter is perfect, but because the mathematical rejection sampling procedure guarantees that any incorrect drafter tokens are overridden.
Rejection Sampling Theorem
The core guarantee comes from the rejection sampling theorem. Here is the intuition without the formalism:
For each candidate token the drafter proposes, the verifier computes how likely that token would have been under its own distribution. If the drafter chose a token the verifier would have chosen with high probability, it is accepted. If the drafter chose a token the verifier would have chosen with low probability, it is rejected and replaced with one sampled correctly from the verifier's distribution.
P(output | our system) = P(output | verifier alone)This equality is exact, not approximate. It holds regardless of how good or bad the drafter is. A perfectly accurate drafter just means more accepted tokens and faster responses. An inaccurate drafter means more rejections and more verifier work — but never incorrect output.
This is why we say the accuracy is mathematically guaranteed, not engineered. The system's correctness is a consequence of the mathematical structure, not of implementation quality.
Where exactly the cost saving comes from
Understanding the cost reduction requires understanding how cloud GPU billing actually works. You pay for compute time — specifically, how many forward passes your model runs, and how expensive each one is.
The cost saving is structural, not contingent. Even if the drafter proposes all wrong tokens (worst case), the verifier still only runs one verification pass instead of generating all tokens sequentially — you still save roughly 30–40% on compute. When the drafter's acceptance rate is high (typically 65–80% in our production deployments), savings approach 50%.
The use cases where this changes the economics
Not every AI application benefits equally from this architecture. The gains are largest in deployments that share three characteristics: high query volume (the cost saving compounds), accuracy requirements too high for on-device-only (which rules out the cheap alternative), and privacy or latency requirements that push toward device processing (which rules out pure cloud).
Assistive vision wearables
Users make 30–80 queries per day. Accuracy on real-world scenes (currency, menus, signage) must be near-perfect. Processing locally first protects sensitive personal visual data.
Always-on security monitoring
Cameras generate 86,400 frames per day. 96% are uninteresting. Device-side filtering + cloud verification for suspicious frames brings monitoring cost to consumer-accessible pricing.
Regulated manufacturing compliance
Pharma, food safety, and industrial quality applications require both high accuracy (regulatory) and data sovereignty (compliance). The hybrid architecture satisfies both simultaneously.
Robotics and edge agents
Robots and autonomous agents query visual understanding thousands of times per hour. Cost-per-inference is directly tied to operational economics. Accuracy cannot be traded away for cost.
1,000+ devices. Real conditions. Six years of data.
The architecture is only meaningful if it works outside controlled environments. We have deployed the foundational edge-cloud inference stack — the technical foundation for this speculative decoding system — across more than 350 Drishti Vision smart glasses serving visually impaired users across India.
These deployments run in conditions that benchmark labs do not replicate: 40°C summer heat, dust, intermittent 4G connectivity, 100+ Indian languages, unpredictable camera angles, and real-world scene complexity. If a system works for users who depend on it for independence and safety — not convenience — it works.
The production data from this deployment informs every aspect of our commercialization — from the drafter's training distribution to the routing thresholds that decide when to escalate to cloud. Three years of real-world inference is a data asset that no research lab replicates.
Building an edge AI product?
We're opening the EdgeVLM SDK to design partners. Early access for teams building on vision-language models.
Research this work builds on
- Li et al. (2025). EAGLE-3: Scalable Speculative Sampling via Multi-draft Collaboration. NeurIPS 2025. arXiv:2503.01840
- Ankner et al. (2025). MASSV: Multi-Adaptor Self-Speculative Decoding for Vision-Language Models. Cerebras Research. arXiv:2505.10526
- Chen et al. (2025). SpecVLM: Fast Speculative Decoding in Vision-Language Models. arXiv:2509.11815
- Wang et al. (2025). ViSpec: Vision-Aware Speculative Decoding. arXiv:2509.15235
- Venkatesha et al. (2025). Fast and Cost-effective Speculative Edge-Cloud Decoding with Early Exits. arXiv:2505.21594
- Chen et al. (2023). Accelerating Large Language Model Decoding with Speculative Sampling. Original rejection-sampling proof. arXiv:2302.01318