From: IGUILIZ Salah-Eddine Date: Sun, 14 May 2023 15:31:08 +0000 (+0200) Subject: starcoder : detect santacoder fix end of text token (#155) X-Git-Tag: upstream/0.0.1642~1471 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=99294baef14e16a3036a1afaf870131399e45133;p=pkg%2Fggml%2Fsources%2Fggml starcoder : detect santacoder fix end of text token (#155) Co-authored-by: IGUILIZ Salah-Eddine --- diff --git a/examples/starcoder/main.cpp b/examples/starcoder/main.cpp index d7a2d5ea..a4608225 100644 --- a/examples/starcoder/main.cpp +++ b/examples/starcoder/main.cpp @@ -828,8 +828,12 @@ int main(int argc, char ** argv) { } fflush(stdout); - // end of text token - if (embd.back() == 0) { //TODO: this is only for starcoder + // check if model is santacoder + if (model.hparams.n_layer <= 30 && embd.back() == 49152) { + break; + } + // check if model is starcoder + else if (embd.back() == 0) { //TODO: this is only for starcoder break; } }