DEV Community

Daniel K
Daniel K

Posted on

How I’m Adding Local AI Autocomplete to CanvasDesk: Laya, System One Models, and Node-Based Calculations

A blank canvas for a calculation diagram and instead of flow, your thinking gets stuck in manual routine.

You open the editor to quickly sketch out a service architecture or unit-economics. But instead, you start recalling the exact formula syntax, the name of a variable from a neighboring block, and scrolling through a catalog of 60+ templates. Your thinking is ready to work, but it grinds against manual routine.

A quick intro to CanvasDesk
CanvasDesk is my early-stage open-source pet project that almost no one knows about yet. It’s a node-based tool for visual mathematical modeling and calculation graphs.

If you haven’t encountered this class of tools before, here’s a quick onboarding. You assemble a diagram from nodes: blocks that can be formulas, data, operations, or templates. You connect them with links. Unlike a regular diagram, each node actually calculates the math. The graph becomes an executable model, not just a picture.

There are almost no services that can do visual mathematical modeling and also have a full-fledged node system. So CanvasDesk has to be explained from scratch — and that’s fine.

Recently, I started testing the assembly of large diagrams. In the video, you can see an example: a calculation diagram for a full-fledged e-commerce platform infrastructure with all internal systems and 1x, 3x, and 5x load scenarios.

Why regular LLMs don’t work
Large language models are not suitable for real-time suggestions. Their generation takes from one to three seconds. I wouldn’t want to wait that long for autogeneration: for autocomplete in an editor, it’s too slow and breaks the rhythm.

Jev from TypeSafe AI and Laya belong to another class — System One Models, models of “fast intuitive reactions.” They don’t unfold text token by token; instead, in a single pass they solve typed tasks: classify, rank options, and output a calibrated probability.

Jev sits in a closed cloud behind an API. Laya — a fresh open-source analog released under Apache 2.0 — is fully compatible with Jev over the wire protocol and runs locally.

Key parameters of Laya:

~421 million parameters;
ModernBERT architecture with a decision head;
latency around 33 ms on GPU;
200–450 ms on a regular office CPU;
does not require sending the diagram context over an external network.
For CanvasDesk in a B2B context, the last point is critical: a calculation diagram may contain sensitive data, and local inference makes much more sense than cloud inference.

What Laya gives CanvasDesk
The concept is extremely practical.

  1. Autocomplete for formulas and variables
    You’re typing a load calculation in a node. The system pulls variables from upstream nodes on the fly and suggests a ready-made formula verified by the local parser. You don’t have to manually remember a variable name or syntax.

  2. Next-node suggestions
    You place a load balancer template — the engine instantly suggests linking it to a message queue and a worker pool. Assembling a diagram becomes closer to a dialogue with the editor than to manually searching for blocks.

  3. Complexity tailored to role
    For an architect, it suggests queueing theory parameters. For a product manager, it suggests conversion funnels and cohort LTV connections. The same graph can show different suggestions depending on role and context.

Laya’s role: not a generator, but a smart dispatcher
Importantly, Laya’s job is not to generate fantasies. It should act as a smart dispatcher: pick the best patterns from the catalog in fractions of a second and return them only when confidence is high.

If the experiment takes off, assembling diagrams will stop being like laying asphalt by hand. CanvasDesk will be able to suggest the next step as naturally as an IDE suggests code autocomplete.

Previously how CanvasDesk started
https://medium.com/@dankuzmichev/canvasdesk-from-replacing-the-desktop-to-visual-mathematical-modeling-3d24e1f0c9b4

What’s next
For now, I’m wrapping Laya in a local Python-based sidecar. I’ll share test results and speed measurements in a separate post.

In the meantime, you can try the web version of CanvasDesk yourself:
https://danku13.github.io/CanvasDesk/app/

Source code is on GitHub:
https://github.com/danku13/CanvasDesk

Article about Laya and Jev with a demo:
https://medium.com/@visrow/what-is-laya-laya-vs-jev-with-live-demo-42c2ab494e02

If this topic resonates, I’d be glad to get feedback, ideas, and stars on GitHub. For an early pet project, that matters especially.

And you can connect with me via https://www.linkedin.com/in/daniil-kuzmichev/ or https://www.facebook.com/danku13

Top comments (0)