Skip to content

Commit

Permalink
removed context for server+fix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuked88 committed Apr 1, 2023
1 parent 050065f commit 13ac9a8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .devops/main.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ RUN make

FROM ubuntu:$UBUNTU_VERSION as runtime

COPY --from=build /app/main /main
COPY --from=build /app/server /server

ENTRYPOINT [ "/server" ]
2 changes: 1 addition & 1 deletion .devops/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [[ $arg1 == '--convert' || $arg1 == '-c' ]]; then
elif [[ $arg1 == '--quantize' || $arg1 == '-q' ]]; then
./quantize $arg2
elif [[ $arg1 == '--run' || $arg1 == '-r' ]]; then
./main $arg2
./server $arg2
elif [[ $arg1 == '--all-in-one' || $arg1 == '-a' ]]; then
echo "Converting PTH to GGML..."
for i in `ls $1/$2/ggml-model-f16.bin*`; do
Expand Down
9 changes: 6 additions & 3 deletions examples/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,14 @@ int main(int argc, char ** argv) {
return 0;
}

params.prompt.insert(0, 1, ' ');
while (true) {
// Add a space in front of the first character to match OG llama tokenizer behavior
params.prompt.insert(0, 1, ' ');


// tokenize the prompt
auto embd_inp = ::llama_tokenize(ctx, params.prompt, true);


const int n_ctx = llama_n_ctx(ctx);

Expand Down Expand Up @@ -358,7 +361,7 @@ int main(int argc, char ** argv) {



while (true) {

int n_past = 0;
int n_remain = params.n_predict;
int n_consumed = 0;
Expand Down

0 comments on commit 13ac9a8

Please sign in to comment.