DEV Community

Cover image for Your Browser Can Do WHAT?! 5 AI Features That Actually Work

Your Browser Can Do WHAT?! 5 AI Features That Actually Work

Sylwia Laskowska on October 14, 2026

Are AI models running directly in the browser finally good enough to use in production? Let's find out! πŸ˜‰ It's been a week since my talk at FrontK...
Collapse
 
xulingfeng profile image
xulingfeng •

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Awww, thanks, Lingfeng! πŸ˜„β€οΈ I always say that the comments under my articles are better than the articles themselves! πŸ˜‚

Collapse
 
xulingfeng profile image
xulingfeng •

Love this! Great articles bring even better discussions πŸ˜„ I think just quietly reading along is really fun sometimes.

Collapse
 
gabrielsegura9 profile image
Gabriel Segura •

Thanks

Collapse
 
nyaomaru profile image
nyaomaru •

Really interesting article! 😸
I knew WebGPU existed, but I honestly wasn’t sure what kind of real-world scenarios it would be most useful for. Running AI models directly in the browser made it click for me, this is exactly the kind of workload where access to the GPU starts to make a lot of sense. πŸ‘

Right now, as you mentioned, browser AI probably works best as an optional enhancement because hardware and browser support still vary quite a bit.

But I can imagine a future where both machines and browsers become powerful enough that using several small, specialized models for different tasks becomes completely normal.

In that world, WebGPU might become a much more ordinary part of frontend development than it feels today. 😸

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Exactly! Honestly, not that long ago, running LLMs in the browser felt a bit like forcing a technology into a place where it didn't really belong. But things are moving fast!

One thing I'm really curious about is your point about WebGPU becoming an ordinary part of frontend development. Because, in my opinion, WGSL (the shader language) is... hard! πŸ˜‚ It's not particularly intuitive for someone who's spent most of their career programming for the CPU.

So I wonder how we'll solve this. Will we get higher-level libraries and abstractions that make GPU programming more accessible? We already have TypeGPU, but personally, I don't think it simplifies things all that much.

Or will we just let LLMs write our shaders? πŸ˜‚ But that's not a perfect solution either. If we don't understand what's happening under the hood, AI might fix one problem while introducing three new ones.

I'm really curious to see how this evolves!

Collapse
 
gramli profile image
Daniel Balcarek •

Great article, and a really interesting topic!

But I can’t help imagining a typical developer setup: multiple Chrome windows, 10+ tabs in each, and now some of those tabs running local AI models. And some customers are still using pretty old hardware, so Chrome could become a real PC performance killer (sometimes it already is, even without AI πŸ˜‚). Of course, it depends on the hardware and how the models are used.

I’m on my phone right now, but I definitely have to try the demos later!

Hmm, if there’s a background remover, there must be a background adder too, right? So how do we know you didn’t just make up those FrontKon photos? 🀣🀣🀣🀣 Just kidding, of course! 🀣

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Exactly! πŸ˜„ These are definitely features that make sense in specific scenarios, and ideally as optional enhancements rather than something every user has to run.

But to be fair, this isn't even the first time we're doing something like this! Chrome is already doing it for us by downloading a ~4 GB Gemini Nano model. πŸ˜‚ So downloading mysterious little AI models isn't exactly something we're not already doing. 🀣

And you're absolutely right about the photos! These days, a photo proves nothing. I could just as easily generate a picture of myself standing in front of the White House and claim I was there too! πŸ˜‚πŸ˜‚

Picked as gem
Collapse
 
gramli profile image
Daniel Balcarek •

Hm.., now that I think about it, smaller models could actually be pretty useful for Chrome extensions or even browser games hm..πŸ˜…

Yeah, I remember seeing quite a few articles about Chrome silently downloading an AI model in the background. A lot of people were angry about it, or maybe just concerned about privacy and security. πŸ˜ƒ

Thread Thread
 
sylwia-lask profile image
Sylwia Laskowska •

Oh, I'm definitely planning to write about Gemini Nano at some point too, because that's another really interesting one! πŸ˜„

And yes, Chrome extensions are a perfect use case! You don't even have to make users download a model every time they visit a website.

As for games, more and more things are being built with WASM + WebGL/WebGPU! And apparently, someone even managed to get Cyberpunk 2077 (or what is that exact number xD) running in a browser! πŸ˜‚ We're living in interesting times!

Collapse
 
kenwalger profile image
Ken W Alger •

Really interesting experiments, especially the contrast between semantic search and structured ticket generation.

I recently ran a somewhat related experiment on a Raspberry Pi 4, comparing two small local LLMs against deterministic baselines for tasks like order-ID extraction, classification, and document Q&A. One of the more amusing results was that regex extracted 30/30 order IDs correctly, while the two language models managed 28/30 and 8/30. It reinforced something I've been thinking about: before asking where we can run a model, it's worth asking whether the task needs that kind of model in the first place.

Your semantic-search example clearly illustrates the next step. Sometimes a small, specialized model is exactly the right tool, and running it in the browser offers some compelling privacy and deployment advantages. The ticket generator illustrates the other side: even with a model capable of interpreting natural language, producing reliable structured output still requires validation and an explicit review boundary.

I also appreciate that you included hardware failures and download costs, not just the successful demos. Local inference moves computation and some costs onto the user's device; it doesn't make those costs disappear.

One thing I'm curious about: if you were extending these experiments, would you consider benchmarking the model-assisted features against non-AI implementations of the same tasks? I'd be particularly interested in where the added model complexity starts to pay off.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

This is such a great comment! I especially love the regex example! πŸ˜‚ It's a perfect reminder that sometimes the simplest solution is actually the best one, and we really don't need an LLM for everything.

And I love your idea of benchmarking AI-powered solutions against traditional approaches! I'd be particularly interested in comparing semantic search with more traditional search methods. I think the results could be really interesting!

I have to admit, though, I've got quite a lot on my plate lately, so I'm not sure when I'll find the time for another round of experiments. πŸ˜‚ But if you're interested in exploring this yourself, please go ahead! I'd genuinely love to read about your findings!

And one more thing: I absolutely love how you put it, that running LLMs in the browser changes who pays the costs rather than eliminating them. That's such a good way to describe it! Because, of course, local AI isn't magically free. Someone still has to pay for all that computation. πŸ˜„

Thanks again for such a thoughtful comment!

Collapse
 
ujja profile image
ujja •

Fantastic article! This really resonates with me. 😍 I asked the same question at the beginning of the year: Has Anyone Actually Shipped a Free, Offline Mobile LLM?. Back then, there weren’t many answers, but we’ve come a long way since!

All my recent hackathon submissions now include an offline AI fallback because it’s cheap, handy, and surprisingly useful. It’s exciting to see how much more we can do with local AI now! πŸš€

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Oh, absolutely! 😁 When I was preparing my recent WebMCP talk, I also played around with local models and experimented with Gemini Nano. Really interesting model, and it even supports tool calling! πŸ˜„ Things are definitely getting exciting in the local AI space! πŸš€

Collapse
 
learn2027 profile image
meow.hair •

Hello Sylwia, thank you for this wonderful and highly practical article! πŸ—»

Your focus on user privacy, offline capabilities, and your honest take on the real-world limits of local models is truly refreshing. The demos are brilliant and inspiring.

I visited the repository β€” thanks for sharing the link. Starred it ⭐🌸

Looking forward to your future posts 😁
Wishing you continued success πŸŽ€

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Thank you so much! ❀️ I'm really happy you found it useful! And thanks for starring the repo! πŸ₯°

Collapse
 
maame-codes profile image
Maame Afua A. P. Fordjour •

The semantic search one surprised me the most. A 23 MB model doing that well is kind of wild. Also loved that you were honest about the ticket creator being harder than expected and the phone timing out, way more believable than the usual β€œAI can do everything” posts πŸ˜„ Just followed you on LinkedIn too!

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Thanks, Maame! πŸ˜„ Hahaha, exactly! Browser AI is still pretty far from being able to do everything! πŸ˜‚ And thanks for connecting on LinkedIn too! ❀️

Collapse
 
newadventuresinit profile image
Dirk Mattig •

Thank you for yet another highly interesting and entertaining article! This setup is an intriguing combination of technologies. WebAssembly as a fallback for WebGPU, not exactly the original goal of this technology, but this is how life goes.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Thank you! πŸ˜„ Well, you know, AI inference involves a LOT of matrix multiplication, and GPUs are particularly good at that. There's a reason why graphics cards are so ridiculously expensive these days! 🀣

Collapse
 
yaar_raj_52ad16766065d31c profile image
Yaar Raj •

Running heavy processes directly in the browser is fascinating. I completely agree with the point in the comments about using Web Workers so the main thread doesn't freeze. I've been focusing heavily on pure Vanilla JS lately to keep real-time text processing blazing fast without relying on bloated frameworks. For these intense in-browser features, do you think sticking to Vanilla JS is necessary for maximum performance, or is the overhead of React negligible compared to the WebGPU load?

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

I'd say the overhead of React is negligible in most cases. If inference runs on the GPU and React is mainly responsible for the UI, the framework itself usually won't be the bottleneck. Avoiding main thread blocking and unnecessary re-renders matters much more. So I definitely wouldn't give up React just to use WebGPU efficiently!

Collapse
 
yaar_raj_52ad16766065d31c profile image
Yaar Raj •

That makes perfect sense! Separating the GPU inference from the UI rendering definitely puts the React overhead into perspective. I completely agree that managing unnecessary re-renders is the real challenge there. Out of curiosity, when handling those heavy WebGPU tasks alongside React, do you prefer managing the state with native context or a lighter external library to avoid those re-render traps?

Thread Thread
 
sylwia-lask profile image
Sylwia Laskowska •

Honestly, I don't think you need an external state management library for this! 😁 In one of my demos, for example, I was just passing a tiny uniform to WebGPU. The heavy lifting happens on the GPU anyway, so I prefer keeping the React side as simple as possible. I'd only consider a dedicated state management solution if the application became complex enough to actually need one.

Thread Thread
 
yaar_raj_52ad16766065d31c profile image
Yaar Raj •

Ah, gotcha. Yeah, adding something like Zustand or context API just for that would definitely be overkill. Keeping the React side simple and letting the GPU do the heavy lifting makes a lot of sense. Appreciate the tip!

Thread Thread
 
sylwia-lask profile image
Sylwia Laskowska •

Haha, I'm actually working on a talk about WebAssembly, WebGPU, and React right now, and I'm starting to feel like the main takeaway is basically "keep all that stuff as far away from React as possible." 🀣

Collapse
 
sinarezaei profile image
Sina Rezaei •

The embedding-first approach makes sense, especially for an offline product. One thing I'd watch closely is how the retrieval pipeline behaves as the local index grows. Even if generating embeddings is cheap, storing them, updating stale vectors, and ranking results can become the real bottlenecks.

For a support-ticket system, I'd also benchmark retrieval quality against actual queries, including cases where users describe the same bug with completely different wording. A lightweight model that consistently retrieves the right ticket can be far more useful than a larger model that looks impressive in a demo.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

That's a really interesting point! And I completely agree, there are definitely questions around scalability, incremental updates, retrieval quality, and so on.

Of course, my demo is nowhere near production-ready (otherwise I'd be selling it instead of giving it away as a demo! πŸ˜‚). There's still a lot to test and optimize.

But I genuinely think this is a very promising direction worth exploring. Especially because, as you pointed out, the embedding model is so small! The relatively low cost of running it locally makes the whole approach particularly interesting. πŸ˜„

Collapse
 
sinarezaei profile image
Sina Rezaei •

One thing I find interesting here is the offline-first use case. Imagine a field-service app with thousands of repair manuals cached locally. You could generate embeddings on-device and search them without sending queries or documents to a server.

The tricky part is updating that local index when the embedding model changes. You'd need to keep the old index usable while rebuilding the new one, especially on devices with limited storage. That's where the small model size becomes a real architectural advantage, not just a nice demo feature.

Thread Thread
 
sylwia-lask profile image
Sylwia Laskowska •

Exactly! Offline-first is becoming an increasingly common approach, and I think this is a great example of where local AI could really shine!

As for rebuilding the index when the embedding model changes, that's definitely an interesting challenge. But I think it's worth distinguishing between updating documents and updating the model itself. While document embeddings may need to be refreshed regularly, replacing the entire embedding model would probably happen much less frequently.

In a real-world application, you could stick with a specific model version for quite a long time and only rebuild the entire index when a new model offers a meaningful improvement in retrieval quality.

Still, plenty of interesting architectural challenges to explore here!

Thread Thread
 
sinarezaei profile image
Sina Rezaei •

That distinction matters. Imagine a field-service app where technicians store repair logs offline, then sync them days later. A model upgrade could leave the local index with vectors generated by the old model while new queries use the new one. Even if the vector dimensions match, the embedding spaces might not, so retrieval quality could quietly degrade.

I'd version the model, tokenizer, and preprocessing pipeline together, then build the new index alongside the old one and run a retrieval evaluation before switching. For example, test whether a query like β€œhydraulic pressure drops after 20 minutes” still retrieves tickets describing the same fault as β€œpump loses pressure once the system heats up.” That kind of semantic mismatch is where a small offline model needs to prove itself beyond the demo.

Collapse
 
axrisi profile image
Nikoloz Turazashvili (@axrisi) •

I have found one more usecase, Sylwia :)

Collapse
 
axrisi profile image
Nikoloz Turazashvili (@axrisi) • • Edited
Collapse
 
axrisi profile image
Nikoloz Turazashvili (@axrisi) •

this is how I found your article, hehe :) would've miss otherwise.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Wow, this is cool!!!! 😍😍😍 Did you maybe write a post about it?

Thread Thread
 
axrisi profile image
Nikoloz Turazashvili (@axrisi) •
Thread Thread
 
axrisi profile image
Nikoloz Turazashvili (@axrisi) •

Maybe if you try it out and like it, you can help with exposure :)

If it's something worth for everyone on Dev to use, we could push it so more people see it and evaluate if they like it to install.

For me for couple weeks now it's part of the day. I find articles that wouldn't see otherwise. And it helps Dev.to overall with exposure and DAU/MAU metrics :)

Collapse
 
dannwaneri profile image
Daniel Nwaneri •

Thanks, Sylwia, for the code and the live demo. I will be testing the demos soon. I would ship the embedding model before the ticket model. Item 4’s embedding model is about 23 MB, nearly zero cost to the user, whereas the ticket model weighs in at 786 MB, with much higher cost.

Mobile data is not free for many users. It costs real money. I haven’t been able to test models in a browser yet, but file size is important for my project (StacksNG), which is completely offline.

Which two of your demos timed out on your phone? Did the semantic search work? I’ll let you know what I find out.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Hey Daniel, thanks for the comment! And you're absolutely right! Mobile data isn't free, and that's a really good point. One possible safeguard would be to only allow model downloads over Wi-Fi.

That's also why I think we're not quite at the point where we should rely on these models for mission-critical tasks.

On my phone, two demos didn't work: the ticket creation demo and the last one using the camera. The others worked, although they were noticeably slower than on desktop.

The exception was the embeddings model, which actually ran almost as fast as on my desktop! Although, to be fair, I had a WebAssembly fallback there. πŸ˜„

Looking forward to hearing how your tests go!

Collapse
 
sizzlebop profile image
Jessica Doering •

I love seeing more people experimenting with this stuff! I've been playing around with browser-based AI quite a bit myself, mostly with Transformers.js and WebGPU, and it's honestly amazing how much you can do entirely in the browser now.

I've also had my fair share of headaches with WebGPU compatibility, though. Getting something working beautifully on one machine doesn't necessarily mean it'll work on another, which makes the production side of things a little tricky.

I completely agree with your point about smaller, specialized models, too. Not everything needs a big LLM, and sometimes those tiny models are surprisingly good at one particular task. I think that's where browser AI has some really interesting potential, especially when you consider the privacy benefits of keeping everything local.

I haven't experimented with WebMCP yet, but it's been sitting on my ever-growing list of things I want to play with!

Really enjoyed the practical examples here, and especially that you included the limitations and things that didn't work out. That's just as interesting to me as the successful experiments.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Thank you so much! ❀️ And yes, I've had my fair share of WebGPU compatibility issues too, not just between devices, but even between browsers! πŸ˜‚ Especially when I was writing shaders myself. Sometimes something would work perfectly in Firefox but fail in Chrome! πŸ˜… Luckily, things have improved quite a bit over the past few months. I really believe WebGPU will eventually be supported everywhere. It's just a matter of time! 😁

Collapse
 
karandpr profile image
Karan Gandhi •

Saved for research future purposes.πŸ•οΈ

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

That's awesome! Hope it comes in handy! 😁❀️

Collapse
 
jabinpou profile image
Mahdi JabinPour •

The download sizes make the optional-enhancement argument very concrete. For the ticket creator, I’d want a visible download size and cancel button before loading nearly 800 MB, with the normal ticket form usable throughout. Cold-load UX seems just as important here as inference speed.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

That's a fair point! 😁 I think it's especially important on mobile devices, but on desktop I'm not entirely convinced a separate confirmation step is always necessary. I'd definitely show the download size and progress, though, and keep the regular form fully functional while the model loads. And of course, I wouldn't download 800 MB automatically without the user choosing to use the feature! πŸ˜… Cold-load UX absolutely matters, but I think the exact approach depends on the device and use case.

Collapse
 
jabinpou profile image
Mahdi JabinPour •

Fair distinction. Choosing the feature can be the consent step itself; an extra modal isn't always helpful. Clear size/progress and a working regular form are the important parts. Thanks for pushing back on that. I'd be glad to stay connected here and compare notes on practical web UX.

Collapse
 
bpecha14 profile image
Bogdan •

The ones that "actually work" always share a trait: they show you something you'd otherwise miss, instead of generating more noise. That's the bar I use for AI features now β€” does it reveal or does it just produce?

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

That's a really interesting way to look at it! I especially like the distinction between revealing something useful and just generating more content. We definitely don't need more noise. πŸ˜„

Collapse
 
bpecha14 profile image
Bogdan •

Exactly. The "reveal vs. produce" filter cuts through most AI feature hype. Revealing is also cheaper β€” you're surfacing what already exists instead of paying to generate more of what nobody asked for. That's honestly the design principle I'd put on a wall for anyone building AI tools right now.

Collapse
 
naveen_alavilli profile image
Naveen Alavilli •

This is a strong production framingβ€”especially treating local AI as an optional enhancement rather than a critical dependency.

One boundary I’d add from building an AI browser: local inference changes the data path, but it doesn’t automatically solve the trust problem. Model files and application code still arrive through a web supply chain, page content can be adversarial, and multiple tabs may compete for the same memory/GPU budget. For agentic features, I’d still keep side-effecting actions behind explicit capability checks and human confirmation, even when the model runs locally.

I’d also love to see benchmarks include cold-start download time, peak memory, battery impact, and cache eviction/reload frequencyβ€”not only inference latency. Of your examples, semantic search feels like the best first production feature: small model, clear fallback, measurable quality, and a real privacy win.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Exactly, I agree 100%! And I'd absolutely love to see benchmarks like that. Am I going to run them myself anytime soon? Well, I won't lie, probably not. 🀣 So if you feel like exploring this topic, please go ahead!

And yes, I completely agree about human confirmation for agentic features. Actually, as you can see, I'm taking an even more cautious approach by treating local AI as an optional enhancement rather than a critical dependency.

And I agree that semantic search is probably the winner here when it comes to real-world production use cases, although I think the background remover has the biggest "wow" factor.

Collapse
 
luke_bennett_ed52405c798e profile image
Luke Bennett •

played golf and i shot 4 hoels and i won the cup of wining

Collapse
 
fgrandon profile image
Francisco GrandΓ³n •

Your architectural split in practical-browser-ai - especially isolating each pipeline in its own lazy-loaded Web Worker and pairing Workbox CacheFirst range-request caching with strict human-in-the-loop review boundaries - nails the exact engineering reality of client-side inference right now. Digging through your repository documentation alongside the article, two low-level decisions stood out immediately: defaulting Xenova/all-MiniLM-L6-v2 (~22.7M parameters, ~23 MB quantized) to the CPU/WASM execution path to bypass initial WebGPU shader compilation overhead for small batches, and explicitly choosing q4 over q4f16 for onnx-community/Qwen2.5-0.5B-Instruct. While testing these failure modes locally in an onnxruntime environment, we reproduced that exact fp16 intermediate activation overflow (>65,504 in residual/MLP accumulations) where logits collapse into NaN and an argmax comparison loop defaults to token 0 ("!" in the Qwen vocabulary), emitting the dreaded "!!!!!" stream cited in microsoft/onnxruntime#26732 and huggingface/transformers.js#1317. Similarly, benchmarking your query ("My edits disappear after I leave the page") against a stemmed lexical baseline vs. L2-normalized 384-d unit-vector dot products (max|cos - dot| = 7.45e-9 at ~0.0085 ms for 22 docs and ~1.58 ms for 10,000 docs) shows how lexical matching gets zero-hit amnesia on "Auto-save not persisting form state" while a 23 MB encoder resolves it effortlessly.

Building on your struggle with Qwen2.5-0.5B-Instruct and structured output, recent benchmarking on small models (0.6B-4B) under grammar-constrained decoding (Outlines and XGrammar, Chavan 2026, arXiv:2609.23742) formally confirms what you discovered empirically: while token masking raises structural JSON schema validity from 92.9% to 100%, a scale-dependent semantic gap persists ("hollow rescue", where required JSON keys are present but populated with degenerate values or mis-ranked priorities). That makes your one-shot prompt + balanced-brace extraction + Zod coercion pipeline in parseTicket.ts - and your transparent decision to append Florence-2-base-ft context hints in code rather than hallucinating instruction-following on fixed <DETAILED_CAPTION> task tokens - the most resilient pattern available. This leads me to two questions: (1) With Transformers.js v4 (@huggingface/transformers) piloting the hash-based Cross-Origin Storage API (env.experimental_useCrossOriginStorage = true) alongside browser-managed Chrome Built-in AI (Gemini Nano), how do you see the boundary evolving between shipping app-specific ONNX weights in a PWA CacheStorage versus delegating general text/VQA tasks to browser-native APIs to avoid per-origin duplicate downloads of 400-800 MB models? (2) As you prepare your upcoming browser-based AI agents post, do you plan to keep tool-call validation purely in post-generation Zod recovery with ModelRegistry pre-flight checks, or are you tempted to pair a lightweight grammar bitmask (or a hybrid router where all-MiniLM-L6-v2 pre-filters intent before waking up the 0.5B generator) so a mobile GPU like the Galaxy S24 FE doesn't time out mid-thought?

At least by offloading inference to the client's WebGPU device, when Qwen2.5-0.5B hits an fp16 NaN existential crisis and screams "!!!!!" into the void, it's heating up the user's lap for free instead of burning your cloud bill at $0.002 per exclamation mark.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Wow, thanks for such a detailed analysis! πŸ˜„ And yes, I actually ran into that exact "!!!!!" issue with Qwen myself, so this made me laugh!

As for the browser-native APIs, I think that's definitely where things should be heading. I'd love to avoid shipping hundreds of MB of model weights per app whenever possible, while keeping app-specific models for more specialized tasks.

I'm also very interested in hybrid approaches, especially using smaller models for intent detection before involving a larger one. Still experimenting with that, though!

And haha, at least the GPU is suffering instead of my cloud bill! πŸ˜‚

Collapse
 
jacobfoster21 profile image
jacob foster •

Running AI models directly in the browser could improve privacy, reduce latency, and lower infrastructure costs. The real test is how well they perform across different devices and real-world use cases. Curious to see what you found!

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Exactly! 😁 And that's what I wanted to explore with these demos: what actually works today, what doesn't, and where the biggest limitations still are!

Collapse
 
onizuka profile image
Onizuka •

The WebGPU adoption number tracks with what I've seen β€” I ran a quick check last month across 12k visitors on a side project and only ~8% had WebGPU enabled in their browser. Most of those were Chrome on desktop. So yeah, it's fast when it works, but you're shipping a fallback path for 90%+ of users and that's the part nobody talks about. Would love to see the actual production numbers if you've shipped this to real traffic.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Thanks for sharing these numbers! That's a really interesting point, and I absolutely agree that browser support is something we need to consider. But I also think it depends a lot on the project and its target audience. For example, in the applications I work on, most users have WebGPU enabled, simply because they're primarily desktop applications. And in some scenarios, we can even make WebGPU support a requirement.

Also, WebGPU adoption is progressing, and this isn't exactly a new problem in web development. Remember when we had to transpile everything because browsers didn't fully support ES6? πŸ˜„ We're seeing similar challenges with newer technologies today. WebMCP is another interesting example: there's a lot of excitement around it, but people sometimes forget that it's still experimental!

That said, your point is absolutely valid. We need to consider actual adoption numbers, especially when building applications for a broad audience. And that's exactly why I keep emphasizing that, at least for now, browser AI shouldn't be relied on for mission-critical functionality without a reliable fallback.

Thanks again for bringing some real-world numbers into the discussion!

Collapse
 
blobdole profile image
Doug •

Although most of these are pretty cool, I would actually prefer your initial bug report in number three.

It has way more context, way more little side details that may or may not matter, and generally just more. Yeah, 90% of the bugs you submit will be read, immediately recognized, and pushed into a Bug#1234 bucket. But for those last 10%, the details can matter.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

I totally get your point! 😁 Unfortunately, you know how it is with support tickets. You have to fill in all those fields and end up spending half an hour figuring out what goes where. πŸ˜‚ But hey, that stream of consciousness could easily be stored in an additional field too! Anyway, I dream of a feature like this every single time I have to fill out a support ticket! πŸ˜…

Collapse
 
sikamikanikobg profile image
Arsen Apostolov •

the small specialized model beating the general one is the lesson that stuck with me here. i keep hitting the opposite problem β€” trying to squeeze a big model onto hardware that was never meant for it, and the quality drop shows up fast. the semantic search demo is the one i would actually ship. embedding a support ticket base locally and never sending it to a server is the privacy win that makes the whole local-inference pitch worth it. the webcam pause-and-ask is fun but i agree, not reliable enough for accessibility yet. transformers.js getting to this point in a year is the real story. the gap between "fun curiosity" and "actually useful" closed a lot.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Exactly! I was also genuinely surprised by how well semantic search works with these local models! And it's not just about privacy. We don't always have internet access, after all. Some people spend hours using apps out in the field, often with little or no connectivity. So having these features work entirely offline can be a huge advantage!

Collapse
 
rolltok profile image
rolltok •

Really practical exploration. I especially agree with positioning these as "optional enhancements, not critical dependencies"β€”that's exactly where browser-based AI makes sense right now.

We've hit similar tradeoffs at RollTok when experimenting with local inference: model size vs first-load experience. The models you picked (RMBG-1.4 at 44M, MiniLM-L6 at 22M) strike a good balance between parameters and performance.

Quick question on your Semantic Search case: have you run into multilingual scenarios with all-MiniLM-L6-v2? In our tests, it works great for English-heavy docs, but embedding quality drops noticeably with mixed Chinese-English content. If your use case involves multiple languages, you might need to consider variants like multilingual-MiniLM.

Also, the Background Remover case is interestingβ€”170MB model running in-browser is definitely more private than calling an API, but I'm curious about actual performance. In my tests, WebGPU acceleration makes a huge difference. Did you optimize for fallback when WebGPU isn't available?

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Thank you! I haven't tested multilingual semantic search yet, but you're absolutely right about the limitations of all-MiniLM-L6-v2. A multilingual model would definitely be a better choice for that use case!

And yes, I do have a WASM fallback for the Background Remover! I even tested it on mobile. The initial loading time is painfully slow πŸ˜‚, but once everything is loaded, it actually works pretty well! Of course, WebGPU makes a huge difference in performance, but I always try to include a fallback whenever possible.

Collapse
 
mrcasetoo profile image
Mr-Casetoo •

Really interesting article! Running AI directly in the browser has huge potential for privacy and cost savings. Semantic search and background removal are especially impressive. Great insights into both the possibilities and limitations of browser-based AI! πŸš€

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Thank you so much! 😁 Those two demos are actually my favorites too! A lot of people in the comments have also pointed out that the tiny semantic search model would be perfect for apps that need to work offline. And I totally agree!

Collapse
 
alewx profile image
alex •

how do you handle model size vs init latency on low‑end devices, especially when swapping between on‑device inference and a remote fallback? also, what's your strategy for keeping the wasm bundle size down without sacrificing quantization accuracy

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Good questions! 😁 For these demos, I mostly relied on Transformers.js to handle the inference runtime, so I didn't implement any custom WASM bundle optimizations or local-to-remote fallback logic. My focus was more on exploring what we can realistically achieve with existing tools and smaller models. For low-end devices, I think choosing the smallest model that does the job well is a good starting point. As for the WASM internals and quantization trade-offs, that's probably a question better suited for the Transformers.js or ONNX Runtime maintainers! πŸ˜„

Collapse
 
vinmay profile image
Vinmay Nair •

Great read! I was experimenting with EmbeddingGemma 2 and built a small browser game for the ongoing hackathon: doppel-ws59.onrender.com/. I'm using embeddings and cosine similarity to find images that are semantically close even though they're completely different things. Was pretty interesting to see how much I could do with vector similarity right in the browser!

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

That's so cool! 😁 I really think embeddings have a lot of potential in the browser, especially for offline use cases! πŸš€

Collapse
 
heytechomaima profile image
Omaima Ameen •

I feel like the privacy and offline capabilities alone make this worth exploring and I really like your point about treating these as optional enhancements rather than blindly depending on them in production, not every problem needs a massive AI model, sometimes a small specialized one does the job better.
definitely something worth experimenting with!!

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Exactly! Maybe one day we'll be able to rely on them for production-critical features, but I don't think we're quite there yet! 😁

Collapse
 
heytechomaima profile image
Omaima Ameen •

yesss!! waiting for your next article on this now ☺genuinely loveee your writing 🌸

Thread Thread
 
sylwia-lask profile image
Sylwia Laskowska •

Awww thanks a million ☺️

Collapse
 
samii profile image
Waqas Ahmed Waseer •

Great article and an honest set of demos. One angle I haven't seen in the thread yet: when inference moves into the browser, you lose your server-side eyes. Today, if a backend model starts returning garbage or latency spikes, your dashboards catch it. With in-browser inference, there's no telemetry coming back by default β€” you're flying blind about which models fail on which GPUs, how often the WASM fallback kicks in, or whether users silently give up during a 786 MB download on a flaky connection. And the browser can evict those cached weights without telling you, so "works offline" quietly becomes "re-downloads everything" for some fraction of users you'll never hear from. To ship this responsibly you'd need a client-side telemetry layer (on-device quality sampling, versioned model manifests, download/abort analytics) built with the same privacy care as the inference itself. That ops work is arguably harder than the demos β€” and I suspect it's the real gap between "impressive experiment" and "production feature." Would love to see a follow-up on what you'd actually instrument if one of these shipped to real users.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Oh, that's an excellent point! I completely agree. We definitely need client-side analytics and monitoring, just like we do on the backend, especially in larger projects. And things get even more complicated when you have to account for different devices, GPUs, browsers, and fallback mechanisms. πŸ˜…

I also think the privacy aspect is particularly interesting here. We want to move inference to the browser partly to protect user data, so we need to make sure our telemetry doesn't undermine that benefit.

And you're absolutely right, getting a demo to work is one thing, but making it reliable in production is a completely different challenge. This could actually be a great topic for a follow-up article! 😊

Collapse
 
indigotime profile image
Indigotime •

I don’t know why, but the potential of offline AI generation in a browser-based form is still very poorly realized. The technology exists and can be demonstrated in benchmarks, but there are very few solutions that ordinary users can actually use.

Right now, I’m looking for a browser-based solution that can run a model for converting plain text into ArgDown. The model itself already exists. Specifically, I’m looking for a browser-based solution that doesn’t need internet access to run or process prompts. And what do I find? Lots of projects that seem to promise this, but can’t run locally from files. So they’re not really browser-based at all - they’re self-hosted. In my case, that’s not a dealbreaker, since I’m looking for something that works with WebExtensions, and browser extensions don’t have this problem. Still, someone might need a browser-based solution that runs locally without requiring an extension.

And the surprises may not stop there: the code might import scripts from centralized CDNs like jsDelivr, which effectively makes the solution unusable without an internet connection.

So it seems easier to build yet another hack that requires users to set up local inference with LM Studio or something similar than to build a proper extension. But that’s exactly what I’d rather avoid.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

I totally understand your frustration! πŸ˜„ But I think it's worth distinguishing between three things: browser-based inference, fully offline execution, and running an application directly from local files without a server. They're not necessarily the same thing.

For example, you can have an application served over HTTP that performs all inference locally, without sending any user data to a backend. And with Service Workers, you can take it a step further and make the entire application work offline, as long as all the required assets, including model weights, are cached locally.

My demos don't have Service Workers YET πŸ˜…, but the versions I used at conferences did! They worked completely offline. In fact, I didn't even connect my laptop to the internet during the presentations.

That said, I completely agree with your point about hidden dependencies like external CDNs. If your application still needs to fetch scripts or other resources from the internet, it's not truly offline. And making something work in a demo is definitely easier than delivering a reliable, fully offline experience for real users! πŸ˜„

Collapse
 
suresh_kumar profile image
Suresh Kumar •

Woow, Pretty cool stuff! I think the semantic search and background remover could be really useful in everyday projects. The best part is that everything runs in the browser without sending your data to a server. The model download sizes and performance on different devices might be a bit of a challenge, though. Definitely interesting to see how this develops.

Keep it up & thanks alotπŸ˜€

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Thank you! πŸ˜„ And exactly, performance across different devices is probably the biggest challenge here. That's where semantic search really shines, because the model is so small! 😊

Collapse
 
kansoldev profile image
Yahaya Oyinkansola •

I actually never knew about running local AI models in the browser. This really looks promising, but as you mentioned, the heavy load they carry in terms of size will be a drawback, joined with the fact that they are not fully functional on mobile devices. It's interesting to see where this goes from here.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Exactly! 😁 Many technologies started with limited support, and now we can't imagine our lives without them. I'm really curious to see how this one evolves!

Collapse
 
neithergalax profile image
neitherGalax •

Really interesting project. Is the repository open source, and are you welcoming contributions as of now?

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Thanks! 😁 Yes, the repository is open source, and contributions are definitely welcome! These are primarily educational demos, so I'd love to see improvements, bug fixes, or experiments with different models. Feel free to open an issue or PR!

Collapse
 
neithergalax profile image
neitherGalax •

Thanks for clarifying. I noticed the repository doesn't seem to include a License file, so I’m curious how contributors can use, modify, and share the code.

Collapse
 
kartik-nvjk profile image
Kartik N V J K •

RMBG-1.4 at about 170 MB is smaller than I expected for background removal that clean, and running inference in a Web Worker so the UI stays responsive is the detail I'd copy first. I've mostly treated in-browser models as toys, so calling them optional enhancements, like Florence-2 drafting alt text, makes sense to me. How long does that first model download take on a mid-range phone?

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

On a phone, it actually takes quite a while, around a minute! πŸ˜… The other models are pretty quick, except for the semantic search one. But I expect things to improve, especially now that WebGPU is becoming available in mobile browsers, including on iPhones!

Collapse
 
julianneagu profile image
Julian Neagu •

The semantic search demo is the one I'd ship first too. I've found that small tools work best when they solve one clear problem, and keeping the data on-device is a nice bonus. The model size makes this much easier to roll out.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Exactly! I was genuinely surprised by how well it works myself!

Collapse
 
quirkyt profile image
TomNighy • • Edited

Ok... I thought about creating a JavaScript version of my inference engine, but discovered it would be useless in a webbrowser.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

That's definitely possible! 😁 You should check out ONNX Runtime Web. It might be exactly what you need for this experiment!

Collapse
 
quirkyt profile image
TomNighy • • Edited

Oh... I didn't know you replied before I edited my comment above. πŸ˜„ I'll look-up the ONNX Runtime. Thanks for the tip!

Thread Thread
 
sylwia-lask profile image
Sylwia Laskowska •

Hahaha, that's because it was such a great comment! πŸ˜„

Collapse
 
usernamevalid profile image
Shirley •

Solid, practical survey. Treating browser AI as optional enhancements rather than a required backend replacement is the right framing.
The demos that stand out most are the specialized ones β€” especially semantic search with a small embedding model and background removal. Those show where local models already deliver clear value without needing frontier-scale LLMs. Keeping humans in the loop for structured outputs (ticket fields, alt text) is also the sensible production pattern.
The limitations section is equally useful: WebGPU unevenness, first-load model sizes, and mobile timeouts are exactly the constraints teams need to plan for. Caching helps on return visits, but the initial download still matters.
Nice to see the full code and live demos shared. Makes the β€œactually works” claim easy to verify.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Thanks so much! 😁 I completely agree, smaller, specialized models are where in-browser AI really shines right now. And yes, the initial download and performance across different devices are still major challenges. Hopefully, we'll see some improvements there soon!

Collapse
 
anne_jacobs_ac166227aa92b profile image
anne jacobs •

This is a refreshingly honest and practical look at browser AI.

Most pieces either hype local models as β€œthe future” or dismiss them as toys. You did the useful middle path: built five real features, measured what actually works, and was transparent about the gaps (model sizes, mobile WebGPU, inconsistent quality on structured output and contextual alt text).

Semantic search with the tiny embedding model and the background remover feel especially production-viable right now as optional enhancements. The Smart Ticket Creator is the one that best illustrates both the promise and the friction β€” getting reliable structured output from a 0.5B model is still more prompt + validation work than people expect.

Appreciate the clear β€œoptional enhancement, not critical path” stance. That’s the right framing for 2026.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Thank you so much, Anne! ❀️ That's exactly what I wanted to show with this article! I think browser-based AI has reached a point where we can start building genuinely useful features with it, but we still need to be realistic about its limitations. And yes, the Smart Ticket Creator was definitely a good reminder that getting a model to generate something is one thing, but getting reliable, structured output is a whole different challenge! πŸ˜‚ I'm really excited to see where we'll be a year from now!

Collapse
 
mudassirworks profile image
Mudassir Khan •

The WebGPU to WASM fallback is doing more work than the headline. Most tutorials ship WebGPU only β€” graceful degradation is what makes this production viable on devices without GPU access yet.

Also the Web Workers architecture is the unglamorous detail nobody demos. Inference on the main thread means your UI freezes halfway through a sentence. Offloading that before you add features rather than retrofitting it later is the call most teams get backwards.

Curious if you hit cold start latency on the first inference call? Loading 44M params even compressed has a perceptible pause on slower connections. Did you add any loading UX or let it be?

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Exactly! I keep saying that WebGPU still needs a fallback! And yes, of course I added a loading state so users know the model is being loaded. It's pretty basic, since this is just a demo and not a production app, but informative enough! πŸ˜„ And I totally agree about Web Workers. They're an absolute must here!

Collapse
 
mandeepsng profile image
mandeepsng •

This looks good. What can I use it for? Is it only for web applications, or is it possible to use it for other things as well?

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Unfortunately, this particular implementation is web-only, but the same concept can definitely be applied to native apps too!

Collapse
 
luke_bennett_ed52405c798e profile image
Luke Bennett •

Thats not good.

Collapse
 
harsh2644 profile image
Harsh •

What a fantastic article SylwiaπŸ’– I knew about WebGPU and Transformers.js but I always assumed browser AI was still a fun toy. Your article changed that view completely.

The Smart Ticket Creator demo is what sold me. Watching a 500M parameter model turn messy text into structured JSON, all locally without an API call, feels like a glimpse of where things are going.

Curious: did you find any specific trick that helped with JSON consistency, or was it mostly prompt engineering plus Zod validation?

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Thank you so much! ❀️ That was actually the hardest part! πŸ˜‚ And yes, it was mostly prompt engineering combined with Zod validation. But I've heard that newer models are getting better at generating structured outputs, so hopefully this will become much easier in the near future! 😁

Collapse
 
chebit profile image
CheBit •

I'll be honest β€” I had never looked into browser-based AI before this, and I didn't know any of it was possible. Reading this was a genuine surprise.

What made it click for me is the semantic search example. A 23 MB model doing something more useful than keyword search is a much lower barrier than I assumed this kind of thing had. It made me think about things I could actually try, not just read about.

My background is mostly backend and ordinary frontend work, so I'm starting from zero on WebGPU and Transformers.js. If someone wanted to learn this properly, what would you point them to first β€” the Transformers.js docs, or something else you'd recommend before that?

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Hey, thanks for your comment! 😁 If you're interested in running AI models in the browser, the Transformers.js docs are definitely enough to get started! If you want to dive deeper into WebGPU itself, that's a whole different story involving shaders and GPU-specific code. But honestly, I don't think you need to go that deep unless you have a specific reason to. It's worth understanding what WebGPU is and how it works, but you don't need to master it to start building cool things with browser-based AI! πŸ˜„

Collapse
 
kenneth_atienza profile image
Kenneth Atienza •

a new food for a thought for me! this is a very interesting read tbh πŸ˜„

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Thank you! I'm so glad you enjoyed it! 😊

Collapse
 
effessdev profile image
EffessDev •

Wow A live demo? You got my star!

Collapse
 
effessdev profile image
EffessDev •

This is seriously impressive!

That's something I would actually use!

By the way, currently it shows "removed" on the original side and "original" on the "removed" side.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Hahaha, you're right! πŸ˜‚ I'll have to fix that later! But come on, you have to admit it's ridiculously fun to play with! 🀣

Collapse
 
kalkazuorg profile image
kalkazu.org •

congratilations ! 🀩

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Thanks ☺️

Collapse
 
stefan_07d23f966225156b50 profile image
Stefan •

Thanks for sharing this! πŸ™Œ

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

πŸ₯°πŸ₯°

Collapse
 
pawan_yadav_2cddc6c71564d profile image
Pawan Yadav •

I think a browser can't stream rtsp sources..

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

You're right, browsers don't support RTSP natively. You'd need something in between to convert the stream to WebRTC or another browser-compatible format. But my demo uses getUserMedia(), so it doesn't need RTSP at all.

Collapse
 
flisk profile image
flisk •

cool!

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Thanks!

Collapse
 
fredbrooker_74 profile image
Fred Brooker •

I've tried the background remover, it failed miserably and removed everything πŸ˜‚

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Hahaha, sorry about that! πŸ˜‚ Maybe fork the code and try a better prompt? πŸ˜…

Collapse
 
yin_shen_da63da1b36a19d13 profile image
yin shen •


Can Do everthing i want.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Ah, clever!!!

Collapse
 
jamba_denio_a1e41218e9f01 profile image
Lee Nio •

I like this.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Thanks 😊

Collapse
 
gabrielsegura9 profile image
Gabriel Segura •

You can spend quite some time with that background removal, this used to be a painful process in Photoshop, back in the old days.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Hahaha, oh yes, I remember those days! πŸ˜‚ And the result often looked so obviously cut out, you could spot it immediately! πŸ˜…

Collapse
 
technogamerz profile image
π“π‘πž π‹πšπ³π² 𝐆𝐒𝐫π₯ •

I don’t know why, but looking at these images makes me happy πŸ˜…

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Aww it's so sweet! Indeed, I was very happy there ☺️

Collapse
 
rakibutsho profile image
Md. Rakibul Islam •

It was an interesting article.

Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Thanks a lot ☺️

Collapse
 
bruce_xu profile image
Bruce Xu •

The background remover demo is the one that surprised me most β€” 44M params for that quality is genuinely impressive, and the β€œphoto never leaves the device” angle is the right selling point for e-commerce use cases. I've been poking at browser-side segmentation too and built a small pure-frontend background remover at wtoolskit.com/zh/background-remover/ β€” different model stack, but same bet that on-device inference is finally good enough for this specific task. Your licensing note on RMBG-1.4 is a good reminder that the model layer is still the messy part

Collapse
 
quinnhacks profile image
Quinn Foster •

The third one surprised me β€” I assumed it was a gimmick until I used it on a real page. Devtools AI explanations are genuinely handy for unfamiliar CSS.

Collapse
 
qart2003 profile image
qart2003 •

Hi, I cretaed a libraries. AI cretaed an article about it via md and html version. Can I post here md files?