Works with the AI Agents you already use

    local llm hardware fit

    by NZ1Labs

    2

    Fit and optimize LLMs for 100% VRAM residency on lab GPU nodes using Ollama and llama-server.

    Free

    5 usesSecurity scanned
    local llm hardware fit

    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_gpu layer counts and context limits for 100% VRAM residency.
    • Handles Ollama binary upgrades on Linux via GitHub .tar.zst assets when official downloads fail.
    • Configures llama-server with 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-smi and ollama ps to 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-mode errors after broken Ollama updates.
    • Deploying llama-server with shared library fixes (.so linking) 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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 FaceGitHubOllamaNvidia

    Permissions

    Terminal / Shell
    Network Access

    Allowed Hosts

    huggingface.co
    ollama.com
    api.github.com
    github.com
    developer.download.nvidia.com
    Listed2 months ago

    What's inside

    Frequently Asked Questions

    This skill analyzes your specific GPU hardware (Nvidia or AMD) to calculate the exact layer counts and context window limits needed to keep your LLMs entirely within VRAM, preventing performance-killing CPU offloading.

    It is optimized for Linux-based environments, specifically Ubuntu and WSL2, and supports hardware configurations ranging from single consumer GPUs to dual-GPU pools using CUDA or ROCm.

    Yes, the skill includes specialized logic for handling manual Ollama binary upgrades via GitHub assets, which is essential for fixing 'text file busy' errors or broken official installers on headless nodes.

    You will receive a technical playbook and set of automated routines for configuring llama-server, managing GGUF quant fitment, and auditing inference processes to ensure zero CPU spill.

    It supports a wide range of GGUF-based models; however, it cannot bypass physical hardware limits for extremely large models (like massive MoEs) that exceed your total pooled VRAM capacity.

    While the skill focuses on deep hardware optimization for Ollama and llama-server, the resulting optimized endpoints are fully compatible with any AI agent or framework that connects via standard OpenAI-compatible APIs.

    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.

    Free