Michael Limberger
Need me? Email mike@limberger.ca
AI
Quick Reference
The card you keep nearby
Do not skip the Modelfile. Ollama defaults to 4K. You need 32K+.
Show me.
FROM qwen3-coder-next:latest
PARAMETER num_ctx 32768
ollama create qwen3-coder-32k -f ~/Modelfile-qwen-claude
Use qwen3-coder-32k everywhere, not qwen3-coder-next:latest.
Server side: install or update Ollama, pull the base, create the Modelfile, create the configured model.
Remote: set OLLAMA_HOST=0.0.0.0:11434, pkill ollama, then ollama serve.
Workstation: install Claude Code, fix PATH, set COLORTERM, put the six ANTHROPIC lines in both zshrc and settings.json.
Replace YOUR_IP.
Do both methods, then source ~/.zshrc.
First launch: cd into the project, run claude, pick option 3, then /init.
| Context | Extra RAM | Total with model | Machine |
|---|---|---|---|
| 4K (bad) | ~1GB | ~21GB | Don't use this |
| 8K | ~2GB | ~22GB | 16GB machines |
| 16K | ~4GB | ~24GB | 24GB machines |
| 32K | ~8GB | ~28GB | 32GB machines |
| 64K | ~16GB | ~36GB | 64GB machines |
Claude Code uses Anthropic API format.
There is no num_ctx parameter on that path.
Only the model definition sets context.
Base equals 4K and is useless for this workflow.
Yours equals 32K and works.
Slash commands: /help, /context, /compact, /clear, /init, /permissions.
Custom commands live in ~/.claude/commands/name.md or .claude/commands/name.md, with $ARGUMENTS, $1, $2.
Launch: claude, claude --continue, claude --resume.
Ctrl+D exits.
Ctrl+C cancels.
CLAUDE.md lives globally, at project root, or in a subdirectory.
Test: ollama --version, ollama ps showing CONTEXT 32768, and curl /v1/messages with your model.
Timeout 600000.
Auto-compact 75.
Yolo permissions if you want them.