mrm8488 commited on
Commit
af8b2ae
1 Parent(s): ac83a2d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +31 -13
README.md CHANGED
@@ -6,30 +6,48 @@ license: apache-2.0
6
 
7
  ### Usage
8
  ```sh
9
- mkdir $HOME/lince-model
10
 
11
- wget https://huggingface.co/clibrain/lince-zero-f16-ggml-q4_0/resolve/main/lince-zero-f16-ggml-q4_0.bin -O $HOME/lince-model/lince-zero-f16-ggml-q4_0.bin
12
 
13
- git clone https://github.com/mrm8488/ggml-lince.git
 
14
 
15
- cd ggml-lince
 
 
 
 
 
16
 
17
- mkdir build && cd build
 
18
 
19
- cmake ..
 
20
 
21
- cd examples/falcon
 
22
 
23
- make
 
24
 
25
- cd ../../
 
26
 
27
- cd build/bin
 
 
 
28
 
29
- ./lince -h
 
30
 
31
- ./lince \
32
- -m $HOME/lince-model/lince-zero-f16-ggml-q4_0.bin \
 
 
 
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:" \