We changed the model.
And came to understand the task in a new way.
In May, this space held an article about Phi-4-mini-instruct. Since then, a different small language model has been running in the Smart Assistant: Qwen3, specifically Qwen3-4B-Instruct-2507. Compressed, it takes up around 2.28 GB and runs directly on the Mac, using Apple’s technology for AI computations (MLX). This text tells how that came about — with the detours, the discarded ideas and what is still missing today.
11-minute read · August 2026
Swiftli editorial team · reviewed by Adrian Pahl
What we wrote in May
The May article was a comparison: local language model versus cloud service, data protection versus convenience, response time versus quality. At the time, Phi-4-mini-instruct was our choice. It was small, it ran on any reasonably recent Mac, and it answered questions about using the software surprisingly well.
The article had a blind spot, and it was not in the model. It was in us. Back then, we were thinking about answers — about a system that answers questions about the software. What we actually had to build was something else: a translator.
The task was different from what we thought
A rota is not purely a text task. It is an optimisation problem with hard and soft constraints: rest periods, working-time limits, minimum staffing per station, holidays, employment percentages and qualifications. A plausibly worded model suggestion is not yet a rota approved in legal or operational terms. In our early attempts, constraints were not reliably observed.
So we split the task. Today, the rota is calculated by a rule program that always produces the same rota from the same information. Selected rules from the Employment Act, the Code of Obligations and the L-GAV are held there as verifiable conditions. Completeness, applicable special rules and the specific rota must still be checked by someone with the relevant expertise before approval.
What remains for the language model is exactly one task, and it is a narrow one: a manager types “the boss never works on Sundays” into a field. The model translates this sentence into a planning condition that the rule program understands and that is checked beforehand. 16 rule types are defined for this — the translator knows no other forms, and it does not invent any. If a sentence fits none of them, it is rejected rather than bent.
The model does not roll the dice on the rota. It translates a sentence — and if it does not understand the sentence with certainty, it says so instead of guessing.
Why Qwen3 instead of sticking with Phi-4
Once the task was defined this narrowly, the criteria changed. We no longer needed a model that chats well. We needed one that reliably delivers answers in a fixed format, that can be cleanly retrained with our own data and that does more than politely brush past the four national languages.
The last point tipped the balance. We wanted to train a separate adapter for each national language, and the foundation of language understanding has to come from the base model — an adapter does not teach a language its grammar, it aligns existing ability to a task. For Romansh and written Swiss German, the difference in the starting material was clear enough to justify the effort of switching.
Today, the model in use is Qwen3-4B-Instruct-2507, compressed to four bits (quantised). The model takes up around 2.28 GB on disk. It runs via Apple MLX, i.e. directly on the Mac’s graphics unit, without a detour via a server.
2.28 GB
The entire language model, compressed and run directly on the Mac.
16
Defined rule types. The translator knows no other forms — and does not invent any.
13'750
Examples in the training of the German adapter — Swiss German and Standard German.
6 of 16
Rule types the planner does not yet enforce. The honest status, not the brochure.
A model is a supply chain
The most unpleasant part of the switch had nothing to do with language. A language model is downloaded — and anything that is downloaded is a supply chain that someone can attack. “Runs locally” does not mean “arrived safely”.
We therefore pinned down three things. First: a fixed model revision. Not “the latest version”, but a specific, named state. Second: digital fingerprints (checksums) for the base model and for each adapter, stored in the app. Third, and this is the point that matters: the principle “when in doubt, blocked”. If a checksum does not match, the assistant does not start at all. There is no “load anyway” switch, no warning that can be clicked away.
This is inconvenient. An interrupted download means the assistant remains silent until it has been properly reloaded. We consider this the right kind of inconvenience: a model that generates planning constraints for personnel data is no place for “it'll probably be fine”.
Four adapters, four national languages
On top of the base model sit four in-house adapters — German, French, Italian, Romansh. An adapter is a small, additionally trained supplementary layer: it does not change the base model, it aligns it to a specific task in a specific language.
The German adapter is trained on around 13'750 examples — as a Swiss German version that also covers Standard German. This was not an optional extra but a necessity: house rules are not typed in Standard German. They are typed the way people talk in the business — “d'Chefin schafft nie am Sunntig”. A translator that fails at this is worthless in everyday use.
The Romansh adapter is fully developed, to the same depth as the other three. That is rare, and it is economically hard to justify — the number of businesses that actually need it is limited. We built it anyway. Software made for Switzerland cannot treat the fourth national language as a footnote.
The detour we didn't want at first
Our first version sent every sentence through the language model. It was elegant in theory and unnecessary in practice: a large proportion of the house rules that are actually entered follow a few recurring patterns. Calling on a language model for “no double shifts at the weekend” is roughly like convening a meeting for a sum.
Today, processing takes place in two stages. First, the input is matched against fixed search patterns — always the same, instant, without calling the model. Only what is not caught there goes to the language model. The model is the fallback, not the main path. This is faster, more economical and, above all, it means the most common case is the easiest to check.
Reject rather than guess
A decision we argued about for a long time: what to do if a name is not unique? If two employees are called “Meier” and the rule only says “Meier never works on Sundays”?
The tempting answer is to take the more likely one — the one with more shifts, the one edited most recently. We don't do that. Ambiguous names are rejected, and the user is asked. A wrongly assigned name creates a rule that runs silently in the rota and, for months, assigns someone Sundays they never agreed to. A follow-up question costs ten seconds. The other mistake costs trust.
What we took out again
There was a version in which every single shift carried a justification: why this person, why this station, which rule was decisive. In terms of substance, that was correct. In terms of usability, it was a mistake.
Anyone opening a monthly rota sees a few hundred shifts. A few hundred justifications alongside them do not create transparency but noise — and each one invited people to question the rota at exactly that point, even though the justification named only one of many factors at work. The feedback was clear: more confusion than benefit.
So we removed them from the interface. Not toned down, not collapsed — removed. The check against the set of rules continues unchanged; it is just no longer shown as a comment on every shift. It is harder to throw away work that functions than work that fails.
What is not yet right today
Three points that would not appear in a brochure.
- The planner does not yet enforce six of the sixteen rule types. They can be entered and are translated correctly, but the rule program does not yet force them into the rota. Anyone relying on them is relying on something that does not yet hold.
- “No internet needed” only applies after the one-off model download. The 2.28 GB has to reach the device once. After that, the statement is entirely true — before that, it is a simplification, and for a while we used it too readily.
- The search patterns are manual work. Every new pattern is a deliberate extension. That is the price of the most common case being the easiest to check — but it is work that is never quite finished.
What we learned from it
The real progress of recent months was not the change of model. It was the realisation of how small the role of the language model must be for the result to be reliable. It does not plan. It does not decide. It translates a sentence into a verified condition — and if it is unsure, it asks.
It is an unspectacular task. But it is verifiable, it is reversible, and it can be explained to a business manager in two sentences. For personnel data in a Swiss business, that is worth more than any capability that can be demonstrated impressively but not proven.
Whether the next article will describe another switch, we don't know. Either way, it will not claim that everything is finished this time either.
Sources and further reading
- huggingface.co/Qwen/Qwen3-4B-Instruct-2507 — model card of the base model in use today
- ml-explore.github.io/mlx — documentation for MLX, Apple’s technology for AI computations
- fedlex.admin.ch — Employment Act (SR 822.11), official text of the Act
- l-gav.ch — official platform for the National Collective Employment Agreement for the hospitality industry
- Phi-4 and ChatGPT in the cloud compared — the earlier model status as a snapshot in time
Further reading
- The local language model in Swiftli Smart HR — feature overview and the distinction from the cloud.
- Rota and rule checking — the planning on the Mac as described.
The quickest way to see how the Smart Assistant Planner works day to day is to look at your own rota. Sixty minutes, no slides.