Last updated about 2 hours ago

ollama

Run a model with custom context

# Run ollama normally
ollama serve

# Check model context
ollama show gemma4:latest
# >> context length 131072

# Restart ollama with proper context
OLLAMA_CONTEXT_LENGTH=131072 ollama serve

To check if your model is running with corrext context:

ollama ps
# >> CONTEXT 131072