using_cli.md 1.11 KB
Newer Older
Merve Noyan's avatar
Merve Noyan committed
1
2
# Using TGI CLI

3
You can use TGI command-line interface (CLI) to download weights, serve and quantize models, or get information on serving parameters. To install the CLI, please refer to [the installation section](../installation#install-cli).
Merve Noyan's avatar
Merve Noyan committed
4

OlivierDehaene's avatar
OlivierDehaene committed
5
`text-generation-server` lets you download the model with `download-weights` command like below 👇
Merve Noyan's avatar
Merve Noyan committed
6
7
8
9
10

```bash
text-generation-server download-weights MODEL_HUB_ID
```

OlivierDehaene's avatar
OlivierDehaene committed
11
You can also use it to quantize models like below 👇
Merve Noyan's avatar
Merve Noyan committed
12
13

```bash
OlivierDehaene's avatar
OlivierDehaene committed
14
text-generation-server quantize MODEL_HUB_ID OUTPUT_DIR
Merve Noyan's avatar
Merve Noyan committed
15
16
```

OlivierDehaene's avatar
OlivierDehaene committed
17
You can use `text-generation-launcher` to serve models.
Merve Noyan's avatar
Merve Noyan committed
18
19
20
21
22

```bash
text-generation-launcher --model-id MODEL_HUB_ID --port 8080
```

OlivierDehaene's avatar
OlivierDehaene committed
23
There are many options and parameters you can pass to `text-generation-launcher`. The documentation for CLI is kept minimal and intended to rely on self-generating documentation, which can be found by running
Merve Noyan's avatar
Merve Noyan committed
24
25
26

```bash
text-generation-launcher --help
OlivierDehaene's avatar
OlivierDehaene committed
27
```
Merve Noyan's avatar
Merve Noyan committed
28
29
30
31
32
33
34
35

You can also find it hosted in this [Swagger UI](https://huggingface.github.io/text-generation-inference/).

Same documentation can be found for `text-generation-server`.

```bash
text-generation-server --help
```