Works with the AI Agents you already use
local llm hardware fit
by NZ1Labs
Fit and optimize LLMs for 100% VRAM residency on lab GPU nodes using Ollama and llama-server.
Free
local llm hardware fit
Example session with this skill installed
I need to fit Qwen3.8-27B on GPU-NODE (2x 3060 24GB total). How do I set the Modelfile and verify zero CPU offload at 132k context?
- Read your context and instructions
- Compiled the local llm hardware
I will calculate the layer count, generate the Modelfile, and provide verification commands for your pooled VRAM setup.
GPU-NODE 27B Fit Configuration
Qwen3.8-27B has a block_count of 65. To achieve 100% VRAM residency, you must set num_gpu to 66 (layers + predictor).
1. Create the Modelfile
Run this on GPU-NODE via SSH to define the optimized model:
ssh llm-user@your-gpu-node "cat > /tmp/qwen_fit <<'EOF'
FROM qwen3.8:27b
PARAMETER num_ctx 135168
PARAMETER num_gpu 66
EOF
ollama create qwen3.8:27b-132k -f /tmp/qwen_fit"
2. Verify VRAM Residency
Warm the model and check the processor allocation. If the PROCESSOR column shows anything less than 100% GPU, the KV cache is spilling to system RAM.
# Trigger a non-thinking generation
curl -s -X POST http://YOUR_OLLAMA_HOST:11434/api/generate \
-H \"Content-Type: application/json\" \
-d '{\"model\":\"qwen3.8:27b-132k\",\"prompt\":\"test\",\"stream\":false,\"think\":false}' > /dev/null
# Check residency status
ssh llm-user@your-gpu-node \"ollama ps\"
3. Hardware Audit
Confirm the pool is spanning both cards without exceeding the 24GB ceiling:
ssh llm-user@your-gpu-node \"nvidia-smi --query-gpu=memory.used,memory.total --format=csv\"
Next steps
- Check
df -h /on GPU-NODE to ensure the 17GB blob copy didn't fill the root disk. - Verify the Master Schedule to ensure no render windows (06:50–09:10 NZT) are active before running long inference.
- If tok/s is below 10, consider dropping context to 96k to free up VRAM headroom.
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
Running local LLMs on consumer hardware often results in frustrating CPU offload, poor token speeds, and out-of-memory errors. Developers waste hours guessing layer counts and context sizes instead of achieving 100% VRAM residency.
What it does
- Calculates exact
num_gpulayer counts and context limits for 100% VRAM residency. - Handles Ollama binary upgrades on Linux via GitHub
.tar.zstassets when official downloads fail. - Configures
llama-serverwith CUDA pinning and KV cache optimization for dual-GPU pools. - Verifies model compatibility across mixed hardware including Nvidia and AMD GPU's.
- Audits inference processes using
nvidia-smiandollama psto ensure zero CPU spill.
Frameworks & tools
Ollama, llama.cpp (llama-server), CUDA 12.8, ROCm/Vulkan, Ubuntu/Linux, and WSL2.
Why this beats prompting it yourself
Generic LLMs don't understand the specific quirks of pooled VRAM, ROCm Polaris limitations, or the text file busy errors during binary swaps. This skill provides a concrete technical playbook based on real lab telemetry and hardware-specific edge cases.
Use cases
- Fitting a 27B model into a 24GB pooled VRAM environment with 128K context.
- Recovering from
invalid argument: --load-modeerrors after broken Ollama updates. - Deploying
llama-serverwith shared library fixes (.solinking) on headless Linux nodes. - Benchmarking context ladders for new GGUF quants to find the real VRAM ceiling.
Known limitations
Requires SSH access to target nodes. Does not support Flash-Next MoE models on single 24GB cards due to physical VRAM constraints. Linux-centric; avoids Windows shell commands for GPU-NODE operations.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
5 uses
Times used to date
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 2 months ago
- Free with an Agensi account
- Accounts
Hugging Face
GitHub
Ollama
Nvidia
Permissions
Allowed Hosts
What's inside
Frequently Asked Questions
New in LLM Ops
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.