Code Monkey home page Code Monkey logo

llm_inference_engine_benchmark's Introduction

llm_inference_engine_benchmark

This repository aims to evaluate various open-source inference frameworks, analyzing their strengths and weaknesses.

Thanks for the res: pandada8/llm-inference-benchmark: LLM 推理服务性能测试 (github.com) https://github.com/ninehills/llm-inference-benchmark

Information

  • Hardware: Nvidia H800
  • LLM model: llama2
  • llm inference engine: llama.cpp, vllm, fastllm
  • 指标:
    • Thoughtput
    • none-first Token Latency
    • First Token Latency

Run

llama.cpp

  • In the llama.cpp directory, run the llama.cpp server.
~/code/llama.cpp$ CUDA_VISIBLE_DEVICES=0 ./server --n-gpu-layers 999 --host 127.0.0.1 --port 8082 -m models/llama-2-7b/llama-2-7b-7B-F16.gguf

--n-gpu-layers the number of layer load to GPU. Set 999 making all layers load to GPU.

--host Set the hostname or ip address to listen. Default 127.0.0.1.

--port Set the port to listen. Default: 8080

-m The model path.

more parameters and detail can be learned from: llama.cpp and llama.cpp-server and other literature.

  • In the llm_inference_engine_benchmark directory, run the test code for llama.cpp.
python benchmark.py --model llama --backend llama.cpp --endpoint http://127.0.0.1:8082

## draw the result
python draw.py

--endpoint The endpoint for the server.

--model llama meanings the family of llama.

vllm

  • run the vllm serve
python -m vllm.entrypoints.openai.api_server  --model model_executor/models/Llama-2-7b-hf/ --host 127.0.0.1 --port 8082
  • run the test code for vllm.
python benchmark.py --model llama --backend vllm --endpoint http://127.0.0.1:8082

fastllm

  • run the fastllm serve
~/code/fastllm/build$ ./webui -p ../mode_zoo/llama2-7b.flm --port 8082
  • run the test code for fastllm.
python benchmark.py --model llama --backend fastllm --endpoint http://127.0.0.1:8082

Result

Thoughput

Throughput

Averge Token Latency

none-first Token Latency

First Token Latency

First Token Latency

llm_inference_engine_benchmark's People

Contributors

menghuazheng avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.