Update README.md

This commit is contained in:
Gary Mulder 2023-05-23 20:36:21 +01:00 committed by GitHub
parent eaff7a8678
commit 70f629a72f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,13 +1,13 @@
# Get model from Hugging Face
`python3 ./hug_model.py`
You should now have a model in the current directory and model.bin symlinked to it for the subsequent Docker build and copy step. e.g.
You should now have a model in the current directory and `model.bin` symlinked to it for the subsequent Docker build and copy step. e.g.
```
docker $ ls -lh *.bin
-rw-rw-r-- 1 user user 4.8G May 23 18:30 llama-7b.ggmlv3.q5_1.bin
-rw-rw-r-- 1 user user 4.8G May 23 18:30 <downloaded-model-file>.q5_1.bin
lrwxrwxrwx 1 user user 24 May 23 18:30 model.bin -> <downloaded-model-file>.q5_1.bin
```
- Note #1: Make sure you have enough disk space to d/l the model. As the model is then copied into the image you will need at least
**Note #1:** Make sure you have enough disk space to d/l the model. As the model is then copied into the image you will need at least
**TWICE** as much disk space as the size of the model:
| Model | Quantized size |
@ -17,16 +17,23 @@ lrwxrwxrwx 1 user user 24 May 23 18:30 model.bin -> <downloaded-model-file>.q5
| 30B | 25 GB |
| 65B | 50 GB |
- Note #2: If you want to pass or tune additional parameters, customise `./start_server.sh` before running `docker build ...`
**Note #2:** If you want to pass or tune additional parameters, customise `./start_server.sh` before running `docker build ...`
# Use OpenBLAS (No NVidia GPU, defaults to `python:3-slim-bullseye` Docker base image)
# Install Docker Server
**Note #3:** This was tested with Docker running on Linux. If you can get it working on Windows or MacOS, please update this README with a PR!
[Install Docker Engine](https://docs.docker.com/engine/install)
# Use OpenBLAS
No NVidia GPU, defaults to `python:3-slim-bullseye` Docker base image and OpenBlAS:
## Build:
`docker build --build-arg -t openblas .`
## Run:
`docker run --cap-add SYS_RESOURCE -t openblas`
# Use CuBLAS
Requires NVidia GPU and Docker NVidia support (see https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html)
Requires NVidia GPU and Docker NVidia support (see [container-toolkit/install-guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html))
## Build:
`docker build --build-arg IMAGE=nvidia/cuda:12.1.1-devel-ubuntu22.04 -t opencuda .`
## Run: