Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
4757af8
feat: automatic batching (#104)
giladgd Nov 26, 2023
5fcdf9b
feat: function calling (#139)
giladgd Jan 19, 2024
2cf74fa
Merge branch 'master' into beta
giladgd Jan 19, 2024
36c779d
feat: show `llama.cpp` release in GitHub releases (#142)
giladgd Jan 20, 2024
4cf1fba
feat: get embedding for text (#144)
giladgd Jan 21, 2024
9d033a6
Merge remote-tracking branch 'origin/master' into beta
giladgd Jan 21, 2024
dc530d6
chore: merge `master` into `beta`
giladgd Jan 21, 2024
cab617a
feat(minor): add more flags to the `chat` command (#149)
giladgd Jan 24, 2024
187627e
fix: build Metal by default for Apple silicone devices (#150)
giladgd Jan 24, 2024
0e4b8d2
feat: manual binding loading (#153)
giladgd Feb 4, 2024
cc78961
fix: release config (#154)
giladgd Feb 4, 2024
9b9677f
fix: build and postinstall bug (#155)
giladgd Feb 5, 2024
d4a39f5
fix: clone from bundle (#156)
giladgd Feb 5, 2024
74fb35c
fix: don't block a node process from exiting (#157)
giladgd Feb 5, 2024
61ea38f
chore: format `addon.cpp`
giladgd Feb 5, 2024
46235a2
feat: get VRAM state (#161)
giladgd Feb 10, 2024
47b476f
feat: minP support (#162)
giladgd Feb 11, 2024
ede69c1
feat: completion and infill (#164)
giladgd Feb 18, 2024
624fa30
feat: export `resolveChatWrapperBasedOnWrapperTypeName` (#165)
giladgd Feb 18, 2024
2433825
Merge remote-tracking branch 'origin/master' into beta
giladgd Feb 20, 2024
e8687de
Merge remote-tracking branch 'origin/master' into beta
giladgd Feb 23, 2024
d161bcd
feat: Vulkan support (#171)
giladgd Feb 24, 2024
fa6cf2e
style: improve eslint config (#172)
giladgd Feb 24, 2024
bcaab4f
feat: gguf parser (#168)
ido-pluto Feb 27, 2024
5a70576
feat: use the best compute layer available by default (#175)
giladgd Mar 3, 2024
315a3eb
feat: async operations (#178)
giladgd Mar 16, 2024
f3b7f81
feat: Windows on Arm prebuilt binary (#181)
giladgd Mar 17, 2024
35e6f50
feat: automatically adapt to current free VRAM state (#182)
giladgd Apr 4, 2024
7e70a9f
Merge remote-tracking branch 'origin/master' into beta
giladgd Apr 4, 2024
6267778
fix: create a context with no parameters (#188)
giladgd Apr 4, 2024
b542b53
feat: download models using the CLI (#191)
giladgd Apr 10, 2024
3ad4494
feat: token biases (#196)
giladgd Apr 10, 2024
7878c8a
fix: fallback to general chat wrapper (#197)
giladgd Apr 11, 2024
5ca33c7
feat(`inspect gpu` command): print device names (#198)
giladgd Apr 13, 2024
d332b77
feat(`inspect gpu` command): print env info (#202)
giladgd Apr 13, 2024
ef501f9
feat: Llama 3 support (#205)
giladgd Apr 24, 2024
453c162
feat: split gguf files support (#214)
giladgd May 8, 2024
c6a80c0
Merge remote-tracking branch 'refs/remotes/origin/master' into beta
giladgd May 9, 2024
d321fe3
feat: improve grammar support (#215)
giladgd May 12, 2024
d6a0f43
feat: `init` command to scaffold a new project from a template (#217)
giladgd May 18, 2024
ba03ca9
fix: include templates in npm package (#219)
giladgd May 19, 2024
6619b28
fix: templates bugs (#221)
giladgd May 19, 2024
95f4645
feat: parallel function calling (#225)
giladgd Jun 8, 2024
4ea0c3c
feat: improve loading status in the Electron example (#226)
giladgd Jun 9, 2024
a5f3596
fix: Electron example build (#228)
giladgd Jun 9, 2024
73cabcd
fix: Electron example build (#230)
giladgd Jun 10, 2024
56749c7
fix: async gpu info getters (#232)
giladgd Jun 11, 2024
23012d1
feat: render markdown in the Electron example (#234)
giladgd Jun 12, 2024
b89ad2d
feat: compress CUDA prebuilt binaries (#236)
giladgd Jun 15, 2024
0d40ffc
fix: remove CUDA binary compression for now (#238)
giladgd Jun 16, 2024
1e7c5d0
fix: bugs (#241)
giladgd Jun 17, 2024
0b85800
fix: remove CUDA binary compression for Windows (#243)
giladgd Jun 17, 2024
c89178f
fix: preload error on `chat` command (#245)
giladgd Jun 17, 2024
9cab784
fix: long `LlamaText` tokenization (#249)
giladgd Jun 24, 2024
8a92e31
feat: move CUDA prebuilt binaries to dependency modules (#250)
giladgd Jun 29, 2024
1fbbf72
build: fix release job (#252)
giladgd Jun 29, 2024
da00a17
fix: Windows and CUDA bindings (#254)
giladgd Jun 30, 2024
37c4b26
fix: Windows build (#255)
giladgd Jun 30, 2024
a7a2517
fix: Linux prebuilt binaries (#257)
giladgd Jun 30, 2024
81e0575
fix: macOS prebuilt binaries (#259)
giladgd Jun 30, 2024
c2e322c
feat: flash attention (#264)
giladgd Jul 5, 2024
c35ff5a
feat: flash attention in model selection (#266)
giladgd Jul 8, 2024
e3e0994
feat: Llama 3.1 support, Phi-3 support (#273)
giladgd Jul 27, 2024
826334b
feat(model downloader): use `HF_TOKEN` when needed (#276)
giladgd Jul 30, 2024
a2b2bc3
fix: CUDA context creation (#285)
giladgd Aug 2, 2024
097b3ec
fix: unkown characters in generation streaming (#293)
giladgd Aug 7, 2024
ecaef63
fix: more cases of unknown characters in generation streaming (#295)
giladgd Aug 9, 2024
bf12e9c
fix: revert to the latest stable Metal `llama.cpp` release (#297)
giladgd Aug 9, 2024
4b3ad61
feat: new docs (#309)
giladgd Sep 18, 2024
fd4f067
build: fix CI config (#312)
giladgd Sep 18, 2024
5fadbc4
build: fix CI config (#313)
giladgd Sep 18, 2024
b34dc8c
build: fix release config (#314)
giladgd Sep 18, 2024
d4a4284
build: fix release bug (#315)
giladgd Sep 18, 2024
253b5d6
build: fix release bug (#316)
giladgd Sep 18, 2024
b98767c
build: fix release bug (#317)
giladgd Sep 18, 2024
d0795c1
build: fix CI config (#318)
giladgd Sep 18, 2024
2204e7a
fix: no thread limit when using a GPU (#322)
giladgd Sep 20, 2024
6c644ff
fix: revert `electron-builder` version used in Electron template (#323)
giladgd Sep 20, 2024
7805fd5
docs: improve documentation (#324)
giladgd Sep 21, 2024
1c720ca
build: fix CI config (#325)
giladgd Sep 21, 2024
cf791f1
build: fix CI config (#326)
giladgd Sep 21, 2024
ebc4e83
feat: `resetChatHistory` function on a `LlamaChatSession` (#327)
giladgd Sep 21, 2024
4b7ef5b
fix: improve model downloader CI logs (#329)
giladgd Sep 22, 2024
c35fcad
Merge remote-tracking branch 'origin/master' into beta
giladgd Sep 22, 2024
8565b7c
feat: v3.0 stable release (#331)
giladgd Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .config/typedoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ h6:not(.tsd-anchor-link, .tsd-returns-title) > a:hover:before {
margin-top: 16px;
}

img[src$="assets/logo.roundEdges.png"],
img[src$="assets/logo.png"] {
img[src$="assets/logo.v3.roundEdges.png"],
img[src$="assets/logo.v3.png"] {
box-shadow: 0px 4px 12px 0px rgb(0 0 0 / 16%), 0px 8px 64px 0px rgb(0 0 0 / 24%);
border-radius: 14px;
}
Expand Down
16 changes: 13 additions & 3 deletions .config/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://typedoc.org/schema.json",
"entryPoints": ["../src/index.ts"],
"entryPoints": ["../src/apiDocsIndex.ts"],
"out": "../docs/api",
"tsconfig": "../tsconfig.json",
"customCss": "./typedoc.css",
Expand All @@ -11,12 +11,22 @@
"githubPages": true,
"hideGenerator": true,
"jsDocCompatibility": true,
"htmlLang": "en",
"lang": "en",
"plugin": ["typedoc-plugin-markdown", "typedoc-vitepress-theme", "typedoc-plugin-mdn-links"],
"hideBreadcrumbs": true,
"hidePageHeader": true,
"preserveAnchorCasing": true,
"useCodeBlocks": true,
"expandObjects": true,
"parametersFormat": "table"
"expandParameters": true,
"parametersFormat": "table",
"propertiesFormat": "list",
"enumMembersFormat": "table",
"typeDeclarationFormat": "list",
"classPropertiesFormat": "list",
"interfacePropertiesFormat": "list",
"sort": ["source-order"],
"docsRoot": "../docs",
"intentionallyNotExported": ["MergeOptionalUnionTypes", "GbnfJsonSchemaToTSType", "_LlamaText"],
"useHTMLEncodedBrackets": true
}
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@ insert_final_newline = true
[{package.json,package-lock.json,manifest.json}]
indent_size = 2

[.babelrc]
indent_size = 2

[*.yml]
indent_size = 2
79 changes: 57 additions & 22 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,73 @@
"browser": false,
"es6": true
},
"ignorePatterns": ["/dist", "/llama", "/docs-site"],
"ignorePatterns": [
"/dist",
"/llama",
"/docs-site",
"/packages/create-node-llama-cpp/dist",
"/packages/@node-llama-cpp/*/dist"
],
"extends": [
"eslint:recommended"
"eslint:recommended",
"plugin:jsdoc/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2021,
"ecmaVersion": 2023,
"sourceType": "module"
},
"overrides": [{
"files": ["**.ts"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
"plugin:@typescript-eslint/recommended",
"plugin:jsdoc/recommended-typescript"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"import",
"node"
"jsdoc",
"n"
],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": ["off"],
"@typescript-eslint/ban-ts-comment": ["off"],
"@typescript-eslint/no-explicit-any": ["off"],
"semi": ["off"],
"@typescript-eslint/semi": ["warn", "always"],
"@typescript-eslint/no-inferrable-types": ["off"]
"@typescript-eslint/no-inferrable-types": ["off"],
"@typescript-eslint/member-ordering": ["warn", {
"default": ["field", "constructor", "method", "signature"],
"typeLiterals": []
}],
"@typescript-eslint/parameter-properties": ["warn", {
"allow": []
}],
"@typescript-eslint/explicit-member-accessibility": ["warn"],
"@typescript-eslint/member-delimiter-style": ["warn", {
"multiline": {
"delimiter": "comma",
"requireLast": false
},
"singleline": {
"delimiter": "comma",
"requireLast": false
},
"multilineDetection": "brackets"
}],
"jsdoc/require-param": ["off"],
"jsdoc/check-param-names": ["warn", {
"checkDestructured": false
}],
"jsdoc/require-returns": ["off"],
"jsdoc/require-jsdoc": ["off"],
"jsdoc/require-yields": ["off"],
"jsdoc/require-param-description": ["off"]
}
}, {
"files": ["test/**/**.ts"],
Expand All @@ -49,11 +82,18 @@
"plugins": [
"@typescript-eslint",
"import",
"node"
"jsdoc",
"n"
],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts"]
},
"jsdoc": {
"exemptDestructuredRootsFromChecks": true,
"tagNamePreference": {
"hidden": "hidden"
}
}
},
"rules": {
Expand Down Expand Up @@ -90,9 +130,7 @@
"groups": ["builtin", "external","internal", "parent", "sibling", "index", "type", "object", "unknown"],
"warnOnUnassignedImports": true
}],
"node/file-extension-in-import": ["error", "always", {
"tryExtensions": [".js", ".json"]
}],
"n/file-extension-in-import": ["error", "always"],
"newline-per-chained-call": ["error", {
"ignoreChainWithDepth": 2
}],
Expand All @@ -101,26 +139,23 @@
"no-duplicate-imports": ["error", {
"includeExports": true
}],
"camelcase": ["warn"],
"camelcase": ["warn", {
"allow": ["\\d+_\\d+"]
}],
"jsx-quotes": ["warn"],
"yoda": ["error", "never", {
"exceptRange": true
}],
"no-eval": ["error"],
"array-callback-return": ["error"],
"valid-jsdoc": ["error", {
"requireParamType": true,
"requireReturnType": true,
"requireReturn": false,
"requireParamDescription": false,
"requireReturnDescription": false
}],
"no-empty": ["error", {
"allowEmptyCatch": true
}],
"keyword-spacing": ["warn"],
"space-infix-ops": ["warn"],
"spaced-comment": ["warn", "always"],
"spaced-comment": ["warn", "always", {
"markers": ["/"]
}],
"eol-last": ["warn", "always"],
"max-len": ["warn", {
"code": 140,
Expand Down
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These are supported funding model platforms

github: [giladgd, ido-pluto]
github: giladgd
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
Expand Down
11 changes: 9 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ body:
Your bug can be investigated much faster if your code can be run without any dependencies other than `node-llama-cpp`.
Issues without reproduction steps or code examples may be closed as not actionable.
Please try to provide a Minimal, Complete, and Verifiable example ([link](http://stackoverflow.com/help/mcve)).
Please include a link to the model file you used if possible.
Also, please enable enable debug logs by using `getLlama({debug: true})` to get more information.
placeholder: >-
Please try to provide a Minimal, Complete, and Verifiable example.
http://stackoverflow.com/help/mcve
Expand All @@ -49,7 +51,8 @@ body:
attributes:
label: My Environment
description: >-
Please add any other relevant dependencies to this table at the end.
Please include the result of the command `npx --yes node-llama-cpp inspect gpu`.
Please also add any other relevant dependencies to this table at the end.
For example: Electron, Bun, Webpack.
value: |
| Dependency | Version |
Expand All @@ -68,16 +71,20 @@ body:
description: >-
Add any other context about the bug report here.
- type: checkboxes
id: drivers
id: features
attributes:
label: Relevant Features Used
options:
- label: Metal support
required: false
- label: CUDA support
required: false
- label: Vulkan support
required: false
- label: Grammar
required: false
- label: Function calling
required: false
- type: dropdown
id: pr
attributes:
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
blank_issues_enabled: false
contact_links:
- name: 🤔 Questions, General Support, and Help
url: https://github.com/withcatai/node-llama-cpp/discussions
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ body:
label: Additional Context
description: Add any other context about the feature request here
- type: checkboxes
id: drivers
id: features
attributes:
label: Related Features to This Feature Request
options:
Expand Down
Loading
Loading