Skip to content

Commit

Permalink
sync to latest upstream source code
Browse files Browse the repository at this point in the history
  • Loading branch information
ngxson committed Dec 23, 2024
1 parent ee31d9f commit b930721
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 12 deletions.
4 changes: 1 addition & 3 deletions actions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,6 @@ json action_sampling_init(app_t &app, json &body)
sparams.penalty_freq = body["penalty_freq"];
if (body.contains("penalty_present"))
sparams.penalty_present = body["penalty_present"];
if (body.contains("penalize_nl"))
sparams.penalize_nl = body["penalize_nl"];
if (body.contains("dynatemp_range"))
sparams.dynatemp_range = body["dynatemp_range"];
if (body.contains("dynatemp_exponent"))
Expand Down Expand Up @@ -580,7 +578,7 @@ json action_embeddings(app_t &app, json &body)
return json{{"error", "failed to get embeddings"}};
}
}
common_embd_normalize(embd, out, n_embd);
common_embd_normalize(embd, out, n_embd, 2);
return json{
{"success", true},
{"embeddings", embeddings},
Expand Down
2 changes: 1 addition & 1 deletion llama.cpp
Submodule llama.cpp updated 224 files
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wllama/wllama",
"version": "2.1.0",
"version": "2.1.1",
"description": "WebAssembly binding for llama.cpp - Enabling on-browser LLM inference",
"main": "index.js",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion src/multi-thread/wllama.js

Large diffs are not rendered by default.

Binary file modified src/multi-thread/wllama.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion src/single-thread/wllama.js

Large diffs are not rendered by default.

Binary file modified src/single-thread/wllama.wasm
Binary file not shown.
4 changes: 2 additions & 2 deletions src/wasm-from-cdn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Do not edit this file directly

const WasmFromCDN = {
'single-thread/wllama.wasm': 'https://cdn.jsdelivr.net/npm/@wllama/[email protected].0/src/single-thread/wllama.wasm',
'multi-thread/wllama.wasm': 'https://cdn.jsdelivr.net/npm/@wllama/[email protected].0/src/multi-thread/wllama.wasm',
'single-thread/wllama.wasm': 'https://cdn.jsdelivr.net/npm/@wllama/[email protected].1/src/single-thread/wllama.wasm',
'multi-thread/wllama.wasm': 'https://cdn.jsdelivr.net/npm/@wllama/[email protected].1/src/multi-thread/wllama.wasm',
};

export default WasmFromCDN;
1 change: 0 additions & 1 deletion src/wllama.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ export interface SamplingConfig {
penalty_repeat?: number;
penalty_freq?: number;
penalty_present?: number;
penalize_nl?: boolean;
dynatemp_range?: number;
dynatemp_exponent?: number;
grammar?: string;
Expand Down
4 changes: 2 additions & 2 deletions src/workers-code/generated.ts

Large diffs are not rendered by default.

0 comments on commit b930721

Please sign in to comment.