Update README.md
Browse files
README.md
CHANGED
@@ -6,30 +6,48 @@ license: apache-2.0
|
|
6 |
|
7 |
### Usage
|
8 |
```sh
|
9 |
-
|
10 |
|
11 |
-
|
12 |
|
13 |
-
|
|
|
14 |
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
-
|
|
|
18 |
|
19 |
-
|
|
|
20 |
|
21 |
-
|
|
|
22 |
|
23 |
-
|
|
|
24 |
|
25 |
-
|
|
|
26 |
|
27 |
-
|
|
|
|
|
|
|
28 |
|
29 |
-
|
|
|
30 |
|
31 |
-
|
32 |
-
-
|
|
|
|
|
|
|
33 |
-p "A continuación hay una instrucción que describe una tarea, junto con una entrada que\
|
34 |
proporciona más contexto. Escriba una respuesta que complete adecuadamente la solicitud.\n\n\
|
35 |
### Instrucctión:\nDame una lista de sitios a visitar en España\n\n### Respuesta:" \
|
|
|
6 |
|
7 |
### Usage
|
8 |
```sh
|
9 |
+
#!/bin/bash
|
10 |
|
11 |
+
# License: Apache-2.0
|
12 |
|
13 |
+
# This script sets up and runs the lince model
|
14 |
+
# Ensure you have wget, git, cmake, and make installed before running this script.
|
15 |
|
16 |
+
# Set model and directory variables
|
17 |
+
MODEL_URL="https://huggingface.co/clibrain/lince-zero-f16-ggml-q4_0/resolve/main/lince-zero-f16-ggml-q4_0.bin"
|
18 |
+
MODEL_DIR="$HOME/lince-model"
|
19 |
+
MODEL_BIN="${MODEL_DIR}/lince-zero-f16-ggml-q4_0.bin"
|
20 |
+
GGML_REPO="https://github.com/mrm8488/ggml-lince.git"
|
21 |
+
BUILD_DIR="build"
|
22 |
|
23 |
+
# Create model directory
|
24 |
+
mkdir -p $MODEL_DIR
|
25 |
|
26 |
+
# Download the model
|
27 |
+
wget $MODEL_URL -O $MODEL_BIN || { echo "Failed to download model"; exit 1; }
|
28 |
|
29 |
+
# Clone the repository
|
30 |
+
git clone $GGML_REPO || { echo "Failed to clone repository"; exit 1; }
|
31 |
|
32 |
+
# Navigate into the repository directory
|
33 |
+
cd ggml-lince || { echo "Directory does not exist"; exit 1; }
|
34 |
|
35 |
+
# Create build directory and navigate into it
|
36 |
+
mkdir -p $BUILD_DIR && cd $BUILD_DIR || { echo "Failed to create or navigate to build directory"; exit 1; }
|
37 |
|
38 |
+
# Build project
|
39 |
+
cmake .. || { echo "cmake failed"; exit 1; }
|
40 |
+
cd examples/falcon || { echo "Directory does not exist"; exit 1; }
|
41 |
+
make || { echo "make failed"; exit 1; }
|
42 |
|
43 |
+
# Navigate back to run the model
|
44 |
+
cd ../../$BUILD_DIR/bin || { echo "Directory does not exist"; exit 1; }
|
45 |
|
46 |
+
# Show the help message
|
47 |
+
./lince -h || { echo "./lince failed"; exit 1; }
|
48 |
+
|
49 |
+
# Run the model
|
50 |
+
./lince -m $MODEL_BIN \
|
51 |
-p "A continuación hay una instrucción que describe una tarea, junto con una entrada que\
|
52 |
proporciona más contexto. Escriba una respuesta que complete adecuadamente la solicitud.\n\n\
|
53 |
### Instrucctión:\nDame una lista de sitios a visitar en España\n\n### Respuesta:" \
|