← All posts

Who Runs Your Model? Independence and the Role of pharo-infer

LLMPharoPharo-Infer

In my previous post, I wrote that Pharo-LLM is, for me, a strategic investment in independence. I mentioned pharo-infer in one paragraph and moved on. I want to come back to it, not to explain how to install it, but to explain why I think it matters. Because behind this small project there is a question that I find more important than any benchmark: when you use an LLM, who is actually running it?

A model is not a tool until something runs it

We often talk about models as if they were the whole story: which one is better, which one is bigger, which one writes better code. But a model is only a file full of numbers. Alone, it does nothing. To get an answer, something has to load this file, turn your text into tokens, compute the next token again and again, and turn the result back into text. This “something” is called an inference engine.

The inference engine is the part nobody talks about, and it is exactly the part that decides how free you are. Whoever runs the engine decides when the model is available, how fast it answers, how much you can use it, what it costs, and what happens to the text you send. You can have the best open model in the world: if you can only reach it through somebody else’s engine, you are still a guest.

Three ways to depend on someone

I see three situations, and each one is a different level of dependence.

The first is the cloud API. You send your prompt to a company, and the answer comes back. It is the easiest way, and often the most powerful one. But you depend on everything: their prices, their rate limits, their terms of use, their decision to keep or retire a model, and a network connection. And your source code leaves your machine every time you ask a question.

The second is the local server. You run a tool such as Ollama, LM Studio, or vLLM on your own machine, and your environment talks to it. This is already a big step: the data stays with you, and nobody can cut your access. But from the point of view of Pharo, the model is still a stranger. It lives in another process, behind a port, managed by a tool that we do not control and cannot inspect from the image. Pharo is only a client knocking at a door.

The third is the model inside the environment. This is what pharo-infer does. The model file is loaded directly by the Pharo image, and the computation is driven from inside it, using llama.cpp for the low-level work. There is no server, no bridge, no second program to start. The model is not a service that Pharo calls. It is something that Pharo runs.

Why the third way matters to me

Someone could say: the second way is enough. The data is already private, the model is already yours. Why go further?

My answer comes from what Pharo is. In Pharo, we like the idea that everything can be inspected, understood, and changed. The compiler is there. The debugger is there. The tools we use to build the system are part of the system. This is not a detail; it is the reason many of us are here.

Now look at how AI usually arrives in a development environment. It arrives as a black box at the end of a wire. We can send it text and read what comes back, and that is all. The most important new component of our tools is the only one we cannot open.

With the model running inside the image, this changes. The model that is loaded, the context it works with, the generation that is in progress: all of these become objects. We can look at them, connect them to the inspector or the debugger, and build tools on top of them the same way we build everything else. I do not know yet all that we will do with this. But I know that we cannot even try as long as the model lives outside.

So for me, independence is not only about privacy or about price. It is about keeping AI inside the part of the world that we are able to understand and modify.

What independence does not mean

I want to be careful here, because “independence” is a word that is easy to misuse.

It does not mean refusing cloud models. They are often better, and for many tasks using them is the right choice. Pharo-LLM supports them and will continue to.

It does not mean that everything must be rewritten in Pharo. pharo-infer does not reimplement the mathematics of the model. llama.cpp does that work, it does it very well, and it is open source. Depending on an open project that we can read, build, and replace is not the same as depending on a service that we can only rent.

And it does not mean that every developer must run a model on a laptop. As I wrote in the previous post, a team can share one model on its own server.

Independence means that the choice stays ours. The day a provider changes its prices, removes a model, or changes its conditions, we are not stuck. The day we work on code that must not leave the building, we have an answer. The day there is no network, the demo still runs.

The price of this freedom

This independence is not free, and I do not want to pretend it is.

Running a model yourself means the memory and the computation are yours to provide. A local model is usually smaller than the big commercial ones, and for general tasks it is weaker. Somebody has to maintain the engine as the underlying libraries evolve. And for a small community like ours, every hour spent on infrastructure is an hour not spent somewhere else.

So why accept this cost? Because of what we saw with Pharo itself. A general model knows little about Pharo, since there is little Pharo code in the world to learn from. Our experiments showed that a smaller model, specialized for Pharo, can do much better on Pharo tasks than its general-purpose base. In other words: for a community like ours, the model that serves us best is probably not the one a large provider will ever build for us. If we want it, we have to be able to train it, and then we have to be able to run it. pharo-infer is the second half of that sentence.

A small project for a large question

pharo-infer is not a big project. It will not compete with the infrastructure of the large providers, and that is not its goal. Its goal is to make sure that in Pharo, the answer to “who runs your model?” can be: we do.

I think every community that cares about its tools will have to answer this question at some point. I prefer that we answer it early, while it is still a choice and not yet an emergency. The project is here: pharo-infer. If this vision speaks to you, contributions and discussions are very welcome!