GeeeekExplorer/nano-vllm ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Python library like a mini vLLM for running local language models offline on a GPU. I want it to load a model from a local Hugging Face folder, accept a list of prompts, and return generated text with simple sampling settings like temperature and max tokens.
Keep the code easy to read and compact, more like a learning project than a huge framework, but still make it fast. Add batching, prefix caching, tensor parallel support if possible, torch compile support, and CUDA graph style optimizations where they make sense. The public API should feel simple, something like creating an LLM object, creating sampling params, then calling generate.
Please include a working example script using a small Qwen model path, plus a benchmark script that compares speed and tokens per second. Make it installable as a Python package and write a short README with setup, model download, quick start, and benchmark instructions. Look up current docs online if you need to.
Are you gonna build this?
make sure you review the code using coderabbit