Skip to content

Commit

Permalink
Update README.md: add install essential packages part when quantize m…
Browse files Browse the repository at this point in the history
…odel. (#114)

* Update  README.md: add install essential packages part when quantize model.

* Make description more concise

---------

Co-authored-by: Gu Yu <[email protected]>
Co-authored-by: lijiahao <[email protected]>
  • Loading branch information
wizardbyron and li-plus authored Sep 28, 2023
1 parent 0f4daee commit 9be06f0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ git submodule update --init --recursive

**Quantize Model**

Install necessary packages for loading and quantizing Hugging Face models:
```sh
python3 -m pip install -U pip
python3 -m pip install torch tabulate tqdm transformers sentencepiece
```

Use `convert.py` to transform ChatGLM-6B or ChatGLM2-6B into quantized GGML format. For example, to convert the fp16 original model to q4_0 (quantized int4) GGML model, run:
```sh
python3 chatglm_cpp/convert.py -i THUDM/chatglm-6b -t q4_0 -o chatglm-ggml.bin
Expand Down

0 comments on commit 9be06f0

Please sign in to comment.