Sense Garden: asking a tiny model what a word means right here

Community Article
Published June 13, 2026

"Bank" in "I sat on the bank" and "bank" in "I went to the bank" are different words wearing the same spelling. Word sense disambiguation is the task of picking which meaning is actually present in a given sentence. Sense Garden is a small browser tool that lets you do that interactively, in many languages, with a model small enough to run on your own machine.

image

Why build a demo instead of a classifier

I've been working on WSD with small models for actual academic use. A few months ago, during the Expedition Tiny Aya campaign, I captained a team that fine-tuned Tiny Aya two ways for it: one version that generates dictionary-style glosses (MikCil/wsd-tiny-aya-gloss) and one set up for multiple-choice sense selection (MikCil/wsd-tiny-aya-mcq). Both come off CohereLabs/tiny-aya-global.

Tiny Aya is an excellent subject for this. It's natively multilingual and very small, which is exactly the profile linguists and researchers want when they're testing whether a compact model can handle lexical semantics without a cluster behind it. Small models tend to do well on tightly scoped semantic tasks like this, and that's worth showing rather than just claiming! The problem with research models is that most people never see them work. Sense Garden is a sort of front door: it lets anyone poke at this kind of model on real sentences and watch what it does with meaning.

How it works

You load the browser-side models, pick a language, type a sentence, and select your target by clicking up to three contiguous word chips. Then you run one or both modes.

Pick retrieves candidate synsets from BabelNet, a large, multilingual lexical database, and asks Tiny Aya to choose the best fit for your sentence. This is constrained selection inside a real lexical inventory.

Generate asks Tiny Aya to write its own gloss for the word in context, then uses gte-multilingual-base to rank the associated BabelNet synsets by how close each one is to that generated gloss. This is free generation pulled back to a symbolic resource through embeddings.

Either way, the candidate synsets stay on screen with their original option numbers, so you can trace exactly what the model saw and what it chose. The point is to make the reasoning inspectable.

The technical knots

Both models run in the browser through Transformers.js and ONNX. Tiny Aya runs on WebGPU. GTE I moved to WASM, because running both on WebGPU caused memory and buffer contention and the second model would often choke. Splitting them across runtimes fixed it. First load is large, somewhere around 2 to 3 GB depending on which ONNX files the runtime picks and what's already in your browser cache.

The retrieval side is more finicky than it looks. The backend prefers WordNet-linked synsets: it first tries a narrow source=WN lookup over BabelNet, and if that comes back empty it does a broader query and inspects the full payloads, treating a synset as WordNet-linked if it exposes sources like WN, IWN, OEWN, OMWN_*, MCR_*, and similar. If WordNet-linked candidates exist, the non-WordNet ones get filtered out; if none do, it falls back to whatever BabelNet glosses are available. Getting multilingual sources like IWN and OMWN_IT classified correctly took a specific fix.

One caveat I surface in the UI: BabelNet works best with lemmas. If you feed it an inflected form and the candidates look wrong, type the lemma instead.

Where it sits

This is both a Backyard AI and a Thousand Token Wood entry, built with a custom frontend served through gr.Server rather than a default Gradio layout. I believe it fills a unique niche that is of actual interest to the linguistics scientific community: a clean, lightweight tool to test the efficacy of LLMs on semantic tasks without having to write a single line of code. A couple of colleagues gave it a thumbs up already! In addition, I wanted it to be fun and welcoming: the linguistic capabilities of Tiny Aya means you can use it to test complex multilingual messages, or even nonsensical words!

In short, it is a small, hybrid semantic instrument. The browser does the neural work, the server fetches symbolic lexical candidates, and you get to watch a tiny multilingual model decide what a word means in the exact sentence in front of it. For anyone curious whether small models can do real lexical semantics, this is a fast way to find out for yourself!

Try it here: https://huggingface.co/spaces/build-small-hackathon/sense-garden

Michele Ciletti Pre-doctoral Researcher in Computational Linguistics, University of Foggia

Community

Sign up or log in to comment