# Wisp

Source: /projects/wisp

![Wisp logo and mascot](/projects/wisp-logo.svg)

# Wisp

Wisp is a small decision model built to help teams moderate a community. Give it a message, a username or a report, along with a question and the permitted answers: it chooses one and scores each option. It writes nothing and sanctions no one. It prepares the team's work locally, without sending conversations to an external service.

-   [![GitHub repository for the Wisp project, including its Rust code, Python package, and documentation.](/projects/wisp-card-github.png)**Source code**Rust server, Python package, and documentation.](https://github.com/notnotebox/wisp)
-   [![Hugging Face card for the Wisp v0.1.2 4B model, a decision adapter based on Qwen3.5 4B.](/projects/wisp-card-hf.png)**Model**Adapter, model card, and full evaluation.](https://huggingface.co/notebox/wisp-v0.1.2-4b)

1.  [Context](#contexte)
2.  [Scope](#perimetre)
3.  [How it works](#fonctionnement)
4.  [Results](#resultats)
5.  [Execution](#runtime)
6.  [Test bench](#benchmark)
7.  [Data and limitations](#limites)
8.  [Roadmap](#suite)
9.  [Approach](#demarche)
10.  [Built with](#stack)

## Context

Moderating a community requires human time, which is limited. Reviewing hundreds of conversations and reports is tedious, and most cases require no action.

Keyword filters have known limitations: a joke between friends triggers a sanction, while a slightly disguised insult goes unnoticed. A report, on the other hand, is not proof: it may lack context, be multiplied, or be abusive.

> A stricter system is not necessarily fairer.

Wisp addresses this problem with an initial analysis that distinguishes situations without deciding for the team. The goal was neither the most performant model nor an infallible one, but a very lightweight model kept locally and adapted to your own rules.

## Scope

What Wisp does

-   analyze a message, a username, or a report
-   answer a closed-ended question: review, category, severity, validity
-   always choose one of the proposed options
-   provide a relative score for each option

what it does not do

-   draft a response
-   apply a sanction
-   practice on private server data
-   publish raw training data

Wisp's classification is never a sanction. Moderation policy remains within the application, which decides the follow-up based on its own thresholds, from the most discreet to the most engaging.

what the application can do with a classification, from the most discreet to the most engaging

1.  **No action**The case is closed without further action.
2.  **Internal signal**Retained to identify recurring situations, with no effect on the player.
3.  **Human review**A moderator reviews the case and makes a final decision.
4.  **Temporary measure**Reversible, and only if the application's policy allows it.

## How it works

A request consists of four blocks: the rule to apply, the state to evaluate, the question, and the allowed options. Each option receives a single-token symbol. A single model pass suffices: the logits for these symbols are read, then a softmax assigns a score to each.

a request, a pass

```
CONTEXT   server policy or built-in rule
STATE     message, username, or report
QUESTION  "Should a moderator review this?"
OPTIONS   A. REVIEW   B. NO_ACTION

→ logits for A and B → decision + scores
```

These scores rank options but are not calibrated probabilities: a score of 0.9 does not mean 'correct nine times out of ten'. Below 0.7, Wisp raises a needs\_review flag. REVIEW means 'submit this case for review' and never permits punishment.

## Results

Each system receives the same state, the same question, and the same options, in the same order. The main panel contains 202 questions: 82 written for the project, supplemented with samples from ToxicChat and Civil Comments.

- **main panel, 178 out of 202**: 
- **over Qwen3.5 9B, twice its size**: 
- **fresh panel, 98 out of 107**: 

Accuracy on the 202-question panel (truncated axis)

76 %80 %84 %88 %92 %Wisp v0.1.2 4B88.1 % · 178Qwen3.5 9B · base82.2 % · 166Qwen3.5 4B · base80.7 % · 163Jev 1.1379.2 % · 160

Accuracy by task: where Wisp leads, and where it falls behind

#### Moderation in context

n=38

-   Wisp v0.1.2 4B**89.5 %**
-   Qwen3.5 9B**92.1 %**
-   Qwen3.5 4B**84.2 %**
-   Jev 1.13**92.1 %**

#### Historical figure usernames

n=24

-   Wisp v0.1.2 4B**91.7 %**
-   Qwen3.5 9B**83.3 %**
-   Qwen3.5 4B**70.8 %**
-   Jev 1.13**87.5 %**

#### Violation category

n=20

-   Wisp v0.1.2 4B**100.0 %**
-   Qwen3.5 9B**85.0 %**
-   Qwen3.5 4B**80.0 %**
-   Jev 1.13**100.0 %**

#### ToxicChat sample

n=60

-   Wisp v0.1.2 4B**93.3 %**
-   Qwen3.5 9B**85.0 %**
-   Qwen3.5 4B**88.3 %**
-   Jev 1.13**70.0 %**

#### Civil Comments sample

n=60

-   Wisp v0.1.2 4B**76.7 %**
-   Qwen3.5 9B**71.7 %**
-   Qwen3.5 4B**75.0 %**
-   Jev 1.13**70.0 %**

On a targeted test set of 162 questions (lexical roots, quotes, misleading words, obfuscations), Wisp answers correctly on all 162. This is a diagnostic, not an estimate of reliability under real-world conditions. The questions follow Wisp's prompt format, which favors it, and the panel was also used to compare adapters during development; the new panel of 107 questions was written after the model freeze and run only once.

## Execution

The main runtime is a Rust server built on Candle. It loads the fused adapter into base weights and requires no Python at inference. A Python package, wisp-decide, remains available for machines where the Rust server cannot run.

Candle needed some work for this particular model. I profiled the pinned Qwen3.5 implementation, then added a depthwise convolution path, a chunked prompt scan, and a fused CUDA prefill kernel for prompts up to 1,024 tokens. Those are local changes to Wisp's Candle build, not a general claim about Candle. They are documented alongside the runtime, with ways to switch back to the original paths for comparison.

The short requests Wisp is built for made that work useful. In a local check with the base model, Candle took 54 ms against 97 ms for Python at 64 tokens, and 83 ms against 118 ms at 256. Python was faster at 512 and 1,024 tokens. The two runtimes also use different weight precision in Wisp's own request check, so I treat these numbers as a view of this setup, not a promise for every machine.

But speed is only part of why I chose this path. So much of AI development happens in Python. I like the thought that someone working in Rust, with different tools and different habits, might find a way through a problem that the usual path has not revealed. If we keep exploring more than one language and runtime, we give ourselves more ways to think and build. That is the part of Candle I want to support, and why I spent time improving this implementation rather than simply accepting its first limits.

- **version**: v0.1.2 4B, experimental, under Apache-2.0 license
- **routes**: /decide, /v1/moderate, /v1/username, /v1/models, /health
- **hardware**: Windows with CUDA; a 12 GB graphics card is sufficient
- **latency**: around one-tenth of a second per decision on short queries
- **consistency**: Python and Candle agree on the same option in 7 out of 8 cases of a fixed control

Local measurements, which do not constitute a general throughput guarantee. Rust is faster on short texts, which is Wisp's use case; Python regains advantage on long texts.

## Test bench

To position Wisp against other models, Wisp Benchmark submits exactly the same query to two systems and displays their responses side by side: decisions, relative scores, disagreements, and latency. The tool has its own page.

-   [![Actual capture of the Wisp Benchmark interface, including its logo, form, and comparison controls.](/projects/wisp-benchmark-card.png)**Wisp Benchmark**Compare two decision systems on the same query.](/projects/wisp/benchmark)

## Data and limitations

The training data was generated for the project. Approximately 1,000 random English questions were manually verified, and datasets like generation prompts were corrected multiple times. The adapter was trained in two stages on 9,506 typed questions, distributed across 13 families.

known limitations

- **mild insults**: direct but moderate insults are under-detected
- **informal language**: slang, language alternation, quotes, and local norms
- **context**: limited to the few preceding messages provided in the state
- **scores**: not calibrated; needs calibration on its own data before setting a threshold

## Roadmap

Priorities are ordered without announced dates. Each is designed for all languages: built, trained, and measured with a score per language, rather than first in English then translated.

1.  **Calibrated scores**Today, scores rank options without indicating how correct the model is. The goal is to adjust temperatures after training, by question family, using a separate calibration dataset from training data and evaluation panels, then measure calibration error before and after so thresholds are chosen based on evidence.
2.  **Better detection**Mild insults directed at someone remain under-detected, as do certain disguised or abbreviated insults. Work focuses on targeted data and more difficult contrast pairs, on underrepresented categories (extremism, impersonation, spam), and on longer context of around twenty messages.
3.  **More languages**The nine current languages must expand, with scenarios written in each language rather than translated from English, and accuracy reported per language and question family, on a sufficiently large panel to be meaningful.
4.  **An independent evaluation**A larger panel, written and labeled by people other than the authors, kept separate from training and run once per version, with comparisons on the same query against other systems.
5.  **A larger model_optionnel_**A variant of around 9B only makes sense if the data and evaluation are solid enough to justify it. Comparisons with Qwen3.5-9B have already been made and a variant is part of the trials, but it's not the priority.

## Approach

Wisp is also a learning ground: data preparation, training, evaluation, and deployment are treated as concrete, measurable mechanisms rather than a black box.

The project addresses a real need, that of a community whose experience we ourselves build.

I also wanted to give Wisp its own visual identity. This sketch shows an initial logo track, with the typography and mascot.

![Visual intent sketch for Wisp: logo, typography, and first mascot idea.](/projects/wisp-intention.png)

Sketch of an initial track for the Wisp logo.

> I had imagined a thinking animation for the mascot, in the spirit of indicators seen on some assistants. For now, Wisp answers so quickly that there's no need to make it wait: no thinking animation for the logo.

## Built with

- **training**: [PyTorch](/stack?tech=pytorch#tech-pytorch)[Transformers](/stack?tech=transformers#tech-transformers)[PEFT](/stack?tech=peft#tech-peft)[QLoRA](/stack?tech=qlora#tech-qlora)
- **inference**: [Rust](/stack?tech=rust#tech-rust)[Candle](/stack?tech=candle#tech-candle)
- **distribution**: [Hugging Face](/stack?tech=hugging-face#tech-hugging-face)

[next project**Wisp Benchmark**](/projects/wisp/benchmark)
