vLLM

vLLM Blog

vllm代码思维导图总结


vLLM代码架构:

  • attention: paged attention相关,主要涉及backend、paged attention、flash attention和prefix_prefill
  • core:调度机制相关,主要涉及scheduler、block_manager和policy
  • distributed:分布式相关
  • engine:api相关,离线+在线
  • entrypoints:api和后端对接相关,llm和api_server
  • executor
  • lora
  • model_executor
  • spec_decode
  • transformers_utils
  • usage
  • worker

vLLM外部逻辑

image-20240626155335259

使用offline的方法,则会调用llm.py的generate函数

  1. 增加所有request
  2. 调用_run_engine进行推理

results matching ""

    No results matching ""