Skip to content

Commit 8ab983b

Browse files
authored
fix: use a compressed logo image for README.md (#340)
* fix: use a compressed logo image for `README.md` * build: switch to `latest` release of `llama.cpp`
1 parent ec45bbf commit 8ab983b

File tree

9 files changed

+125
-126
lines changed

9 files changed

+125
-126
lines changed

.config/typedoc.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ h6:not(.tsd-anchor-link, .tsd-returns-title) > a:hover:before {
215215
}
216216

217217
img[src$="assets/logo.v3.roundEdges.png"],
218+
img[src$="assets/logo.v3.roundEdges.avif"],
218219
img[src$="assets/logo.v3.png"] {
219220
box-shadow: 0px 4px 12px 0px rgb(0 0 0 / 16%), 0px 8px 64px 0px rgb(0 0 0 / 24%);
220221
border-radius: 14px;

.github/workflows/build.yml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ jobs:
2323
- name: Download latest llama.cpp release
2424
env:
2525
CI: true
26-
# Switched to `b3808` instead of `latest` due to a build failure on the latest version. `b3808` is the previous release.
27-
run: node ./dist/cli/cli.js source download --release b3808 --skipBuild --noBundle --noUsageExample --updateBinariesReleaseMetadataAndSaveGitBundle
26+
run: node ./dist/cli/cli.js source download --release latest --skipBuild --noBundle --noUsageExample --updateBinariesReleaseMetadataAndSaveGitBundle
2827
- name: Upload build artifact
2928
uses: actions/upload-artifact@v4
3029
with:
@@ -800,3 +799,35 @@ jobs:
800799
run: |
801800
curl -X POST "https://pubsubhubbub.appspot.com/" -H "Content-Type: application/x-www-form-urlencoded" --data-urlencode "hub.mode=publish" --data-urlencode "hub.url=https://node-llama-cpp.withcat.ai/blog/feed.atom"
802801
802+
# fix-broken-github-release:
803+
# name: Fix broken GitHub release
804+
# if: github.event_name == 'pull_request' && github.head_ref == 'gilad/smallerLogoFile'
805+
# runs-on: ubuntu-latest
806+
# permissions:
807+
# id-token: write
808+
# actions: read
809+
# contents: write
810+
# issues: write
811+
# pull-requests: write
812+
# discussions: write
813+
# steps:
814+
# - uses: actions/checkout@v4
815+
# - uses: actions/setup-node@v4
816+
# with:
817+
# node-version: "20"
818+
# - name: Install modules
819+
# run: npm ci
820+
#
821+
# - name: Pull artifact from broken release
822+
# uses: actions/download-artifact@v4
823+
# with:
824+
# name: resolved-next-release
825+
# github-token: ${{ secrets.GITHUB_TOKEN }}
826+
# repository: "${{ github.repository }}"
827+
# run-id: "<run id here>"
828+
# path: scripts/resolved-next-release-artifact
829+
#
830+
# - name: Fix broken release
831+
# env:
832+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
833+
# run: npx --no vite-node ./scripts/rerunSemanticReleaseGithubSuccess.ts

.vitepress/config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ const urlBase = env.get("DOCS_URL_BASE")
3333
const packageVersion = env.get("DOCS_PACKAGE_VERSION")
3434
.default(packageJson.version)
3535
.asString();
36-
const googleSiteVerificationCode = "7b4Hd_giIK0EFsin6a7PWLmM_OeaC7APLZUxVGwwI6Y";
3736

3837
const hostname = "https://node-llama-cpp.withcat.ai/";
3938

@@ -124,7 +123,6 @@ export default defineConfig({
124123
],
125124
async transformHead({pageData, head}) {
126125
if (pageData.filePath === "index.md") {
127-
head.push(["meta", {name: "google-site-verification", content: googleSiteVerificationCode}]);
128126
head.push(...defaultImageMetaTags);
129127
} else if (pageData.relativePath === "404.md")
130128
head.push(...defaultImageMetaTags);

.vitepress/theme/style.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ a.inlineCodeLink pre>code {
182182
img[src$="assets/logo.roundEdges.png"],
183183
img[src$="assets/logo.png"],
184184
img[src$="assets/logo.v3.roundEdges.png"],
185-
img[src$="assets/logo.v3.png"]{
185+
img[src$="assets/logo.v3.roundEdges.avif"],
186+
img[src$="assets/logo.v3.png"] {
186187
box-shadow: 0px 4px 12px 0px rgb(0 0 0 / 16%), 0px 8px 64px 0px rgb(0 0 0 / 24%);
187188
border-radius: 14px;
188189
margin-bottom: 12px;

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div align="center">
2-
<img alt="node-llama-cpp Logo" src="https://raw.githubusercontent.com/withcatai/node-llama-cpp/master/assets/logo.v3.roundEdges.png" width="360px" />
2+
<img alt="node-llama-cpp Logo" src="https://raw.githubusercontent.com/withcatai/node-llama-cpp/master/assets/logo.v3.roundEdges.avif" width="360px" />
33
<h1>node-llama-cpp</h1>
44
<p>Run AI models locally on your machine</p>
55
<sub>Pre-built bindings are provided with a fallback to building from source with cmake</sub>

assets/logo.v3.roundEdges.avif

52.8 KB
Binary file not shown.

docs/public/robots.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
User-agent: *
12
Sitemap: https://node-llama-cpp.withcat.ai/sitemap.xml
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import path from "path";
2+
import {fileURLToPath} from "url";
3+
import fs from "fs-extra";
4+
// @ts-ignore
5+
import {verifyConditions as githubVerifyConditions, success as githubSuccess} from "@semantic-release/github";
6+
7+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
8+
9+
const brokenReleaseDryRunResult = fs.readJSONSync(path.join(__dirname, "resolved-next-release-artifact", "semanticReleaseDryRunReleaseResult.json"));
10+
11+
console.log("Broken release dry run result:", brokenReleaseDryRunResult);
12+
13+
const githubPluginConfig = {};
14+
const context = {
15+
...brokenReleaseDryRunResult,
16+
options: {
17+
repositoryUrl: "https://github.com/withcatai/node-llama-cpp.git"
18+
},
19+
logger: console,
20+
env: process.env
21+
};
22+
23+
for (const release of context.releases) {
24+
if (release.pluginName === "@semantic-release/npm") {
25+
if (release.url == null) {
26+
release.name = "npm package (@latest dist-tag)";
27+
release.url = "https://www.npmjs.com/package/node-llama-cpp/v/" + release.version;
28+
}
29+
} else if (release.pluginName === "@semantic-release/github") {
30+
if (release.url == null) {
31+
release.name = "GitHub release";
32+
release.url = "https://github.com/withcatai/node-llama-cpp/releases/tag/" + release.gitTag;
33+
}
34+
}
35+
}
36+
37+
await githubVerifyConditions(githubPluginConfig, context);
38+
await githubSuccess(githubPluginConfig, context);

src/cli/recommendedModels.ts

Lines changed: 49 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -78,80 +78,93 @@ export const recommendedModels: ModelRecommendation[] = [{
7878
}
7979
}]
8080
}, {
81-
name: "Phi 3 3.8B",
81+
name: "Mistral Nemo 12B",
8282
abilities: ["chat", "complete", "functionCalling"],
83-
description: "Phi 3 model was created by Microsoft and is optimized for strong reasoning (especially math and logic).\n" +
84-
"This is the smallversion of the model.",
83+
description: "Mistral Nemo model was created by Mistral AI and was trained on large proportion of multilingual and code data, with support for function calling.\n" +
84+
"It was trained jointly by Mistral AI and NVIDIA.\n" +
85+
"This is a 12 billion parameters model.",
8586

8687
fileOptions: [{
8788
huggingFace: {
88-
model: "bartowski/Phi-3.1-mini-4k-instruct-GGUF",
89+
model: "mradermacher/Mistral-Nemo-Instruct-2407-GGUF",
8990
branch: "main",
90-
file: "Phi-3.1-mini-4k-instruct-Q8_0.gguf"
91+
file: "Mistral-Nemo-Instruct-2407.Q8_0.gguf"
9192
}
9293
}, {
9394
huggingFace: {
94-
model: "bartowski/Phi-3.1-mini-4k-instruct-GGUF",
95+
model: "mradermacher/Mistral-Nemo-Instruct-2407-GGUF",
9596
branch: "main",
96-
file: "Phi-3.1-mini-4k-instruct-Q4_K_M.gguf"
97+
file: "Mistral-Nemo-Instruct-2407.Q6_K.gguf"
9798
}
98-
}]
99-
}, {
100-
name: "Llama 2 Chat 7B",
101-
abilities: ["chat", "complete"],
102-
description: "Llama 2 Chat model was created by Meta and is optimized for an assistant-like chat use cases.\n" +
103-
"This is the 7 billion parameters version of the model.",
104-
105-
fileOptions: [{
99+
}, {
106100
huggingFace: {
107-
model: "TheBloke/Llama-2-7B-Chat-GGUF",
101+
model: "mradermacher/Mistral-Nemo-Instruct-2407-GGUF",
108102
branch: "main",
109-
file: "llama-2-7b-chat.Q5_K_M.gguf"
103+
file: "Mistral-Nemo-Instruct-2407.Q4_K_M.gguf"
110104
}
111105
}, {
112106
huggingFace: {
113-
model: "TheBloke/Llama-2-7B-Chat-GGUF",
107+
model: "mradermacher/Mistral-Nemo-Instruct-2407-GGUF",
114108
branch: "main",
115-
file: "llama-2-7b-chat.Q4_K_M.gguf"
109+
file: "Mistral-Nemo-Instruct-2407.Q4_K_S.gguf"
116110
}
117111
}]
118112
}, {
119-
name: "Llama 2 Chat 13B",
120-
abilities: ["chat", "complete"],
121-
description: "Llama 2 Chat model was created by Meta and is optimized for an assistant-like chat use cases.\n" +
122-
"This is the 13 billion parameters version of the model.",
113+
name: "Phi 3 3.8B",
114+
abilities: ["chat", "complete", "functionCalling"],
115+
description: "Phi 3 model was created by Microsoft and is optimized for strong reasoning (especially math and logic).\n" +
116+
"This is the smallversion of the model.",
123117

124118
fileOptions: [{
125119
huggingFace: {
126-
model: "TheBloke/Llama-2-13B-chat-GGUF",
120+
model: "bartowski/Phi-3.1-mini-4k-instruct-GGUF",
127121
branch: "main",
128-
file: "llama-2-13b-chat.Q5_K_M.gguf"
122+
file: "Phi-3.1-mini-4k-instruct-Q8_0.gguf"
129123
}
130124
}, {
131125
huggingFace: {
132-
model: "TheBloke/Llama-2-13B-chat-GGUF",
126+
model: "bartowski/Phi-3.1-mini-4k-instruct-GGUF",
133127
branch: "main",
134-
file: "llama-2-13b-chat.Q4_K_M.gguf"
128+
file: "Phi-3.1-mini-4k-instruct-Q4_K_M.gguf"
135129
}
136130
}]
137131
}, {
138-
name: "Llama 2 Chat 70B",
139-
abilities: ["chat", "complete"],
140-
description: "Llama 2 Chat model was created by Meta and is optimized for an assistant-like chat use cases.\n" +
141-
"This is the 70 billion parameters version of the model. " +
142-
"You need a GPU with a lot of VRAM to use this version.",
132+
name: "OLMoE 1B 7B MoE",
133+
abilities: ["chat"],
134+
description: "OLMoE models were created by AllenAI, and are fully open source models that utilize a Mixture of Experts architecture.\n" +
135+
"Mixtures of Experts (MoE) is a technique where different models, each skilled in solving a particular kind of problem, work together to the improve the overall performance on complex tasks.\n" +
136+
"This model includes 64 expert models, with a total of 7 billion parameters.\n" +
137+
"This model generates output extremely fast.",
143138

144139
fileOptions: [{
145140
huggingFace: {
146-
model: "TheBloke/Llama-2-70B-Chat-GGUF",
141+
model: "allenai/OLMoE-1B-7B-0924-Instruct-GGUF",
147142
branch: "main",
148-
file: "llama-2-70b-chat.Q5_K_M.gguf"
143+
file: "olmoe-1b-7b-0924-instruct-q8_0.gguf"
149144
}
150145
}, {
151146
huggingFace: {
152-
model: "TheBloke/Llama-2-70B-Chat-GGUF",
147+
model: "allenai/OLMoE-1B-7B-0924-Instruct-GGUF",
153148
branch: "main",
154-
file: "llama-2-70b-chat.Q4_K_M.gguf"
149+
file: "olmoe-1b-7b-0924-instruct-q6_k.gguf"
150+
}
151+
}, {
152+
huggingFace: {
153+
model: "allenai/OLMoE-1B-7B-0924-Instruct-GGUF",
154+
branch: "main",
155+
file: "olmoe-1b-7b-0924-instruct-q5_k_m.gguf"
156+
}
157+
}, {
158+
huggingFace: {
159+
model: "allenai/OLMoE-1B-7B-0924-Instruct-GGUF",
160+
branch: "main",
161+
file: "olmoe-1b-7b-0924-instruct-q4_k_s.gguf"
162+
}
163+
}, {
164+
huggingFace: {
165+
model: "allenai/OLMoE-1B-7B-0924-Instruct-GGUF",
166+
branch: "main",
167+
file: "olmoe-1b-7b-0924-instruct-q4_k_m.gguf"
155168
}
156169
}]
157170
}, {
@@ -213,90 +226,6 @@ export const recommendedModels: ModelRecommendation[] = [{
213226
file: "dolphin-2.5-mixtral-8x7b.Q4_K_M.gguf"
214227
}
215228
}]
216-
}, /* {
217-
name: "Functionary Medium v2.4",
218-
abilities: ["chat", "complete", "functionCalling"],
219-
description: "Functionary models were created by Meetkai and are optimized for function calling.\n" +
220-
"This is the medium version of the model.",
221-
222-
fileOptions: [{
223-
huggingFace: {
224-
model: "meetkai/functionary-medium-v2.4-GGUF",
225-
branch: "main",
226-
file: "functionary-medium-v2.4.Q8_0.gguf"
227-
}
228-
}, {
229-
huggingFace: {
230-
model: "meetkai/functionary-medium-v2.4-GGUF",
231-
branch: "main",
232-
file: "functionary-medium-v2.4.Q4_0.gguf"
233-
}
234-
}]
235-
}, */ /* {
236-
name: "Functionary Small v2.5",
237-
abilities: ["chat", "complete", "functionCalling"],
238-
description: "Functionary models were created by Meetkai and are optimized for function calling.\n" +
239-
"This model is based on Llama 3.\n" +
240-
"This is the small version of the model.",
241-
242-
fileOptions: [{
243-
huggingFace: {
244-
model: "meetkai/functionary-small-v2.5-GGUF",
245-
branch: "main",
246-
file: "functionary-small-v2.5.f16.gguf"
247-
}
248-
}, {
249-
huggingFace: {
250-
model: "meetkai/functionary-small-v2.5-GGUF",
251-
branch: "main",
252-
file: "functionary-small-v2.5.Q8_0.gguf"
253-
}
254-
}, {
255-
huggingFace: {
256-
model: "meetkai/functionary-small-v2.5-GGUF",
257-
branch: "main",
258-
file: "functionary-small-v2.5.Q4_0.gguf"
259-
}
260-
}]
261-
}, */ {
262-
name: "OLMoE 1b 7B MoE",
263-
abilities: ["chat"],
264-
description: "OLMoE models were created by AllenAI, and are fully open source models that utilize a Mixture of Experts architecture" +
265-
"Mixtures of Experts (MoE) is a technique where different models, each skilled in solving a particular kind of problem, work together to the improve the overall performance on complex tasks.\n" +
266-
"This model includes 64 expert models, with a total of 7 billion parameters.\n" +
267-
"This model generates output extremely fast.",
268-
269-
fileOptions: [{
270-
huggingFace: {
271-
model: "allenai/OLMoE-1B-7B-0924-Instruct-GGUF",
272-
branch: "main",
273-
file: "olmoe-1b-7b-0924-instruct-q8_0.gguf"
274-
}
275-
}, {
276-
huggingFace: {
277-
model: "allenai/OLMoE-1B-7B-0924-Instruct-GGUF",
278-
branch: "main",
279-
file: "olmoe-1b-7b-0924-instruct-q6_k.gguf"
280-
}
281-
}, {
282-
huggingFace: {
283-
model: "allenai/OLMoE-1B-7B-0924-Instruct-GGUF",
284-
branch: "main",
285-
file: "olmoe-1b-7b-0924-instruct-q5_k_m.gguf"
286-
}
287-
}, {
288-
huggingFace: {
289-
model: "allenai/OLMoE-1B-7B-0924-Instruct-GGUF",
290-
branch: "main",
291-
file: "olmoe-1b-7b-0924-instruct-q4_k_s.gguf"
292-
}
293-
}, {
294-
huggingFace: {
295-
model: "allenai/OLMoE-1B-7B-0924-Instruct-GGUF",
296-
branch: "main",
297-
file: "olmoe-1b-7b-0924-instruct-q4_k_m.gguf"
298-
}
299-
}]
300229
}, {
301230
name: "Gemma 2 9B",
302231
abilities: ["chat", "complete"],

0 commit comments

Comments
 (0)