Using Ollama (local LLM)

Run AI models locally on your machine for free.

Updated 2026-10-03

TeXposit supports Ollama, which lets you run language models directly on your computer. No data is sent to a cloud model, there are no API costs, and it works offline.

System requirements

Minimum (small models)Recommended (better quality)
RAM8 GB, 16 GB recommended32 GB or more
Disk20 GB free50 GB free
ProcessorAny modern Intel or AMD CPUNVIDIA GPU with CUDA (optional, much faster)
Model size7B to 13B30B to 70B

Step 1: Install Ollama

Download the installer for your operating system from ollama.com/download and follow its instructions. Once installed, you can run ollama from your terminal.

Step 2: Choose and run a model

Popular models for academic writing, from fastest to highest quality:

ModelBest forCommand
Llama 3.2 (3B)Fast responses on modest hardwareollama run llama3.2
Llama 3.1 (8B)Balanced choice, comfortable on 8 to 16 GB RAMollama run llama3.1
Qwen2.5-Coder (7B)Recommended for LaTeX: strong with technical content and codeollama run qwen2.5-coder
Mistral (7B)Good reasoning for its resource useollama run mistral

The first ollama run <model> downloads the model (one time, 5 to 50 GB depending on size) and starts a local server on localhost:11434.

Step 3: Connect TeXposit to Ollama

  1. Make sure Ollama is running with your model available.
  2. In TeXposit, open the AI assistant panel (Cmd+Shift+B), click the ⋮ menu and choose AI Setup.
  3. Open the Local AI Server tab and turn on Enable Local AI Relay. It routes chat requests to your local Ollama instance.
  4. Check Ollama Host URL. It defaults to http://localhost:11434/api/chat, which is where a standard Ollama install listens.
  5. Under Model Mapping, choose the model to use for each role (for example Model (Fast)).
  6. Start chatting. Responses now come from your local model.
AI Setup → Local AI Server holds the relay switch, the Ollama host URL and the model mapping.

Advanced: a custom model for academic writing

For best results with academic LaTeX, you can create a custom model tuned to your writing. Save this as Modelfile:

FROM qwen2.5-coder

SYSTEM """
You are an expert academic writing assistant specialized in LaTeX and research papers.
Your responsibilities:
- Improve clarity, precision, and academic tone while preserving technical accuracy
- Ensure all LaTeX code is syntactically correct and compilable
- Follow best practices for academic writing
- Maintain formal, professional tone suitable for peer-reviewed publications
- When generating LaTeX code, include proper package imports and formatting
"""

PARAMETER temperature 0.3
PARAMETER top_p 0.95
PARAMETER num_ctx 4096

Build and run it:

ollama create texposit-academic -f Modelfile
ollama run texposit-academic

Tips for local models