Troubleshooting
Ollama Troubleshooting & Best Practices
Common Error: "Could not parse expression with acorn"
What: MDX parser error when rendering markdown with unescaped braces.
Why: Curly braces like {{ }}
in code blocks confuse the parser.
How: Escape braces as {{
and }}
or wrap code in fenced blocks.
Example:
TEMPLATE """
User: {{ .Prompt }}
Assistant:
"""
Best Practice: Use Collapsible Sections
What: Organize content into expandable blocks.
Why: Keeps documentation compact and readable.
How: Use <details>
and <summary>
tags in markdown.
Example:
<details>
<summary>Command info</summary>
Details here...
</details>
Handling Large Models
What: Large models require significant resources.
Why: To avoid crashes or slow performance.
How: Use parameters like num_ctx
to limit context size, stop unused models, and monitor system usage.
Example:
PARAMETER num_ctx 2048
ollama stop llama2
Updating Ollama CLI
What: Keep your Ollama CLI updated.
Why: Access newest features and security patches.
How: Run ollama update
regularly.
Example:
ollama update
Backup Your Models & Configurations
What: Save your Modelfiles and custom models.
Why: Prevent loss due to system issues.
How: Store files in version control like GitHub.
Example:
git init
git add Modelfile
git commit -m "Add custom model config"