Repository navigation
RECOMMENDATION_DESIGN
Status: Superseded
Last Updated: 2026-11-13
Audience: Developers and coding agents
Last verified: 2026-11-13 against 5f40af2d9; current replacement links and source owners checked; historical proposals are not current behavior.
Code: Current replacements: src/Martlet.Core/Planning/, src/Martlet.Core/Preferences/UserPreferences.cs, src/Martlet.Core/Settings/, src/Martlet.Core/Installation/, src/Martlet.Conversation/Guides/, src/Martlet.Desktop/
Historical record: This page preserves an earlier design. Its plans and some details do not describe current behavior. Use Recommended setups for the current recommendation flow.
Martlet asks the owner three simple questions and finds everything else itself: the hardware, the other computers, the model apps already running and the saved keys. Then it makes three plans at once:
- Normal: the usual setup.
- While gaming: the same setup with the gaming PC's graphics card left free for the game.
- Host away: the setup when a host computer doesn't answer.
Martlet changes between the three plans by itself while it runs. PcActivity
already finds games, and the Thinking pool and backup routes already move the
work. The owner makes no choices about models, quantizations, context sizes or
graphics cards. An owner who wants to choose can still do it and lock the
choice.
-
"Do you play games or use heavy apps on this PC?" Yes or No. Martlet
selects Yes when it finds a game library (Steam, Epic, GOG and others).
This sets
MachineSpecs.KeepGpuForGames, which exists but nothing sets today, and turns on the While gaming plan. -
"May Martlet use free online services?" Never / Only as a backup (the
default) / Yes, when they're faster or smarter. This replaces the wizard's
two choices today and maps to
HostingPreferenceplus a new backup level. - "What matters more in a conversation?" Quick replies / Balanced (the default) / Smarter replies. This sets the reply quality level (below).
Martlet does not ask about models, memory, graphics cards or hearing.
The answers are saved as the owner's recommendation preferences. Today the
wizard's answer is not saved, and Recommended setup guesses it from the saved
keys (RecommendedSetupInputs). With this setting, Recommended setup always
plans with what the owner chose.
| Preference | Values (default first) | What the planner does with it |
|---|---|---|
| Reply quality | Balanced / Quick replies / Smarter replies | Live Thinking's first-word target: 0.4 s, 0.25 s or 1.0 s. Quick replies also prefers the smaller of two models within one quality step; Smarter replies prefers the smarter one |
| Online services | Only as a backup / Never / Yes, when they're faster or smarter | Never: no hosted option anywhere. Backup: hosted options only in the While gaming and Host away plans and for Deep thinking. Yes: hosted options compete with local ones |
| Games or heavy apps | For each companion PC: Yes or No (Martlet's guess first) | Sets KeepGpuForGames for that PC and makes its While gaming plan |
| Prefer models that hear you | On / Off | Off removes the hearing preference; the model gets the transcript |
| Host graphics card share | Up to 90% / Up to 75% / Up to 50% | How much of each host card Martlet may plan with, for hosts that also do other work |
| Use models your apps already run | On / Off | Today's option (#665) |
| Prefer models your hosts already have | Off / On | Today's option (#666) |
- The first-run wizard saves the three answers. The other preferences start at their defaults.
- Recommended setup shows every preference above its plan, under Your preferences. A change plans again at once and is saved, so the next Recommended setup uses it too.
- The same preferences are in the settings, so the owner can change them without opening Recommended setup.
- The games answer belongs to each computer. The other preferences are shared by the owner's computers, like the other shared settings.
For each job, from the most important to the least (today's order: Thinking; then the voice, listening and lip-sync; then the optional extras):
-
Gates remove the options that can't work:
- the model fits completely on one card with its context and the headroom;
- its runtime works on that computer;
- it takes the inputs the job needs (from the catalog and route facts);
- the owner's online answer allows it, and the model is not retired.
- A score puts the remaining options in order (below).
- Placement keeps today's rules: one language model per card (two models on one card share its compute, its tensor cores, so both answer slower), the voice on its own card on Windows (the first spoken word, the time to first audio, comes sooner), the live jobs first, companion PCs light, and the owner's choices kept. Recommended setup says these reasons where it makes a choice because of them.
-
Context window: Thinking's model on a host's card gets the largest
window that fits what the card has left (32,768, 16,384 or 8,192 tokens;
ContextWindowPlan), shown as a note. Each reply still sends the same text, so the window never adds latency.
- Target: first word in 0.4 s or less (Balanced; the reply quality preference sets 0.25 s or 1.0 s). Measured on an RTX 4070: Gemma 4 E2B 0.15 s, Gemma 4 E4B 0.21 s, Qwen3.5 4B 0.33 s. NVIDIA Build is about 0.5 s for each reply. Gemma 4 E2B on the processor is about 2.5 s (estimate).
- A live job that meets no target still gets the fastest option that works, so Martlet always has a reply.
- Martlet chooses the smartest model that meets the target. Smartness comes from the catalog (LMArena, the ranking index, then family, size and date).
- A model that hears gets preference within one quality step. With Send my voice straight to Thinking, the reply starts without waiting for the transcript, and the model hears the tone of voice.
- Bigger and smarter models go to Deep thinking, not to the live reply.
Use a model that hears for live Thinking when all of these are true:
- The recording stays on the owner's computers (this PC or a host), or the owner allowed a cloud model to hear them.
- It meets the 0.4 s target.
- It is no more than one quality step below the best model that doesn't hear.
Otherwise, use the smartest model that doesn't hear with the Listening transcript. Add a separate Hearing model on a host only when a host card has room left after the needed jobs.
| Job | When | Why |
|---|---|---|
| Deep thinking | Online is allowed and no host card fits a model at least one step smarter than live Thinking | Large free models; a few seconds don't matter for Deep thinking |
| Live Thinking | Online is "Yes" and no local card meets the target (the processor would take about 2.5 s) | About 0.5 s; transcript only, because NVIDIA logs inputs |
| Live Thinking backup | Online is "as a backup" or "Yes": in the While gaming and Host away plans | Keeps replies quick when the local card is busy or a host is away |
| Picture making | No graphics card can make pictures | One free key also covers NVIDIA's FLUX models |
A local model on the processor stays as the last backup, because the free service has request limits and fails at times. The wizard asks for an NVIDIA key only when the plan uses NVIDIA.
| Computer | Normal plan | While gaming plan |
|---|---|---|
| Host (nobody sits at it) | Up to 90% of each card (today's 10% or 0.8 GB headroom), or less with the host card share preference | The same |
| Companion PC, no games | Only the live jobs (Thinking, the voice), and only when no host can do them | Not used |
| Companion PC that games | The same as above | No live jobs on its card while a game runs |
- With a host that answers, a companion PC runs no models at all, only the app, audio, voice detection and the avatar (today's rule 6, made stricter).
- While a game runs, the live turn moves to a host, then to NVIDIA (if allowed), then to the processor. The model stays loaded when the game leaves room, so the change back is quick. Martlet unloads it only when the card is short of memory.
Partly. Martlet uses these facts:
- Words per second depend mostly on memory speed. Each new word reads all the active weights once, so fewer bytes make it faster. A smaller quantization helps, and a mixture-of-experts model (for example 26B with 4B active) is fast but needs memory for all its weights.
- The first word depends on the computing power, the prompt length and the prompt cache. Martlet keeps the start of the prompt the same so the cache is used again.
- The largest effect: a model that doesn't fit on the card puts layers in main memory, and it becomes 5-20 times slower. So Martlet never plans a live model that doesn't fit completely.
- Free memory doesn't make a model faster. It keeps room for games and other jobs, and it stops the model from being unloaded and loaded again, which costs seconds.
Rules: Q4_K_M quantization by default; Q8 only for small models when the card has much free room; never split a live model between the card and main memory.
- The optional extras take only the room that the needed jobs leave (today's rule). Picture making and singing load when used and unload after a few idle minutes, so they don't keep memory.
- The PC the owner uses keeps a quarter of its main memory (at least 4 GB) for the owner's apps (today's rule).
-
Their models come first. Models the owner's apps already serve are first
choices (#665, #666). Martlet counts the memory they use (
/api/ps), so it never fills the card past them. - Locked choices. A choice the owner made by hand is locked. Recommended setup shows a suggestion next to it, but changes it only when the owner asks. Each job gets a lock in Recommended setup. (Built: a job starts locked, and one the owner unlocked locks again when they change it by hand; see Your choices.)
- Their own servers. A new server or host model is checked once (route facts) and then counts like any catalog model.
- Full facts. The option list shows each option's inputs, memory, first word, smartness, cost and source.
- The catalog refreshes once a day. Martlet then plans again in the background. When a new plan is clearly better (smarter at the same speed, or the same smartness with less memory), the Recommended setup button shows A better setup is available. Martlet never applies it by itself.
- A retired model is the exception: Martlet proposes its replacement at once.
- Measured numbers replace estimates: the first word for each host and model
from the
Reply latencylog lines, and the memory from/api/ps. - Built in stage 3b: the background check also runs three minutes after start (a hardware or network change since Martlet last ran) and when a computer comes back or stays away (Your choices and a better setup).
- Martlet finds this PC's hardware, the other computers, the model apps and the keys.
- Question 1 (games), with Martlet's guess selected.
- Question 2 (online services).
- Question 3 (reply quality).
- One screen with the plan: one line for each job, where it runs and why, for example Thinking: Gemma 4 E4B on your RTX 4070. It hears you, first word about 0.2 s. One Use this setup button.
- A key step only if the plan needs a key.
Recommended setup uses the same planner for the whole network. It shows Your preferences, the three plans, the changes and the reasons, and has a lock on each job.
Each stage is one pull request.
-
Preferences (done). The saved recommendation preferences; the wizard's three questions; Your preferences in Recommended setup and in the settings; the planner uses them (
KeepGpuForGames, the online level, the first-word target, hearing, the host card share). It needs no catalog. How it was built:-
RecommendationPreferences(Martlet.Core.Planning):recommendation-preferences.jsonand therecommendation-preferencesshared setting. Fields:Quality(ReplyQualityBalanced, Quick, Smarter),Online(OnlineServicesBackup, Never, Yes),PreferHearing,HostGpuShare(90, 75, 50),UseServedModels,PreferHostModelsandGames(GamesAnswer(Device, Plays), one per companion PC by its Martlet device ID). An owner who never chose gets the defaults; the two model choices come fromrecommended-setup.jsonuntil then. - The guess from the saved keys is gone.
NetworkSetupRequest.WithandRecommendedSetupInputsgive the plannersPreference(RecommendationPreferences.Hosting: Never isPreferLocal, Only as a backup is the newHostingPreference.Backup, Yes isBalanced),Quality,PreferHearing,HostGpuShareand each companion PC'sMachineSpecs.KeepGpuForGames(its answer, else this PC's game library guess,GameLibraries.Found). - Live Thinking:
LiveThinking.Orderputs the models that meet the target first, smartest first (a model that hears counts one step up), then the rest fastest first. A new Thinking model is the first of those that also leaves room for the voice; else the fastest that fits. Today's model stays (rule 7). - Online:
HostingRules.Allows. Only as a backup plans no hosted live job but allows hosted Deep thinking and backup Thinking; a hosted Thinking provider the owner chose stays. - Games: the normal plan doesn't empty the card of a PC that games
(
PlacementEngine.GpuCapacityGbgives 0 only withkeepForGames: true, for the While gaming plan). It takes only Thinking and the voice, and it is the last companion PC to lend its card. - Host card share:
GpuCapacityGb'sshare, for host PCs only. - Rule 6, stricter: with a host that answers, a companion PC's Deep thinking, singing and pictures go, and its own Thinking moves to a host with the same model or one as fast.
-
-
Situations. The While gaming and Host away plans, changed at run time from
PcActivityand host status through the Thinking pool and backup routes. It follows stage 1. Done:LiveSituationsdecides the situation and where live Thinking goes (GameWatchfinds the game,PresenceWatchthe host that is away),SituationRoutesgives the conversation the moved route from its next reply, andSituationPlansgives Recommended setup's Three plans (Three plans). The hosted backup is If Thinking fails. When no other place can answer, the PC's own model in Ollama answers; Ollama keeps one copy of a model, so that copy runs on the processor only when Martlet unloaded it because the card was short of memory. -
Planner on the catalog. The planner gets its options from the catalog and the local facts; today's
FootprintCatalog.Seedstays as the offline fallback. The smartness score, Deep thinking on NVIDIA, measured feedback, locks and A better setup is available. It follows stage 1 and the catalog work. It is two pull requests: 3a (options and smartness from the catalog) and 3b (feedback and locks).3a, options and smartness from the catalog, done. How it was built:
-
FootprintCatalog.FromModels(ModelCatalog, bandwidth)gives the planners Martlet's own options with the catalog's facts, plus new options from the catalog.PlanningCatalogholds them for the desktop: it loads the catalog (the daily copy, else the snapshot) andmodel-abilities.jsonon a thread-pool thread at start, before Recommended setup and Set it all up for me plan, and after a daily refresh. Nothing on the reply path loads it. Each option says where it came from (ComponentOption.Origin:Seed,Catalog,LocalFactsorServed). -
The gates. An open-weight model with local facts becomes a Thinking,
Deep thinking, Vision (it sees) and Hearing (it hears) option when it has
an install name (an Ollama tag or
hf.co/{repo}:{quant}) and a memory estimate, writes text, is at most 80 GB, and its weights' size agrees with its parameters (a broken record, such as a split file's part, never wins a card). Unknown is not Yes. The planners still check the card, the headroom and the owner's online answer. The host roles' model choice is open (choice_open=OLLAMA_MODELinrole.conf): a host installs any Ollama tag orhf.co/{repo}:{quant}from the catalog, so a catalog model can go to a host's Thinking or Deep thinking role. Only an install name a host can't take isNativeOnly(a companion PC's own Ollama runs it). A host with an older Martlet refuses the model, and the review says to update Martlet there. - Bigger models for big hardware. Deep thinking on a host takes the smartest model that fits a card, the fastest of those (a mixture-of-experts model writes as fast as its active parameters allow). A host's Deep thinking role whose cards have room for a bigger model at least one quality step smarter switches to it (an Improvement); a smaller model never replaces a big one the owner runs. Live Thinking keeps its first-word rule, so the bigger models go to Deep thinking, never to the conversation's path.
-
One model across several cards (tensor split). On a host with two or
more NVIDIA cards, a Deep thinking model that no single card has room for
is split across the fewest cards (two to four) that no live job or other
language model uses. Each card takes its share of the model plus 0.5 GB of
buffers. The change carries
GpuIndexes, and the host getschoice.gpu=GPU-a,GPU-b(Ollama splits the model across the cards thatCUDA_VISIBLE_DEVICESlists). A host doesn't report which cards a role runs on, so a Deep thinking model too big for one card counts as split across the cards with the most room. Live Thinking is never split: each token would pass between cards before the first word. -
Smartness.
catalog.Smartnessgives the tier of new options, served models and models a host keeps (ServedModels.Tieris the fallback). Martlet's own options keep the tier Martlet chose, and show the catalog's words only when scores back them. The rank is never shown. - Speed. Where nothing is measured, the first word is 100 ms plus nine tokens at 60% of the memory bandwidth's bound (fitted to the measured Gemma 4 E2B and E4B; it gives 153 ms and 207 ms), for this PC's best card (else an RTX 4070's 504 GB/s). Measured numbers in the seed win; the seed's estimates (Gemma 4 12B and 26B) are estimated again.
-
Deep thinking on NVIDIA Build.
hosted:nvidia-build-deepuses the smartest free chat model that calls tools on NVIDIA's routes (Kimi K3 in the snapshot of 2026-10-10). When online services allow it and no host card fits a model one quality step smarter than live Thinking, Recommended setup suggests it (NetworkRecommendation.OnlineDeepThinking, a note and the Deep thinking line); the owner adds it in Companion › Background thinking, which prefills it. A suggestion changes no setup and no fingerprint. The single-PC planner (PlacementEngine, which the setup advisor uses) places it and suggests the free key. -
Provider defaults. Each hosted provider suggests its free route that
sees, calls tools and isn't retired, the fewest active parameters first
(
CatalogOptions.SuggestedChat; route facts Martlet found out come first). Today'sChatCompletionsEndpointCatalogdefaults stay when the catalog has none (Google Gemini in the snapshot). -
Facts and MCP. The option picker and Recommended setup show the
catalog's facts (inputs, smartness words or LMArena's credited rating,
words a second, where it comes from); Companion › Thinking › This PC also
lists up to three catalog models that fit the card. MCP
recommended_setup_statushasplanning, and the Doctor hasplanning.catalog.
3b, feedback and locks, done. How it was built:
- Measured numbers:
MeasuredFirstWords(model-speed.json) keeps each Thinking model's first word on each server, from the reply timings theReply latencyline uses (ReplyLatency.ThinkingFirstWordMs: from the Thinking request to the first words; replies that hidden reasoning, the fallback or Backup Thinking answered first don't count), the middle of the last nine replies, saved after the reply on a thread-pool thread.MeasuredModelMemory(model-memory.json) now also gets each paired host's loaded models: the gateway'sGET /martlet/v1/machinelistsloaded_modelsfrom each Ollama role's/api/ps(two seconds at most, kept 30 seconds; older hosts leave it out), and the desktop keeps them on each host check.FootprintCatalog.WithMeasuredputs the newest measurement of a model in place of its first word and graphics memory (Evidence = Measured,Measurementslists them); the desktop and MCP plan with it. - Locks:
RecommendationPreferences.Locks(JobLock(Job, Locked)withChose, the choice that ran when unlocked or that Reconfigure set up) for Thinking, Listening and Lip-sync;LockStateis Kept (the default, the same as locked), Locked, Unlocked or ChangedByHand (unlocked, but the job now runs another choice).NetworkSetupRequest.Unlockedcarries the unlocked jobs andNetworkRecommender.TodayChoicewhat each job runs. - Suggestions:
NetworkRecommender.Recommendplans each lockable job once more as if new (NetworkSetupRequest.Fresh, a hook at the top of Thinking, Listening and Lip-sync) and keeps the clearly better choices inNetworkRecommendation.Suggestions(BetterChoiceSmarter or Lighter). A locked job's suggestion is only shown; an unlocked job's is in the changes. Recommended setup shows Your choices with each lock, the suggestion and Use the suggestion (it plans it once). -
A better setup is available: three minutes after start, after the daily
catalog refresh and when a computer comes back or stays away, the desktop
plans again off the reply path; Home's Recommended setup button says so
while suggestions wait that the owner hasn't seen in a review
(
recommended-setup.jsonkeeps the seen ones). It never applies them. - Retired models:
RetiredModels.Expired(the catalog's expiration date) andRetiredModels.Replacement(the provider's current model, else the smartest current catalog model on that server that takes the same inputs). Home's issue for a retired Thinking or If Thinking fails model has Use with the replacement as soon as a reply, a test or the catalog finds it.
-
The owner approved these defaults on 2026-10-10. Each one is a preference the owner can change, except the last two.
- The live target is a first word in 0.4 s or less (Balanced).
- A model that hears wins when it is no more than one quality step behind.
- "Only as a backup" is the default answer for online services.
- While gaming, the live turn moves away, but the model stays loaded when the game leaves room.
- NVIDIA Build is the default place for Deep thinking when no host card fits a smarter model and online services are allowed.
Martlet: download · repository · changelog · issues
These pages come from docs/wiki in the repository. To suggest a change, open an issue or a pull request there.
- Home
- Accounts and households
- Accounts and Household
- Android phones and tablets: what it takes, and the plan
- Martlet's API for other apps and scripts
- App Guides
- App Settings and Updates
- App guides: game and app knowledge from the web
- Architecture
- Bounded PCM playback
- Audio dependency inventory and notices
- Avatar guide: Live2D, VRM and speech animation
- V01a explicit microphone capture
- Chatterbox voice engines
- Cleaning up disk space
- One Martlet on all your computers
- Companion controls and behavior requirements
- Components, jobs and placement (design)
- Live conversation
- Creations
- Decision map: which file owns each decision
- Deep research: web search and long research jobs
- The desktop app: updates, notification area, exiting and appearance
- Linux and macOS desktop companion: research, decision and plan
- Developer Guide
- Dia voice engine
- Diagnostics
- Discord
- Architecture and provider contracts
- Discord
- Memory (P03a/P03b/P03c)
- Singing
- Desktop troubleshooting and local support
- Recognizing people by voice, and Parakeet
- Echo cancellation
- ElevenLabs voice: your cloned voice with tones
- F5 worker and reference-voice foundation
- FAQ
- First Steps
- Game state plan: implementation history
- Glossary: one name for each concept
- GPT-SoVITS voice
- Hosted Thinking: cloud models when Thinking can't run on this PC
- Installation and support
- Installing Martlet
- iOS and iPadOS: what it takes, and the plan
- Repository instructions for coding agents
- Repository knowledge base
- Knowledge base maintenance
- GitHub Wiki mirror
- Linux and Mac
- Listening and Voice ID
- Local model apps
- Lorebooks
- macOS: what it takes, and the plan
- Martlet MCP Server
- MCP in Martlet
- MCP: The app's window
- MCP: Apps, home and memory
- MCP: Characters
- MCP: Diagnostics and logs
- MCP: Computers, network and accounts
- MCP: Other
- MCP: Tool permissions
- MCP pages
- MCP: Server and protocol internals
- MCP: Settings
- MCP: Start here
- MCP: Thinking and models
- MCP: Voice and listening
- Memory
- Messaging apps
- Model catalog: sources, conflicts and design
- Motion host role
- Multiple Computers
- Your Martlet network
- OCR host role
- Share your language models: the OpenAI-compatible endpoint
- Packaging
- Perception worker contracts
- Personality and Characters
- Picture making
- Pictures and Creations
- Picture making host role
- Platforms: what each device can do
- Prerequisites: what Martlet bundles, installs for you, or needs from you
- Privacy and Safety
- Reading the text on your screen
- Wiki source
- Recommendation design: ask three questions, plan for three situations
- Recommended setups: one machine to unlimited budget
- Releasing
- Repository Layout
- Research and provenance ledger
- Resource footprints
- Roadmap
- Watch my screen: screen-aware commentary
- Search engine
- Image and audio models: who sees, who hears, who answers
- Setting Up a Host
- Setup, Windows credentials and local audio
- Sharing with Friends
- Singing
- Smart Home
- Smart home and cameras
- Source Projects
- Talking to Martlet
- Telegram and WhatsApp
- The Character
- Thinking
- Tools and MCP
- Troubleshooting
- Martlet desktop UI design
- User stories and target flows
- Voice activity detection
- Validating changes
- Validation and Testing
- Vision
- Voice latency: from you stopping talking to Martlet's voice
- Voice recognition host role
- Multi-engine voice setup and comparison
- Voices
- The welcome wizard
- XTTS-v2 voice engine