Skip to content
Castellan
Castellan's icon

Concept · Castellan

Read as

Where the work runs: the NPU, graphics card and processor

How the staff share this PC's NPU, graphics cards and processor for their AI work, why the NPU or the processor is busy for a moment then quiet again, and how games come first.

Article
1106
Applies to
Castellan 0.17.52
Last reviewed
For
For everyone
Written for Castellan 0.17.52. Castellan is at 0.17.111 now (40 small releases since: what changed).

The local AI#

The staff use a small AI model to label, name, summarise and describe: what a screenshot shows, what a log says, what changed in an update. The model runs on this PC, never online, on one of its accelerators:

  • The NPU (neural processing unit), on PCs that have one, such as Snapdragon and recent Intel and AMD laptops. It does AI work using little power, without the processor or the graphics card.
  • A graphics card: a separate card, or the graphics built into the processor.
  • The processor, as a last resort for short requests.

The model only describes. Code still decides everything that matters: whether a test passed, whether a file is a duplicate, whether a program is signed. Where an employee shows you something the model wrote, it says so.

Castellan's setup sets the local AI up on this PC (see Your first day with Castellan), and the Smith looks after the model servers from then on. The setup weighs the PC first:

  • Graphics cards with memory of their own are set up. One that shares the PC's memory is set up only when there's no other.
  • An NVIDIA card with an older driver (before 551.61) gets a build that works with it.
  • On built-in graphics and the processor, the models stay within 40% of the PC's memory, since they share it. When they don't fit, the picture model is left out first, then the re-ranker that sharpens search, then the search model. When an update brings a newer model or server, or one has gone missing, the local AI is set up again by itself.

Every program the local AI runs is signed, by Castellan or by its maker, so a PC with Smart App Control on lets it run. If Windows still blocks one, its work goes to the next accelerator. While the manor is stopped from Settings, no model server runs.

Taking turns#

Every employee that uses a model takes turns on an accelerator, in line, instead of fighting over it:

  • The NPU comes first. A request the NPU can do waits for it, even while a graphics card is free. Two kinds of work go to the graphics card instead, on PCs whose NPU can't do them as well: pictures on an AMD NPU, and the sharper search's sorting of results on Intel and AMD. The graphics card starts for them when needed, and stops once it's done.
  • Someone waiting comes first. A request you're waiting on (a search you typed, say) goes ahead of background work. Background work that has waited two minutes takes its turn in order.
  • A turn lasts seconds. An employee that holds an accelerator too long is moved aside for the next in line.
  • A failing accelerator is skipped. If one stops answering, the work moves to the next for ten minutes, then it's tried again.

That's why the NPU, the graphics card or the processor is busy for a moment, then quiet again: it's one employee's turn, then nobody's. Windows' Task Manager shows the NPU's use on its Performance tab, on PCs that have one.

A full staff doesn't crowd the PC#

With every employee hired, the PC still isn't crowded:

  • Rounds are spread over the clock. Castellan plans a rota for each PC, so the staff's scheduled rounds don't all fall in the same few minutes. After you sign in, or the PC wakes, their first rounds start one after another, not all at once.
  • A model loads only when the PC has the memory for it. Otherwise its work waits.
  • At most 2 of the staff read text from pictures at once, or 4 on a PC with 24 GB of memory or more.

Games come first#

A gaming PC is for games first. While a game, or any full-screen 3D program, is using a graphics card, background work keeps off that card: it goes to another accelerator, or waits until the game is done.

Calls come first#

While Envoy captions a call on the NPU, the rest of the staff's background AI work waits for the call to end, so the captions keep up. It isn't moved to the graphics card or the processor meanwhile. A request you're waiting on still uses the NPU. When the call isn't translated, the NPU's models are put away once they've gone unused for two minutes, and their memory goes to the call.

Seeing who's using what#

Castellan's page shows it as it happens:

  • A badge for each accelerator in the title bar, named for what it is: NPU free, or GPU: Reeve while the Reeve is using the graphics card. The badges tuck away while the accelerators' cards are on screen, and come back when you scroll past them.
  • Accelerators, beside This PC: a card for each, with who holds it, for how long, when it should let go, and who's waiting, in the order they'll be served. It names the models it holds in plain words ("The search model"), and says when each unloads. In use means a program is working on it. A card marked Failed is being skipped for now; one marked as in use by a game is being kept clear.
  • The Work page, with developer staff hired, shows how busy each accelerator has been today: the time it spent working, how many requests, and how many tokens. Its line at the top says whether the NPU may work at full speed now, and if not, why (on battery, say, or another program using it).
  • About, in its Where the work runs tab, has a table of everyone you've hired: what it does on the processor, on a graphics card and with the model, and when.

Your choices#

Under Settings > The manor:

  • Background work: Go easy on this PC (the default) has staff new to the manor do their heavy first work one at a time (a first scan of every drive, a first look at every repository), and runs their scheduled work at low priority, so it gives way to whatever you're doing. Full speed runs everything at once, as fast as it can.
  • NPU work, shown only on a PC with an NPU. Full speed when this PC has room (the default) runs work the staff have lined up for the NPU back to back until it's done: the Clerk's captions and its game screenshots' descriptions, the Porter's notes, the Miller's highlights. It does so only while the PC is plugged in and cool, no other program is using the NPU (a video call's background effects, Live Captions, your own AI app), and there's memory and processor to spare, and whatever you ask still comes first. Only the rounds' own requests keeps the staff to their scheduled rounds' few requests.
  • Use the graphics card for models when there's an NPU, shown only on a PC with both. Off (the default), the graphics card stays free, even when the NPU fails, except for work the NPU can't do, or can't do as accurately, such as pictures on an AMD NPU: that starts on the graphics card when needed and stops once it's done. On, the NPU still comes first, and the graphics card takes only what the NPU can't do: longer requests, search indexing it doesn't serve, and a fallback when it fails.

The Smith's own page lists the accelerators it has set up, and sets up more. See The Smith, which keeps your local AI ready.

Is this page right?

If something on it is wrong or out of date, tell us and we'll fix the page.

Still stuck? Write to support@castellan-software.com and mention article 1106. Every version of Castellan, and what changed in it, is in its release notes.