You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Llama 3.2 3B function calling support (#386)
* feat: Llama 3.2 3B function calling support
* feat: use `llama.cpp` backend registry for GPUs instead of custom implementations
* feat(`getLlama`): `build: "try"` option
* feat(`init` command): `--model` flag
* fix: improve binary compatibility testing on Electron apps
* fix: too many abort signal listeners
* fix: log level of some lower level logs
* fix: context window missing response during generation on specific extreme conditions
* fix: adapt to breaking `llama.cpp` changes
* fix: automatically resolve `compiler is out of heap space` CUDA build error
* chore: update bug report template
* docs: separate open source and proprietary sections in the awesome list
* docs(troubleshooting): Electron build error on Windows
* docs(Electron): GitHub Actions template for cross-compilation
Copy file name to clipboardExpand all lines: docs/guide/electron.md
+58-1Lines changed: 58 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,10 +34,67 @@ You also need to call [`getLlama`](../api/functions/getLlama.md) with the CMake
34
34
so that `node-llama-cpp` can find them.
35
35
36
36
## Cross Compilation
37
-
Cross packaging from one platform to another is not supported, since binaries for other platforms are not downloaded to you machine when your run `npm install`.
37
+
Cross packaging from one platform to another is not supported, since binaries for other platforms are not downloaded to your machine when you run `npm install`.
38
38
39
39
Packaging an `arm64` app on an `x64` machine is supported, but packaging an `x64` app on an `arm64` machine is not.
40
40
41
+
::: details GitHub Actions template for cross-compilation
42
+
43
+
<spanv-pre>
44
+
45
+
```yml
46
+
name: Build
47
+
on: [push]
48
+
49
+
jobs:
50
+
build-electron:
51
+
name: Build Electron app - ${{ matrix.config.name }}
52
+
runs-on: ${{ matrix.config.os }}
53
+
strategy:
54
+
fail-fast: false
55
+
matrix:
56
+
config:
57
+
- name: "Windows"
58
+
os: windows-2022
59
+
- name: "Ubuntu"
60
+
os: ubuntu-22.04
61
+
- name: "macOS"
62
+
os: macos-13
63
+
64
+
steps:
65
+
- uses: actions/checkout@v4
66
+
- uses: actions/setup-node@v4
67
+
with:
68
+
node-version: "20"
69
+
70
+
- name: Install dependencies on Ubuntu
71
+
if: matrix.config.name == 'Ubuntu'
72
+
run: |
73
+
sudo apt-get update
74
+
sudo apt-get install libarchive-tools rpm
75
+
sudo snap install snapcraft --classic
76
+
77
+
- name: Install modules
78
+
run: npm ci
79
+
80
+
- name: Build electron app
81
+
id: build
82
+
shell: bash
83
+
timeout-minutes: 480
84
+
run: npm run build
85
+
86
+
- name: Upload artifacts
87
+
uses: actions/upload-artifact@v4
88
+
with:
89
+
include-hidden-files: true
90
+
name: "electron-app-${{ matrix.config.name }}"
91
+
path: "./release"
92
+
```
93
+
94
+
</span>
95
+
96
+
:::
97
+
41
98
## Bundling
42
99
When bundling your code for Electron using [Electron Vite](https://electron-vite.org) or Webpack,
43
100
ensure that `node-llama-cpp` is not bundled, and is instead treated as an external module.
0 commit comments