diff --git a/alpaca.js b/alpaca.js index d1253db..1cfb114 100644 --- a/alpaca.js +++ b/alpaca.js @@ -11,11 +11,6 @@ class Alpaca { this.root = root this.home = path.resolve(this.root.home, "alpaca") this.url = "https://github.com/cocktailpeanut/alpaca.cpp.git" - this.launcher = { -win32: "chat", - linux: "chat", - darwin: "chat", - } } async make() { let success @@ -25,10 +20,12 @@ win32: "chat", const cmake_path = path.join(venv_path, "Scripts", "cmake") await this.root.exec("mkdir build", this.home) await this.root.exec(`Remove-Item -path ${path.resolve(this.home, "build", "CMakeCache.txt")}`, this.home) - await this.root.exec(`make chat`, this.home) + //await this.root.exec(`${cmake_path} chat`, this.home) + await this.root.exec(`${cmake_path} ..`, path.resolve(this.home, "build")) + await this.root.exec(`${cmake_path} --build . --config Release`, path.resolve(this.home, "build")) } else { // Make on linux + mac - success = await this.root.exec(`make chat`, this.home) + success = await this.root.exec(`make`, this.home) if (!success) { throw new Error("running 'make' failed") return diff --git a/bin/web/views/index.ejs b/bin/web/views/index.ejs index 5c7859a..999ab09 100644 --- a/bin/web/views/index.ejs +++ b/bin/web/views/index.ejs @@ -115,7 +115,7 @@ const config = { n_predict: 200, top_k: 40, top_p: 0.9, - temp: 0.8, + temp: 0.1, repeat_last_n: 64, repeat_penalty: 1.3, debug: false, diff --git a/index.js b/index.js index 72e9804..14d1add 100644 --- a/index.js +++ b/index.js @@ -147,7 +147,7 @@ class Dalai { } chunks.push(`-p "${req.prompt}"`) - const main_bin_path = platform === "win32" ? path.resolve(this.home, Core, "build", "Release", this.cores[Core].launcher[platform]) : path.resolve(this.home, Core, this.cores[Core].launcher[platform]) + const main_bin_path = platform === "win32" ? path.resolve(this.home, Core, "build", "Release", "llama") : path.resolve(this.home, Core, "main") if (req.full) { await this.exec(`${main_bin_path} ${chunks.join(" ")}`, this.cores[Core].home, cb) } else { diff --git a/llama.js b/llama.js index 0be51d3..80f137f 100644 --- a/llama.js +++ b/llama.js @@ -11,11 +11,6 @@ class LLaMA { this.root = root this.home = path.resolve(this.root.home, "llama") this.url = "https://github.com/ggerganov/llama.cpp.git" - this.launcher = { - win32: "llama", - linux: "main", - darwin: "main" - } } async make() { console.log("make")