README.md 889 Bytes
Newer Older
Woosuk Kwon's avatar
Woosuk Kwon committed
1
# CacheFlow
Woosuk Kwon's avatar
Woosuk Kwon committed
2
3
4
5

## Installation

```bash
6
pip install psutil numpy torch transformers
7
pip install flash-attn # This may take up to 10 mins.
Woosuk Kwon's avatar
Woosuk Kwon committed
8
9
10
pip install -e .
```

11
## Test simple server
Woosuk Kwon's avatar
Woosuk Kwon committed
12
13

```bash
Zhuohan Li's avatar
Zhuohan Li committed
14
ray start --head
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
python simple_server.py
```

The detailed arguments for `simple_server.py` can be found by:
```bash
python simple_server.py --help
```

## FastAPI server

Install the following additional dependencies:
```bash
pip install fastapi uvicorn
```

To start the server:
```bash
ray start --head
python -m cacheflow.http_frontend.fastapi_frontend
```

To test the server:
```bash
python -m cacheflow.http_frontend.test_cli_client
```

## Gradio web server

Install the following additional dependencies:
```bash
pip install gradio
```

Start the server:
```bash
python -m cacheflow.http_frontend.fastapi_frontend
# At another terminal
python -m cacheflow.http_frontend.gradio_webserver
Woosuk Kwon's avatar
Woosuk Kwon committed
53
```