executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
offline-inferenceUse nano-vLLM for CUDA-backed offline Qwen3 generation from local Hugging Face weights, including prompt batching, chat templates, sampling parameters, and output interpretation.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this route when the task is to generate text locally with
nanovllm.LLM. It assumes a complete local Qwen3-compatible model directory;
this implementation does not accept a remote model id by itself and does not
provide a CPU fallback.
scripts/check_env.py and require CUDA.safetensors files.enforce_eager=True, tensor_parallel_size=1, and a small
max_tokens value.text and token_ids, and that result order
matches input order. Move to
../performance-tuning/SKILL.md only after
correctness is established.Read references/api-reference.md for signatures and output shape, references/workflows.md for model and chat-template recipes, and references/troubleshooting.md for failure recovery.
from nanovllm import LLM, SamplingParams
llm = LLM("/path/to/local-qwen3", enforce_eager=True, tensor_parallel_size=1)
params = SamplingParams(temperature=0.6, max_tokens=128)
results = llm.generate(["Explain KV caching in one sentence."], params)
print(results[0]["text"])
llm.exit()
generate also accepts list[list[int]] token-id prompts. Pass a list of
SamplingParams with the same length as the prompts when requests need
independent temperatures or budgets. temperature must be positive; greedy
sampling is intentionally rejected by SamplingParams.
if __name__ == "__main__": because tensor parallelism uses spawned worker
processes.ignore_eos=True only when deliberately measuring fixed token budgets;
otherwise EOS can finish a request before max_tokens.