Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit 7a8229f

Browse files
committed
update: sync latest llama.cpp branch
1 parent 96724a6 commit 7a8229f

File tree

9 files changed

+247
-157
lines changed

9 files changed

+247
-157
lines changed

example/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@llama-node/examples",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"description": "",
55
"main": "index.js",
66
"type": "module",
@@ -19,9 +19,9 @@
1919
"langchain": "^0.0.56"
2020
},
2121
"dependencies": {
22-
"@llama-node/core": "0.1.5",
23-
"@llama-node/llama-cpp": "0.1.5",
24-
"@llama-node/rwkv-cpp": "0.1.5",
25-
"llama-node": "0.1.5"
22+
"@llama-node/core": "0.1.6",
23+
"@llama-node/llama-cpp": "0.1.6",
24+
"@llama-node/rwkv-cpp": "0.1.6",
25+
"llama-node": "0.1.6"
2626
}
2727
}

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "llama-node",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"description": "Node.js Library for Large Language Model LLaMA/RWKV",
55
"keywords": [
66
"llama",
@@ -58,10 +58,10 @@
5858
"packageManager": "[email protected]",
5959
"homepage": "https://llama-node.vercel.app/",
6060
"devDependencies": {
61-
"@llama-node/cli": "0.1.5",
62-
"@llama-node/core": "0.1.5",
63-
"@llama-node/llama-cpp": "0.1.5",
64-
"@llama-node/rwkv-cpp": "0.1.5",
61+
"@llama-node/cli": "0.1.6",
62+
"@llama-node/core": "0.1.6",
63+
"@llama-node/llama-cpp": "0.1.6",
64+
"@llama-node/rwkv-cpp": "0.1.6",
6565
"@napi-rs/cli": "^2.15.2",
6666
"@tensorflow/tfjs-node": "^4.2.0",
6767
"@types/node": "^18.15.5",
@@ -80,17 +80,17 @@
8080
"vitest": "^0.30.1"
8181
},
8282
"dependencies": {
83-
"@llama-node/cli": "0.1.5"
83+
"@llama-node/cli": "0.1.6"
8484
},
8585
"optionalDependencies": {
86-
"@llama-node/core": "0.1.5",
87-
"@llama-node/llama-cpp": "0.1.5",
88-
"@llama-node/rwkv-cpp": "0.1.5"
86+
"@llama-node/core": "0.1.6",
87+
"@llama-node/llama-cpp": "0.1.6",
88+
"@llama-node/rwkv-cpp": "0.1.6"
8989
},
9090
"peerDependencies": {
91-
"@llama-node/cli": "0.1.5",
92-
"@llama-node/core": "0.1.5",
93-
"@llama-node/llama-cpp": "0.1.5",
94-
"@llama-node/rwkv-cpp": "0.1.5"
91+
"@llama-node/cli": "0.1.6",
92+
"@llama-node/core": "0.1.6",
93+
"@llama-node/llama-cpp": "0.1.6",
94+
"@llama-node/rwkv-cpp": "0.1.6"
9595
}
9696
}

packages/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@llama-node/cli",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"description": "",
55
"main": "index.js",
66
"type": "commonjs",
@@ -12,7 +12,7 @@
1212
"test": "tsx src/index.ts"
1313
},
1414
"dependencies": {
15-
"@llama-node/core": "0.1.5",
15+
"@llama-node/core": "0.1.6",
1616
"yargs": "^17.7.1"
1717
},
1818
"author": "",

packages/cli/src/index.ts

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -93,54 +93,9 @@ class InferenceCommand implements yargs.CommandModule {
9393
}
9494
}
9595

96-
class ConvertCommand implements yargs.CommandModule<any, any> {
97-
command = "convert";
98-
describe = "Convert llama pth to ggml, not ready yet";
99-
builder(args: yargs.Argv) {
100-
return args
101-
.help("help")
102-
.example(
103-
"llama convert --dir ./model --type q4_0",
104-
"Convert pth to q4_0 ggml model"
105-
)
106-
.options({
107-
dir: {
108-
describe: "The directory of model and tokenizer directory",
109-
type: "string",
110-
demandOption: true,
111-
},
112-
})
113-
.options({
114-
type: {
115-
describe: "The type of model",
116-
type: "string",
117-
choices: convertType,
118-
demandOption: true,
119-
},
120-
});
121-
}
122-
async handler(args: yargs.ArgumentsCamelCase) {
123-
const dir = args.dir as string;
124-
const type = args.type as ConvertType;
125-
126-
const absolute = path.isAbsolute(dir)
127-
? dir
128-
: path.join(process.cwd(), dir);
129-
if (!existsSync(absolute)) {
130-
console.error(`Directory ${absolute} does not exist`);
131-
return;
132-
} else {
133-
const elementType = convertType.findIndex((t) => t === type);
134-
await convert(absolute, elementType);
135-
console.log("Convert successfully");
136-
}
137-
}
138-
}
139-
14096
(yargs as yargs.Argv<any | CLIInferenceArguments>)
14197
.scriptName("llama")
14298
.usage("$0 <cmd> [args]")
143-
.command(new ConvertCommand())
14499
.command(new InferenceCommand())
145100
.demandCommand(1, "You need at least one command before moving on")
146101
.strict()

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@llama-node/core",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"main": "index.js",
55
"types": "index.d.ts",
66
"napi": {

packages/docs/docs/start.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ const config = {
122122
useMlock: false,
123123
embedding: false,
124124
useMmap: true,
125+
nGpuLayers: 0
125126
};
126127

127128
const template = `How are you?`;

packages/llama-cpp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@llama-node/llama-cpp",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"main": "index.js",
55
"types": "index.d.ts",
66
"napi": {

packages/rwkv-cpp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@llama-node/rwkv-cpp",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"main": "index.js",
55
"types": "index.d.ts",
66
"napi": {

0 commit comments

Comments
 (0)