New Tool Radar

Local AI

How to Tune a Jan Model’s Context, GPU Layers, and Sampling Settings

Open a Jan model's settings from the gear icon and set context size, GPU layers, temperature, top-p, and top-k to fit your computer and your task.

Schematic diagram with three steps: set context size for how much the model remembers, max out GPU layers for speed, then set temperature 0.7, top-p 0.9, and top-k 20 to 40.

Model settings control how your AI thinks and responds — Jan’s own docs call them the AI’s personality settings and performance controls. Click the gear icon next to your selected model in the chat interface to open Model Settings, and a panel slides open on the right with all the available settings. Three groups matter most: how much the model remembers, how much work the graphics card does, and how it picks its words.

Context size and GPU layers

Context Size is how much text the model remembers, like its working memory: larger means it remembers more of your conversation, but uses more computer memory. GPU Layers is how much work your graphics card does: more layers on the GPU means faster responses, but it needs more graphics memory, so start high and reduce if you get errors. Jan’s docs explain it with a stack of layers, like a cake — each layer can run on either your main processor (CPU) or your graphics card (GPU), and your graphics card is usually much faster. When Fit to Hardware is enabled, Jan automatically caps context size based on your model and available memory; it is on by default for Windows and Linux with a discrete GPU, and off by default for integrated GPUs and macOS. If fit is disabled, you can set context size freely — but values beyond what your hardware can handle will cause slowdowns or out-of-memory errors.

Sampling: temperature, top-p, top-k

The same panel holds the sampling controls. Jan’s docs give plain starting values for each:

Setting What the docs say
Temperature How creative vs. predictable responses are. Low (0.1-0.3) = focused, consistent answers. High (0.7-1.0) = creative, varied responses. Try 0.7 for general use.
Top K How many word choices the model considers. Smaller numbers (20-40) = more focused. Larger numbers (80-100) = more variety.
Top P Another way to control word variety. Works with Top K. Values like 0.9 work well. Lower = more focused, higher = more creative.
Min P Minimum chance a word needs to be chosen. Prevents very unlikely words. Usually fine at default.
Repeat Penalty How much to avoid repeating words. Higher values (1.1-1.3) reduce repetition. Too high makes responses awkward.

Jan’s own quick setup for most users is: set Temperature to 0.7 for balanced creativity, max out GPU Layers (reduce only if you get memory errors), and leave other settings at defaults. For factual or technical work, decrease Temperature to 0.1-0.3; for creative writing, increase it to 0.8-1.0 and Top P to 0.95. The Jan-v3 model card recommends the same ballpark — temperature 0.7, top_p 0.8, top_k 20 — so the docs’ values and the model authors’ values agree.

Check What you should see If you do not see it
Panel opens Clicking the gear icon next to the selected model slides a settings panel open on the right You clicked a different gear — it must be the one next to the selected model in the chat interface
Temperature 0.7 Replies are balanced — neither stiff nor wild The value did not stick — reopen the panel and check it
GPU layers maxed Replies come faster than with most layers on the CPU Out-of-memory errors — reduce GPU Layers or Context Size, as the docs’ troubleshooting says
Factual work At temperature 0.1-0.3, answers are focused and consistent Still rambling — lower the temperature further or lower Top P

Expected result. We checked Jan’s own Model Settings docs for the gear icon, context size, GPU layers, Fit to Hardware, and the sampling values, and the Jan-v3 model card for its recommended parameters. We did not run Jan.

Limits

Presence Penalty and Frequency Penalty are remote-providers only — they have no effect on local llama.cpp models — and the Mirostat settings only apply when using a local llama.cpp model, so do not expect those controls to change a local model’s replies. The docs’ quick setup is a starting point, not a measurement: the right context size and GPU layer count depend on your model and your hardware, and values beyond what your hardware can handle cause slowdowns or out-of-memory errors. We did not run Jan, so no setting here is a recorded result.

Sources

See all