Skip to content

Ollama or an API: two ways to run an abliterated model

Run an abliterated model on your own machine with Ollama, or call one through a hosted API. What each needs, where your prompts go, and how to switch between them.

Published Updated 5 min read

There are two practical ways to use an abliterated model. You can run the weights on your own machine with a tool such as Ollama, or you can send requests to a hosted API. Both speak the same request format, so the choice is about hardware, privacy and controls, not about code.

The short version: run it locally when your prompts must not leave your machine and the model fits in your memory. Use an API when you have no GPU, need a long context window, or need shared controls and an audit trail for a team.

What running it locally involves

Ollama downloads a model and runs it on your computer. Community publishers upload abliterated versions of open-weight models to Ollama's library and to Hugging Face. For example, this command downloads and starts an abliterated DeepSeek R1:

ollama run huihui_ai/deepseek-r1-abliterated

Three things decide whether this works well for you:

  • Memory. The model has to fit in your GPU's memory, or in system memory if you accept slow answers. Larger models need more of it.
  • Context window. Ollama picks a default from your GPU's memory: about 4,000 tokens under 24 GB, 32,000 from 24 GB and 256,000 from 48 GB. You can raise it with the OLLAMA_CONTEXT_LENGTH setting or the num_ctx parameter, and a longer window uses more memory.
  • Upkeep. You choose the model file, keep it updated and run the server. Nobody else can change the model under you, which some teams count as an advantage.

What using an API involves

A hosted API runs the model on someone else's hardware. You create a key, add credit and send requests over HTTPS. There is nothing to download.

CommentLLM hosts four abliterated models this way: GLM 5.3 Abliterated, GLM 5.3 Flash Abliterated, DeepSeek V4.1 Flash Abliterated and a faster variant of it. Each has a context window of 1,048,576 tokens. These are not the same model files that Ollama's library offers, so test your own prompts before you move a workload from one to the other.

Side by side

Topic Ollama on your machine CommentLLM API
Setup Install Ollama and download a model Create a key and add credit
Hardware Enough memory for the model, in practice a GPU None
Context window About 4,000 tokens by default on a GPU under 24 GB, more if memory allows Up to 1,048,576 tokens
Cost Hardware and power Per token, from prepaid credit
Where prompts go They stay on your machine Through the gateway to an external inference provider. They are not stored or used for training
Works offline Yes No
Team controls What you build yourself Policies, engagement scope, roles and an audit log
Rules of use The model's license and the law The same, plus the Acceptable Use Policy

Where each one is the better choice

Choose Ollama when:

  • Your prompts or data must not leave your machine or network.
  • You need to work offline or inside an isolated lab.
  • You already own a GPU that fits the model, and your inputs are short.
  • You want to try many community models quickly.

Choose an API when:

  • You have no GPU, or the model you need does not fit the one you have.
  • Your inputs are long: a codebase, a log archive or a long report in one request.
  • Several people share the work and you need per-key limits, policies on requests and a record of what was allowed or blocked.
  • You would rather pay for the tokens you use than buy and run hardware.

Many teams use both: a local model for sensitive material and quick experiments, and an API for long inputs and shared work.

There are two more places between these: your own cloud account and your own servers. They suit a team whose prompts must stay in its network and whose model is too large for one machine. Where to run abliterated models compares all four, with the providers for each.

Moving between them

Ollama serves an OpenAI-compatible endpoint at http://localhost:11434/v1/. CommentLLM serves one at https://api.commentllm.com/v1. Code written with the OpenAI SDK works against either. You change the base URL, the key and the model name.

import os
from openai import OpenAI

# Local: Ollama needs a key to be set, and ignores its value.
local = OpenAI(base_url="http://localhost:11434/v1/", api_key="ollama")

# Hosted: CommentLLM.
hosted = OpenAI(
    base_url="https://api.commentllm.com/v1",
    api_key=os.environ["COMMENTLLM_API_KEY"],
)

reply = hosted.chat.completions.create(
    model="deepseek-v4.1-flash-abliterated",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Explain this Sigma rule."}],
)
print(reply.choices[0].message.content)

Two differences to plan for. CommentLLM supports tool calling on both formats, so coding agents work, but it does not currently support structured output (response_format), so code that depends on it needs another path. And an abliterated model, local or hosted, can still decline a request: abliteration reduces refusals and does not remove every one.

What it costs to try the API

There is no free tier. You add prepaid credit from $10 and pay per token, with no subscription required. The pricing page lists each model's rates, and a request that one of your policies blocks is not billed. The API page covers what is included, and the comparison of eleven uncensored LLM APIs shows how other hosts price theirs.

Questions

Is an abliterated model on Ollama the same as one from an API?

Not necessarily. Each publisher abliterates a model in its own way, and a host may serve a different base model or version. Compare them on your own prompts.

Can I use the same code with Ollama and CommentLLM?

Yes, if it uses the OpenAI Chat Completions format. Both expose that format, so you change the base URL, the key and the model name. CommentLLM supports tool calling but does not currently support structured output.

Do I need a GPU to run an abliterated model?

Not if you use an API. To run one locally you need enough memory for the model, and in practice a GPU, because a model running from system memory answers slowly.

Which is more private?

Running locally. Your prompts never leave your machine. With CommentLLM, prompts pass through the gateway to an external inference provider. They are not stored, and neither CommentLLM nor the provider uses them for training.

Start building today.

Create an account, tell us what you work on, and send your first request.