Running a model in Ollama loads it into memory and sends a prompt through the local inference runtime. It is the simplest end-to-end check that the model is installed, the server can load it, and a response can be produced.

Use the exact model name from ollama list. A model can take time to load on the first request, and thinking-capable models may print a reasoning trace before the final answer.

Keep smoke-test prompts small. Once the model returns a known short answer, move longer prompts or application-specific tests into the relevant workflow.

Steps to run a model in Ollama:

  1. List installed models and choose the exact name.
    $ ollama list
    NAME           ID              SIZE     MODIFIED
    gpt-oss:20b    17052f91a42e    13 GB    6 months ago
  2. Run the model with a short prompt.
    $ ollama run gpt-oss:20b "Return only OK."
    Thinking...
    ##### snipped #####
    OK
  3. Run a one-shot prompt without entering an interactive session.
    $ ollama run gpt-oss:20b "Summarize Ollama in five words."
    Local model runner and API.
  4. Check that the model is loaded after the run.
    $ ollama ps
    NAME           ID              SIZE     PROCESSOR    CONTEXT    UNTIL
    gpt-oss:20b    17052f91a42e    12 GB    100% GPU     131072     4 minutes from now
  5. Stop the loaded model when memory should be released.
    $ ollama stop gpt-oss:20b