self-hosted-llm-batch-inference

self-hosted-llm-batch-inference is a skill for Claude Code from awslabs/startups. It costs 170 tokens per session (1,159 once invoked), scanned A, original, Apache-2.0.

A deployment guide for recurring, offline language-model inference on AWS, meaning running a language model on stored data rather than answering users immediately. It uses AWS Batch and ECS Spot capacity to process corpus shards with a self-hosted model and recover from interruptions.

In plain words
What is it for?
Use it for recurring batch processing with a self-hosted 1B–8B generative model, including storing model weights, splitting input data, submitting runs, and processing shards with vLLM.
Why use it?
It provides a repeatable way to run delayed GPU jobs while limiting infrastructure and idle-capacity costs. It separates reusable cloud infrastructure from each individual corpus run.

Skill for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin.

Part of the aws-startups-solution-architecture plugin — 3 skills shipped together

Good fit Use it for recurring batch processing with a self-hosted 1B–8B generative model, including storing model weights, splitting input data, submitting runs, and processing shards with vLLM.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/awslabs/startups/self-hosted-llm-batch-inference
About the project

AWS Startups is an official AWS repository containing plugins, skills, tools, and other resources for people building startup products on Amazon Web Services. Its add-ons support startup-focused architecture, migration, and development work on AWS.

awslabs/startups · 24 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add awslabs/startups --skill self-hosted-llm-batch-inference
Clone the repo
git clone --depth 1 https://github.com/awslabs/startups

Made for: Claude Code.

Or install aws-startups-solution-architecture, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for self-hosted-llm-batch-inference

README.md
[![agentmods](https://agentmods.dev/badge/skills/awslabs/startups/self-hosted-llm-batch-inference/github.svg)](https://agentmods.dev/skills/awslabs/startups/self-hosted-llm-batch-inference)
Your own site
<a href="https://agentmods.dev/skills/awslabs/startups/self-hosted-llm-batch-inference"><img src="https://agentmods.dev/badge/skills/awslabs/startups/self-hosted-llm-batch-inference/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for self-hosted-llm-batch-inference

Your own site · 80×15
<a href="https://agentmods.dev/skills/awslabs/startups/self-hosted-llm-batch-inference"><img src="https://agentmods.dev/badge/skills/awslabs/startups/self-hosted-llm-batch-inference.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 170 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,159 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00170 $0.01159
Opus 5.5 $0.00068 $0.00464
Sonnet 5.5 $0.00034 $0.00232
Haiku 4.5 $0.00017 $0.00116

Measured 1mo ago against content hash 5bc070c185d8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

self-hosted-llm-batch-inference scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

solution-architecture/plugins/aws-startups-solution-architecture/skills/self-hosted-llm-batch-inference/SKILL.md · 88 lines

How it starts

The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Self-Hosted LLM Batch Inference

Build a repeatable offline inference path for a startup that needs GPU economics without operating an ML platform. Use one AWS Batch job for one corpus run, backed by Amazon ECS Managed Instances Spot. Stage model weights in Amazon S3, divide the corpus into deterministic shards, and process those shards sequentially with vLLM on one GPU.

Keep the infrastructure stack separate from each run. Provision reusable Batch, ECR, IAM, logging, and optional networking resources with infrastructure as code. Submit each run separately with immutable image, model, prompt, input manifest, and output identifiers.

Set scaleInAfter to 0 for this architecture. No follow-up task is expected on the instance after the Batch job ends, so retaining idle GPU capacity adds cost without improving the run.

Scope

Apply this skill only when all of these conditions hold:

  • The workload is recurring, latency-tolerant, generative offline inference.
  • The model is approximately 1B to 8B parameters and fits on one GPU after measurement.
  • The team accepts Spot interruption and requires automatic recovery.
  • One model is loaded once and reused across many input shards in a corpus run.
  • Persistent artifacts and completion records can live in Amazon S3.

Do not apply this skill to online endpoints, training or fine-tuning, embedding models, other inference engines, multi-GPU or distributed inference, or one-off experiments where an operator can rerun the command manually.

Workflow

  1. Read references/prepare-model-and-input.md and define the immutable model artifact, prompt contract, deterministic shard manifest, output schema, quarantine schema, and measured sizing inputs.
  2. Read references/run-with-aws-batch.md and author the reusable infrastructure plus the separate SubmitJob invocation. Preserve one Batch job per corpus run.
  3. Read references/verify-and-optimize.md before the canary and again after the full run. Reconcile records, confirm retry behavior, measure cost inputs, and verify that GPU capacity has terminated.

Read the full file on GitHub · 88 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 88 lines · 170 tokens per session scan A 5bc070c185d8

Subscribe to this mod's changes

self-hosted-llm-batch-inference is a skill published in the GitHub repository awslabs/startups (24 stars, last pushed 12d ago), licensed Apache-2.0. It adds 170 tokens to every session and 1,159 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-12.

Related

Other skills, from other repositories

tensorrt-llm

High-throughput LLM inference on NVIDIA GPUs.

NousResearch/hermes-agent · 18 tokens

agent-platform-tuning

Agent Platform Model Tuning. Use when you need to fine-tune open models or Gemini models using Agent Platform infrastructure. Don't use for model training outside Agent Platform, model deployment to endpoints (use agent-platform-deploy), or managing serving endpoints (use agent-platform-endpoint-management).

google/skills · 64 tokens

google-cloud-solution-guided-gke-ai-migration

Guides the migration of existing AI workloads (Cloud Run, Gemini API, Gemini Enterprise Agent Platform) to self-hosted GKE inference using gcloud and kubectl. Use when the user has an existing AI inference workload (on Cloud Run, the Gemini API, Gemini Enterprise Agent Platform, or a custom VM) and wants to move it to…

google/skills · 157 tokens

modal

Modal is a serverless cloud platform for running Python on demand, including on-demand GPUs. Use when deploying or serving AI/ML models, running GPU-accelerated workloads (training, fine-tuning, inference), serving web endpoints, scheduling batch jobs, or scaling Python code to cloud containers with the Modal SDK.

K-Dense-AI/scientific-agent-skills · 65 tokens

agent-platform-endpoint-management

Manages Agent Platform serving endpoints. Use when you need to create, list, describe, update, or delete serving endpoints for model deployment on Agent Platform. Also use when troubleshooting endpoint permission, quota, or resource busy errors. Don't use for deploying models to endpoints or for running model…

google/skills · 64 tokens

gke-inference

Deploys and optimizes AI/ML inference workloads on GKE, using GPUs, TPUs, and model servers. Use when deploying GKE inference servers, configuring GKE GPU resources for inference, or deploying LLMs on GKE. Don't use for migrating existing AI workloads to GKE (use google-cloud-solution-guided-gke-ai-migration), GKE RAG…

google/skills · 119 tokens