webslm-react 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/use-load.js +3 -0
- package/dist/use-model.d.ts +2 -1
- package/dist/use-model.js +2 -1
- package/package.json +3 -3
package/dist/use-load.js
CHANGED
|
@@ -44,6 +44,9 @@ export function useLoad(source, options, loader) {
|
|
|
44
44
|
options.device ?? "",
|
|
45
45
|
options.revision ?? "",
|
|
46
46
|
options.contextLength ?? "",
|
|
47
|
+
options.kvCache ?? "",
|
|
48
|
+
options.kvResidual ?? "",
|
|
49
|
+
options.kvBudget ?? "",
|
|
47
50
|
options.worker ?? "",
|
|
48
51
|
options.token ?? "",
|
|
49
52
|
options.cacheDir ?? "",
|
package/dist/use-model.d.ts
CHANGED
|
@@ -12,7 +12,8 @@ export interface UseModelResult {
|
|
|
12
12
|
/**
|
|
13
13
|
* Loads a model and unloads it when the source changes or the component
|
|
14
14
|
* unmounts. Pass `null` to load nothing. Changing `quant`, `device`,
|
|
15
|
-
* `revision`, `contextLength`
|
|
15
|
+
* `revision`, `contextLength`, `kvCache`, `kvResidual`, `kvBudget` or
|
|
16
|
+
* `worker` reloads; `onProgress` may change
|
|
16
17
|
* freely. For simple `ask`/`stream`/`chat` calls, see `useLLM`.
|
|
17
18
|
*
|
|
18
19
|
* ```tsx
|
package/dist/use-model.js
CHANGED
|
@@ -3,7 +3,8 @@ import { useLoad } from "./use-load.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Loads a model and unloads it when the source changes or the component
|
|
5
5
|
* unmounts. Pass `null` to load nothing. Changing `quant`, `device`,
|
|
6
|
-
* `revision`, `contextLength`
|
|
6
|
+
* `revision`, `contextLength`, `kvCache`, `kvResidual`, `kvBudget` or
|
|
7
|
+
* `worker` reloads; `onProgress` may change
|
|
7
8
|
* freely. For simple `ask`/`stream`/`chat` calls, see `useLLM`.
|
|
8
9
|
*
|
|
9
10
|
* ```tsx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webslm-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "React hooks for webslm: load small language models in the browser, chat with them and search the Hugging Face Hub.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Maxime Golfier",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
],
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": ">=18",
|
|
41
|
-
"webslm": "^0.
|
|
41
|
+
"webslm": "^0.7.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@testing-library/dom": "^10.4.2",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"react-dom": "^19.3.1",
|
|
52
52
|
"typescript": "^7.0.2",
|
|
53
53
|
"vitest": "^5.1.2",
|
|
54
|
-
"webslm": "^0.
|
|
54
|
+
"webslm": "^0.7.0"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json",
|