Jeison Eccel

Can Remote Compute Become a Reliable Coding Agent?

In the previous stage of this experiment, I reached the limit of what I could reasonably run on my Mac.

The next question was simple:

What if I rent the computer instead of paying for the model?

The idea is to keep the coding agent, source code, Git repository, and development tools on my computer, but run the Large Language Model (LLM) on a remote GPU.

Instead of paying per token to a commercial model provider, I pay for GPU time.

If this works, I get access to larger models without loading them into my 16 GB Mac, while keeping more control over the model, context, and costs.

At least, that is the hypothesis.

Renting a GPU with Modal

For this experiment, I use Modal.

Modal provides serverless cloud compute, including GPUs. Instead of creating and managing a traditional virtual machine, I describe the environment in Python and Modal starts the required container when I need it.

The local setup is small:

pip install modal
modal setup

After creating the account and connecting the CLI, I can deploy Python functions directly from my computer.

There is one small surprise during setup.

Without a credit card registered, my account initially has a very small usage limit of around $1. That is useful protection for experimenting, but not enough to load and test larger models.

After configuring billing, I can continue using the included monthly compute credit while allowing workloads beyond that initial limit.

Building the remote model server

I use vLLM, an inference server designed to run Large Language Models efficiently on GPUs.

The important parts of the configuration are:

  • Choose the model.
  • Choose the GPU.
  • Load the model using BF16 precision.
  • Expose an OpenAI-compatible API.
  • Protect the endpoint with authentication.
  • Cache the downloaded model so every restart does not download tens of gigabytes again.

The version I setup looks like this:

import modal

MODEL_ID = "Qwen/Qwen2.5-Coder-14B-Instruct"
GPU = "L40S"
HF_CACHE_PATH = "/root/.cache/huggingface"

app = modal.App("qwen25-coder-14b")

hf_cache_volume = modal.Volume.from_name(
    "huggingface-cache", create_if_missing=True,
)

image = (
    modal.Image.from_registry(
        "nvidia/cuda:13.0.2-devel-ubuntu22.04",
        add_python="3.12",
    )
    .pip_install(
      "vllm==0.30.0",
      "huggingface_hub",
    )
    .env(
        {
            "HF_HUB_CACHE": HF_CACHE_PATH,
            "HF_XET_HIGH_PERFORMANCE": "1",
        }
    )
)

@app.function(
    image=image,
    gpu=GPU,
    timeout=60 * 30,
    scaledown_window=300,
    volumes={
        HF_CACHE_PATH: hf_cache_volume,
    },
)
@modal.web_server(
    port=8000,
    startup_timeout=60 * 10,
    requires_proxy_auth=True,
)
def serve():
    import subprocess

    subprocess.Popen([
        "vllm",
        "serve",
        MODEL_ID,
        "--host", "0.0.0.0",
        "--port", "8000",
        "--dtype", "bfloat16",
        "--max-model-len", "32768",
        "--gpu-memory-utilization", "0.90",
    ])

The persistent cache becomes important very quickly.

Downloading a model once is acceptable.

Downloading it every time an agent needs to answer a question is not.

Starting with Qwen 14B

I start Stage 2 with Qwen 2.5 Coder 14B.

The model runs on an NVIDIA L40S with 48 GB of GPU memory. At the time of the experiment, the GPU costs roughly $1.95 per hour while running.

This is already much more hardware than my Mac can dedicate to a model.

The first goal is not to build anything complicated. I use the same Spring Boot project from my previous tests and ask the agent to implement a realistic but small feature.

The task is to add an endpoint that retrieves transactions between two dates.

The requirements include:

  • Add GET /transactions/range.
  • Accept startDate and endDate.
  • Preserve the currently logged-in user.
  • Follow the existing Controller → Service → Repository structure.
  • Filter using the database instead of loading everything into memory.
  • Make the smallest necessary change.

I use Aider as the local coding agent.

The model understands the task surprisingly well. It identifies the correct architecture, understands the ownership requirement, and knows that the date filtering belongs in the repository.

Then the implementation breaks. The final edit leaves the controller calling service logic that is not correctly implemented.

So, the model understands the code. The agent still fails the task.

Moving to 32B

The obvious next step is a larger model.

I replace the 14-billion-parameter model with: Qwen 2.5 Coder 32B

This time I use an NVIDIA A100 with 80 GB of GPU memory, costing roughly $2.50 per hour during the experiment.

The jump from 14B to 32B is already significant. So is the memory requirement.

My first configuration uses a context window of 32,768 tokens. It fails.

The model itself consumes approximately 61 GB of GPU memory. After loading it, vLLM has only about 6.3 GB available for the Key-Value (KV) cache used to hold the active context.

A 32K context needs around 8 GB.

The model fits. The model plus the desired context does not.

This is one of those details that looks obvious after seeing it happen.

Having enough memory to load a model does not mean having enough memory to actually use it.

I reduce the context to:

24,576 tokens

Now it starts.

Cold starts are not very cold

The first model load takes several minutes.

Caching the model weights improves subsequent starts dramatically, but it does not eliminate initialization.

With the model already cached, one successful startup looks approximately like this:

Load model weights:      ~46 seconds
Compilation:             ~35 seconds
Total engine startup:   ~144 seconds

More than two minutes pass before the model is ready.

A web application that receives steady traffic can keep an inference server alive. My coding agent is different.

I may ask it something, read the result, inspect code for five minutes, make a change myself, and then ask another question.

Keeping an A100 running while I think costs money.

Shutting it down saves money but brings the cold start back.

The serverless model is excellent at charging me only when I use compute.

The problem is that loading the model is also compute.

The 32B model is better

I repeat the transaction endpoint test.

This time the difference is noticeable.

The model correctly adds:

@GetMapping("/range")
public List<Transaction> getTransactionsInRange(
    @RequestParam LocalDate startDate,
    @RequestParam LocalDate endDate
) {
    return service.getTransactionsInRange(startDate, endDate);
}

It adds the service method and a Spring Data repository query while preserving ownership filtering.

The implementation is substantially better than the 14B attempt.

This is progress.

So I make the task slightly harder.

Now both dates are optional:

  • Both dates → transactions inside the range.
  • Only startDate → transactions from that date onward.
  • Only endDate → transactions until that date.
  • No dates → all transactions belonging to the logged-in user.

The model reasons through the four cases correctly. Then, it starts writing its explanation into the Java files. Markdown text appears after valid Java code.

Aider detects the broken files and asks the model to repair them. The repair makes another mistake. Then another.

After 3 attempts, Aider stops the reflection loop.

The reasoning was mostly correct, but the repository was broken.

A coding agent needs more than coding knowledge.

It needs to repeatedly follow a protocol:

  1. Understand the task.
  2. Inspect the correct files.
  3. Decide what to change.
  4. Produce an edit in exactly the expected format.
  5. Observe the result.
  6. Detect mistakes.
  7. Repair them without damaging something else.

A failure anywhere in that loop can invalidate an otherwise good solution.

Maybe the agent is the problem

At this point I have another question.

Perhaps Qwen 32B is capable enough, but Aider is not the right interface for it.

I test the same remote model with Junie, JetBrains' coding agent.

This produces another unexpected result.

Junie starts three GPU containers.

Instead of:

Junie
  │
  ▼
1 × A100

I briefly have something closer to:

Junie
  ├── request ──► A100
  ├── request ──► A100
  └── request ──► A100

The agent is making multiple requests, and Modal responds the way a serverless platform should: it scales.

For a web service, this is great.

For my experiment, I have just multiplied the GPU cost.

I restrict the deployment to one container and allow concurrent requests to share the same vLLM server instead.

That fixes the accidental horizontal scaling.

Junie still fails the first simple read-only task.

The logs reveal why.

One of Junie's internal model requests has a five-second timeout.

My remote 32B model cannot consistently process Junie's large system prompt and respond inside that window.

This is not really a Qwen coding failure.

It is an integration failure.

But from the perspective of using the system every day, the distinction does not help very much.

If the model and agent cannot work together, I still do not have a coding agent.

The model-size problem

The 32B model is clearly better than 14B. It is not dramatically better.

If doubling the model from 14B to 32B still leaves me supervising broken edits and repair loops, the next meaningful step probably is not 40B.

It may not even be 70B.

Looking at the current generation of models designed specifically for agentic coding, many of the serious contenders move into a very different class:

  • 100B+ dense models.
  • Mixture-of-Experts models containing hundreds of billions of parameters.
  • Models specifically trained for long tool-using workflows.

A Mixture of Experts model does not use every parameter for every token, but all those parameters still need to live somewhere.

Usually, that means more GPU memory, and more GPU memory usually means either a more expensive GPU or several GPUs.

My original cost hypothesis starts moving in the wrong direction.

Paying per hour does not remove usage management

Initially, I liked the simplicity of this idea:

Instead of worrying about tokens, rent a GPU for a predictable hourly price.

In practice, I replace token management with a different set of things to manage:

  • GPU type.
  • GPU memory.
  • Model precision.
  • Context size.
  • Cold-start time.
  • Cache storage.
  • Container lifetime.
  • Parallel containers.
  • Agent timeouts.
  • Model-server compatibility.

For some workloads, this level of control is exactly what you want. But for my personal coding agent, it changes the economics.

A small model is affordable but not reliable enough.

A larger model is better but requires a larger GPU.

A substantially larger model may require multiple GPUs.

Multiple GPUs increase the hourly cost.

Longer startup times add compute before I have generated a single useful answer.

Parallel agent requests can multiply the cost again.

Meanwhile, a managed model charges for the tokens actually processed.

The thing I was trying to avoid starts looking simpler.

What did Stage 2 prove?

Remote compute absolutely solves one problem from Stage 1.

My Mac no longer limits the model.

I successfully run a 32B BF16 model that would be impractical on my 16 GB machine.

But moving the model to the cloud does not automatically turn it into a reliable coding agent.

I run into four different limits:

ProblemWhat I observed
Model capability32B improves over 14B, but not enough for reliable autonomous work
GPU memory32B fits on an A100, but a 32K context does not fit comfortably with it
Startup latencyEven cached startup takes around two minutes
Agent integrationAider struggles with edit reliability; Junie expects faster responses
Serverless scalingConcurrent requests can start multiple expensive GPU containers

The most important lesson is that the model is only one part of the agent.

The model can understand the task and still fail to complete it.

The agent can be well designed and still fail because the model is too slow.

The infrastructure can scale perfectly and still scale my bill in the wrong direction.

Is remote self-hosting worth it?

For this experiment, no.

Not for the workflow I am trying to build.

Modal itself worked well. It made deploying GPUs, caching models, exposing an authenticated endpoint, and changing hardware straightforward.

I can see many workloads where this architecture makes sense.

  • A service with steady traffic can keep the model warm.
  • A batch workload does not care about interactive startup latency.
  • A company processing enough requests may make GPU-hour economics attractive.

My personal coding workflow is interactive, irregular, and latency-sensitive.

I want a powerful model immediately when I need it, and I want to stop paying when I am reading code or thinking.

For remote self-hosting to win here, I would need some combination of:

  • Much faster cold starts.
  • Larger models running on cheaper hardware.
  • Better agent support for slower self-hosted inference.
  • Enough continuous usage to keep the GPU busy.

Today, I do not have that combination.

Stage 2 started with the idea that renting compute could free me from thinking about tokens.

But GPU time can become an even bigger headache.