Local LLM Based Coding on HPC Equipment

Hey everyone,

​I’ve been developing custom simulation software for my business. Up until recently, my workflow consisted of standard text-based Google Gemini alongside VS Code—with me acting as the human copy-paste middleman for hours on end, using Gemini’s chat interface to help write, iterate, and debug the codebase.

​Since I have a substantial amount of local compute sitting idle between simulation runs, I decided to stop relying exclusively on web chat interfaces and start experimenting with local inference using Hermes, Ollama, vLLM, and SGLang.

My current infrastructure consists of two dedicated simulation servers and a collection of high-end GPUs:
​Host Setup: Server A (512GB DDR5 RAM) and Server B (1TB DDR4 RAM)
​GPUs: 1x NVIDIA RTX Pro 6000 Blackwell (96GB GDDR7) on Server A, 2x NVIDIA L40S, and 4x AMD Instinct MI210s on server B.
​Obviously, running open-weights local models doesn’t quite match top-tier frontier APIs right out of the box. However, because I spent hundreds of hours guiding Gemini through the logic and debugging every routine step-by-step, I deeply understand the software architecture and how all the components fit together.

Observations & Issues So Far:

​Inference & Web UI: Hermes with an agent dashboard web frontend has been the easiest to spin up and access across my local network. (Side rant: Chrome on Android refusing to auto-scroll chat windows is driving me nuts).

Context & Truncation: I immediately hit issues with output truncation on code blocks and commands. Bumping up the context window helped stabilize this somewhat, but it’s still a work in progress.

Model Selection: Qwen3.8-27B has been my primary model for Hermes and works the best of all the options I’ve tested so far for coding (including DeepSeek V4, Gemma4, and Qwen 3.7 Coder variants).

​The Dilemma:
I keep contemplating throwing in the towel and just paying for cloud API tokens. But with an RTX Pro 6000 Blackwell, two L40Ss, four MI210s, and 1.5TB of RAM sitting across my rack, it physically hurts to pay per token. Furthermore, forcing myself to make local models work is helping me write more modular code, structure prompt contexts better, and maintain complete ownership over my codebase.

A few questions for the community:
​Is anyone else using Hermes or vLLM/SGLang stacks with Qwen3.8-27B for serious daily coding projects on local hardware?

​What IDE integrations or agent frameworks are you using locally to replace the manual “copy-paste middleman” loop (e.g., Continue.dev, Cursor with local OpenAI-compatible endpoints, Aider)?

How are you tuning context limits or stopping sequences in vLLM to prevent mid-code block truncation on large generations?

​Would love to hear how others with local hardware are structuring their development workflows.

Do not throw in the towel and pay cloud token tolls when you are sitting on an RTX Pro 6000 Blackwell and dual L40Ss. That rack has more than enough horsepower to run circles around commercial APIs once you stop treating local models like a monolithic, single-agent chatbot.

The mid-code block truncations, stalls, and hallucinated diffs you’re seeing on Qwen3.8-27B aren’t fundamentally a model capability issue—they’re caused by monolithic context collapse. When a single agent attempts to handle user conversation, ingest entire codebases, plan high-level architecture, generate 300-line diffs, and parse build logs all in one stream, its context window rapidly drowns in noise. Generation quality drops off a cliff, and the model runs out of output tokens trying to stream massive updates.

The solution that completely eliminated this for me was moving to a split Director/Worker architecture inside an agentic IDE setup. In my own environment, I pipe the Director to a smaller 2× RTX 5000 rig running Qwen3.8-27B (IQ4 @ 256k context, Q8 KV-cache, reasoning set to Medium), while my heavy workers run on a dedicated inference server with full BF16 KV-cache, reasoning set to Extra-High, and massive context windows (up to 650k in vLLM) handling up to 4 concurrent sub-agents. The Director is strictly firewalled and instructed never to write, read, or inspect code itself—it acts purely as an air-traffic controller delegating bite-sized, chunked tasks to the sub-agents who do the actual heavy lifting, deep thinking, and iterative testing. This keeps the Director’s active context tiny, fast, and pristine, while giving the sub-agents the full compute headroom needed to execute cleanly without choking.

The Tooling: Why Kilo Code Over Roo Code

If you want to kill the “human copy-paste middleman” routine, look at Kilo Code (a VS Code extension). I migrated over after hitting walls with Roo Code, and Kilo is currently the furthest along and most actively maintained option for this workflow:

  • Native VS Code Integration: You stay in the editor you already use. Open your workspace folder, and the agents track git status, resolve dependencies, run builds, create feature branches, and push to GitHub automatically.

  • Granular Per-Agent Endpoint Routing: You aren’t locked into a single global model. Kilo lets you configure independent API endpoints, custom system prompts, temperatures, and sampling parameters per agent profile. You can route your orchestrator to one host and blast concurrent worker requests to an entirely separate vLLM cluster.

  • Built-in Multi-Agent Concurrency: It natively manages multiple sub-agents working simultaneously in parallel without thread-locking the IDE.

  • Layman’s Terms Direction: You don’t micro-manage files. You give the Director high-level intent in plain English (“Refactor the simulation state accumulator to handle fixed-timestep delta updates”), and it manages the breakdown, delegation, testing, and merging across its sub-agents.

Mapping It to Your Hardware

Here is how I would split your specific rack to maximize throughput and stability:

  • Sub-Agents (The Heavy Lifters): Server A (RTX Pro 6000 Blackwell 96GB)

    • Blackwell’s dedicated FP4 Tensor Cores are made for this: run an NVFP4 quantized Qwen3.8-27B via vLLM or SGLang.

    • 96GB of GDDR7 gives you the VRAM to host 3–4 concurrent workers with unquantized BF16 KV-cache and massive context headroom so workers can use high reasoning budgets and iterate through test suites without OOM issues.

  • The Director (The Orchestrator): Server B (Pool BOTH NVIDIA L40Ss)

    • Instead of running a single L40S, pool both cards together via Tensor Parallelism (--tensor-parallel-size 2 in vLLM or llama.cpp) running a Q4 quant.

    • Dual L40Ss give you 96GB of total VRAM. While 256k context on an orchestrator is workable, pooling both cards lets you comfortably push 512k+ context for the Director without grinding generation speed to a crawl. That headroom allows your overarching development cycles and task histories to run almost indefinitely without context rot.

The 4 Architectural Rules

1. Hard Firewall the Director

Strip the Director of all engineering tools. In Kilo Code’s agent settings, allow it only two tools: task (to dispatch sub-agents) and todowrite (task checklist tracking).

  • Hard ban read, write, bash, glob, and grep.

  • When told to “fix this bug,” the Director cannot look at code. It is forced to delegate to explore (recon) or general (builder). Its context stays clean because it only sees high-level routing logic.

2. Strict Micro-Chunking (One File / ~50–100 Lines)

Never assign open-ended features. The Director breaks work into atomic units:

  • 1 Chunk = 1 file or 1 isolated function.

  • Workers operate in dedicated Git branches (branch/chunk-[N]).

  • Pipeline work using a sliding window: while Worker A writes Chunk N, Worker B audits/tests Chunk N-1 and merges to main.

3. State on Disk, Not in Context

To stop mid-generation truncations, ban raw code dumps and test stdout from the chat stream:

  • Architectural plans live on disk in plans/PLAN.md.

  • Active concurrency leases live on disk in DEV_LOG.md under an @@@ ACTIVE_WORKERS @@@ board.

  • Workers modify code using native atomic tools (write_to_file, apply_diff)—never bash heredocs or pipe redirects.

4. The 3-Line “Semantic Pulse” (Zero Yapping)

Sub-agents are strictly forbidden from returning conversational filler or code diffs to the Director. When finished, they report back using only a 3-line structured payload:

Plaintext

STATUS: [SUCCESS / FAILED] | TARGET: [explore / general] | TASK: [Task ID]
DECISION: [1-sentence summary of modifications made or tests executed. Max 25 words.]
AHEAD: [1-sentence downstream dependency or risk warning. Max 20 words.]

If a sub-agent hits an error or test failure, it dumps the diagnostic log directly to DEV_LOG.md on disk and returns STATUS: FAILED. The Director dispatches a fresh worker to read the log and patch the branch.

Starter Prompts & Agent Configuration

Critical Sampling Note for Qwen: Do not set your temperature below 0.6 on Qwen3.8-27B. While older models and Claude thrive at near-zero temperatures for coding, Qwen models get brittle, fall into repetitive token loops, and stall out if you run them too cold. Keep temperature at 0.6 across both the Director and workers to give the model the entropy it needs to reason through code syntax.

You can configure these agents via Settings → Agent Behaviour → Agents in Kilo Code or save them directly as Markdown files with YAML frontmatter in .kilo/agents/:

1. Director (.kilo/agents/director.md)

  • Endpoint: Server B (Dual L40S TP=2)

  • Temperature / Top-P: 0.6 / 0.95

  • Permissions: Enable task, todowrite. Explicitly deny read, edit, write, bash, glob, grep.

Markdown

---
name: director
description: Dispatcher and orchestrator. Does not inspect or edit code.
mode: primary
model: local-vllm/dual-l40s-tp2-endpoint
temperature: 0.6
top_p: 0.95
permission:
  task: allow
  todowrite: allow
  bash: deny
  edit: deny
  read: deny
---
<CRITICAL_FIREWALL>
YOU ARE A DISPATCHER AND AIR-TRAFFIC CONTROLLER ONLY. YOU ARE NOT AN ENGINEER.
YOU DO NOT HAVE TOOLS TO READ, SEARCH, WRITE, OR RUN CODE.

TOOL WHITELIST:
You are permitted to call EXACTLY TWO tools: `task` and `todowrite`.
Calling any other tool is a protocol breach.

USER PROMPT TRANSLATION:
When the user asks to build, fix, review, or test:
DO NOT investigate the files yourself. Your ONLY valid response is:
1. One-sentence status acknowledgment.
2. Update `todowrite` with high-level task milestones.
3. Call `task` to dispatch exploration or implementation to subagents.
</CRITICAL_FIREWALL>

<MICRO_CHUNKING_LAW>
Monolithic tasks cause context exhaustion. Strictly bound all worker assignments:
- 1 Chunk = Exactly 1 file or 1 isolated function (max 50-100 lines changed).
- Enforce the 3-line Semantic Pulse format on all returns.
</MICRO_CHUNKING_LAW>

<ROUTING_TARGETS>
- TARGET `explore`: Read-only repo exploration, symbol searches, and reading state logs.
- TARGET `general`: Authoring `plans/PLAN.md` on disk, atomic code edits, and running tests via bash.
</ROUTING_TARGETS>

2. General Worker (.kilo/agents/general.md)

  • Endpoint: Server A (RTX Pro 6000 Blackwell NVFP4)

  • Temperature / Top-P: 0.6 / 0.95

  • Permissions: Enable read, edit, write_to_file, apply_diff, bash. Deny task.

Markdown

---
name: general
description: Builder subagent for implementation, atomic file writes, and test execution.
mode: subagent
model: local-vllm/blackwell-nvfp4-endpoint
temperature: 0.6
top_p: 0.95
permission:
  task: deny
  bash: allow
  edit: allow
  read: allow
---
<OPERATIONAL_MANDATE>
You are the General Execution Agent. You perform atomic planning on disk, write code, run tests, and manage git operations.
</OPERATIONAL_MANDATE>

<RULES_OF_ENGAGEMENT>
1. ATOMIC FILE WRITES ONLY: Use native file tools (`write_to_file`, `apply_diff`). You are STRICTLY FORBIDDEN from using bash streams (`>`, `>>`) or heredocs (`cat << 'EOF'`) to create or edit files.
2. DISK OVER CONTEXT: Never dump raw source code, full file listings, or verbose test outputs into chat. Write plans to `plans/PLAN.md` and runtime diagnostics to `DEV_LOG.md`.
3. GIT DISCIPLINE: Work strictly on your assigned branch (`branch/chunk-[N]`). Run build and test suites via bash before completing tasks.
</RULES_OF_ENGAGEMENT>

<ANTI_YAPPING_OUTPUT_FORMAT>
Your final response to the Director MUST consist EXACTLY of this 3-line Semantic Pulse:

STATUS: [SUCCESS / FAILED] | TARGET: general | TASK: [Task Identifier]
DECISION: [1-sentence summary of modifications made or tests executed. Max 25 words.]
AHEAD: [1-sentence downstream dependency warning. Max 20 words.]
</ANTI_YAPPING_OUTPUT_FORMAT>

3. Explorer (.kilo/agents/explore.md)

  • Endpoint: Server A (Blackwell) or Server B (Dual L40S)

  • Temperature / Top-P: 0.6 / 0.95

  • Permissions: Enable read, glob, grep, webfetch. Deny bash, edit, write, task.

Markdown

---
name: explore
description: Fast, read-only reconnaissance and state inspector.
mode: subagent
model: local-vllm/blackwell-nvfp4-endpoint
temperature: 0.6
top_p: 0.95
permission:
  task: deny
  bash: deny
  edit: deny
  write: deny
  read: allow
  glob: allow
  grep: allow
---
<OPERATIONAL_MANDATE>
You are the Surgical Reconnaissance Agent. You perform fast, read-only searches, directory mapping, and state audits.
</OPERATIONAL_MANDATE>

<RULES_OF_ENGAGEMENT>
1. STRICT READ-ONLY: You have no file modification tools and no bash access. Do not attempt to write or edit code.
2. SURGICAL EXTRACTION: Never dump entire files or large directory trees into chat. Extract only the targeted symbols, file lists, or specific state markers (e.g., from `DEV_LOG.md`).
</RULES_OF_ENGAGEMENT>

<ANTI_YAPPING_OUTPUT_FORMAT>
Your final response to the Director MUST consist EXACTLY of this 3-line Semantic Pulse:

STATUS: [SUCCESS / FAILED] | TARGET: explore | TASK: [Task Identifier]
DECISION: [1-sentence summary of findings. Max 25 words.]
AHEAD: [1-sentence structural or dependency observation. Max 20 words.]
</ANTI_YAPPING_OUTPUT_FORMAT>

What the Daily Loop Looks Like

Once set up, the daily interaction is completely hands-off from manual pasting:

  1. Open your project folder in VS Code.

  2. Select the Director in Kilo Code’s chat panel.

  3. Prompt with high-level intent: “Add a multi-threaded telemetry logger for simulation frame ticks.”

  4. The Director tracks the milestones in your IDE task checklist, tasks explore to inspect project interfaces, commands general to draft a plan in plans/PLAN.md, and cascades single-file chunk tasks across parallel feature branches.

  5. Workers run tests locally via bash, sign leases in DEV_LOG.md, push branches, and return three-line pulses to the Director, which coordinates merges into main.

This can / will get you started, there are obviously infinite tweaks and prompt modifications that can be done as you become familiar with the setup and become more aware of your personal coding style / workflow. Remember if the agent is doing something you don’t like or things need to be tweaked, modify the prompt to ask whichever agent to perform the way you would like or prefer in a scenario. This way ou keep complete local code ownership, eliminate truncation entirely, and actually put that 96GB GDDR7 Blackwell card and dual L40S setup to work instead of paying for cloud tokens.

Aslo: come drop into the L1 Ai-ML Discord

There is always a ton of great information and people that are doing and experimenting with this type of use case all the time (including myself).

12 Likes

I wish I could give you a super heart for this post. :growing_heart:

2 Likes

Just WOW…. I have been using Hermes and I basically took your post after I was able to get the 2x L40S GPUs on TP=2 with vLLM on Qwen3.8 with a huge context and loaded your post into the chat and had Hermes setup Hilo on my code server. Hermes was able to setup Hilo and I was able to get it up and running just as you explained. Thank you! I will let you know how it goes.

3 Likes

Right on, That’ll be interesting to see how that evolves. A couple things of note:

Not running in an IDE, this setup you have explained will not have direct linting or git function tracking the agent’s code modifications directly and the agents will instead need to run linters and git via cmd - Furthermore they may not do so unless instructed to - That being said you might need to add a “test cycle” of sorts to your director to spawn a qa agent after each cycle or however frequent you deem necessary. LLMs are not great all the time at linting their own code nor git tracking / branching and can end up causing more work for themselves needing to unravel the tangle they will inevitably find themselves in. (Guardrails)

This is going surprisingly well… I am burning through 30M+ tokens a day so far and I am very surprised how well Qwen3.8 is doing once I got the bugs works out and agents stopped failing. I have Gitea all setup, a robust backup of the system every night in case it decided to stop working. I had a communication scare last night where I thought it committed silicon suicide but it ended up just being a tailscale failure. Thank you again!

1 Like

That’s awesome! If you come across some interesting findings or things you find that work better, I’d hope you’ll share here in the forum. It’s an ever evolving and fast paced scene, it’s great to see and learn from each other.

I love this.

I feel like there is a serious lack of good/usable tutorials on here for this stuff. The only other one that I’ve found was the How I do LLM assisted code reviews post.

I hope we can get some focused threads on these topics and more details on how to build out a good personalized workflow since it seems like a lot of people like to customize and it’s pretty hard to go from 0 to giant very granular skill documents.

I am finding that the settings are not universal. What works for Kilo code does not work for Turnstone, what works for Turnstone does not work for Hermes. I am playing with all 3 right now. I am using Hermes to help setup and maintain my system. Hermes is great for setting up GIT, sharing services over Tailscale, installing VS Code, system diagnostics and so on. Turnstone I have been exploring because I can give it system access to work on programs and automation of smoke tests, I am finding that Turnstone needs a lot of hand holding and customization, at least with Qwen 3.8-27b. Kilo code has so far been amazing with but it is quite sandboxed and I have to manually smoke test software. Getting Qwen3.8-27b to not go over the 265k context limit of the model has been the hardest part of the entire process and Kilo code has made that the easiest of the 3.

You have a lot of vram - can you push past 256k?

Also, what is going over 256k? I might be able to offer some insights as I’ve worked hard to “dial in” my agents for doing the same thing in many different ways. Furthermore, kilocode has some settings that are not accessible via the settings tab itself that I can help you configure.

When I try to push past 256k I was told that the model only supports 256k, the error that I always get is too many output tokens.

You need to use Rope / yarn to increase the context amount over the base 256k for Qwen 27b. It’s fairly simple for both llama.cpp and vllm. It boils down to what multiplayer over 256k you want over 256k and the right why to enable it for your backend. For instance I use vllm and have a 650k context window so I use a multiplier of 2.5 in my vllm rope flag. 2.5*262144=655360

Swift Qwen3.8 on both computers with LiteLLM as a tool to load ballance has been fantastic. I am getting over 500 tokens per second now.

1 Like

Wow! I’m jealous! That’s awesome that you’ve got everything working so well! - How’s LiteLLM? I have not played with it yet.

It appears to be working really well. My Windows PC is running Ollama still and my Ubuntu server is running vLLM and LiteLLM is deligating calls to each and it appears to work quite well so far. I have had Turnstone and Kilo both churning away at the same time with no delays or issues.

1 Like

With all the recent hype surrounding JEV and classifier models have you been looking into adding a classifier into the mix?

Ehh, Not really. As it stands I’m using tools and harnesses that already have this worked out. I’m not really in the business of building harnesses as much as figuring out how to best utilize them in what use case I find myself needing. Also, I’m very much against using a cloud based backend for anything and run all my Ai locally. Once they become open sourced and dialed in, I might see utilizing them in my projects in place of more complicated code based routing - but for coding harness and decision making, I don’t think it would really make a difference at this point.

I started to explore JEV but I quickly learned that it isn’t really suited for the broad engineering, design, and research that I am doing. It seems much better for classifying things like customer interactions with an e-commerce chat bot.

1 Like

I appear to be able to reduce the token per task count somewhat by running prompt optimization tests. The results are pushing the prompts toward microtasks that are designed to get to the point as fast as possible and limit extended reasoning while still producing the same outcome.

Having used Qwen 3.8 27B extensively, and gone round and round trying to get it to think efficiently…I’ve swapped in Swift 1.5 27B, and it’s an absolute revelation. I’ve noticed no degradation in task completion or accuracy (I’m on FP8), but it’s so much more efficient with its thinking that it cuts wall time - and token burn - by almost 50%. No more doom loops or “But wait…” recursion, and more importantly, no output truncation due to excessive thinking. Fine-tunes are usually junk, but Swift appears to be the real deal - it’s a straight upgrade on the original, no drawbacks that I can see.

I’d strongly recommend you give it a go. Also, RoPE/YaRN for context extension works great with these models, it’s also worth trying.

However, my current approach is to stick with the default 256k and get the main agent to spawn a subagent to do investigations and the like, so it doesn’t pollute the main agent’s context with any intermediate steps. For reference, I’m using vllm-radiance on 64GB total VRAM with FP8 model and FP8 KV cache, which means I’ve got roughly 2.5x context capacity - basically, I can have a main agent and a subagent run to max context and still have some left over. Combine that with OpenCode’s Magic Context extension, and no reasonably-defined task ever runs out of context.