Local models in LM Studio
Scholar Lens runs on local models served by LM Studio's OpenAI-compatible server at http://127.0.0.1:1234/v1. Any server with the same API works, but the project is tested with LM Studio. This page lists the models, how to load them, and the quirks found by testing.
The two model sets
| Role | Large GPU (RTX 5090, 32 GB) | Small GPU (RTX 3060 Laptop, 6 GB) |
|---|---|---|
| Chat | qwen/qwen3.6-35b-a3b, Q4_K_M | qwen/qwen3.5-4b, Q4_K_M |
| Context and slots | 65536 tokens, parallel 2 | 32768 tokens, parallel 2, K and V cache q8_0 |
| Embedding | text-embedding-qwen3-embedding-4b, 2560 dimensions | text-embedding-qwen3-embedding-0.6b, 1024 dimensions |
| Reranker | bge-reranker-v2-m3 Q8_0 in llama.cpp (CPU or GPU) | the same, on the CPU |
| GPU memory used | about 30 GB | about 5.5 GB |
The eval numbers in these pages come from the large set. The 4B model writes correct short answers but makes more mistakes in code and long derivations.
Load the models
bash
lms server startbash
lms load qwen/qwen3.6-35b-a3b --parallel 2 --context-length 65536 -ybash
lms load text-embedding-qwen3-embedding-4b -yCheck what is loaded:
bash
lms psSet LLM_CONCURRENCY to the same number as --parallel, so Scholar Lens keeps its own queue instead of overfilling the server's.
Why these settings
- Parallel 2, not 4. The slots share one context window. At parallel 4 and 40K, two Comprehensive answers overflowed it. Two slots of 64K hold one long answer and one check side by side.
- Run evals alone. An eval next to a chat can still overflow the shared context ("Context size has been exceeded").
- Save per-model defaults. LM Studio forgets load settings unless they are saved as the model's defaults in the GUI.
lms load <model> -ywith no flags then uses them. - Serve on Local Network. LM Studio binds to
127.0.0.1by default. Containers can only reach it when this option is on.
Thinking and JSON
Probing qwen3.6-35b-a3b in LM Studio found:
- Thinking is on by default: about 1,300 reasoning tokens even for a one-line question. Generation runs at about 280 tokens per second.
- Thinking turns off only with
reasoning_effort: "none". The settingsenable_thinking=false,/no_thinkandreasoning_effort: "low"are ignored. response_format: json_schemaworks. Leave a largemax_tokens, because reasoning uses the budget first.
Scholar Lens sets thinking per step. Comprehensive and Academic drafts, their planning step and code writing think. Summary drafts, the claim check, revisions, study sets and background summaries don't, which keeps them fast. An admin can change this per step under Settings, Show the steps. The API's probe (app/llm/probe.py) checks these behaviours against a new server.
Using another model
- Load it in LM Studio and set
LLM_MODELto its id. - Select Test the model in Settings, or run the probe.
- Run the evals (see Tests and evals) before you rely on it.
Changing the embedding model is a bigger step: the database's vector column has a fixed size, so a model with other dimensions needs a new database and a full re-index.