@blank-utils/llm 0.4.19 → 0.4.20

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.
@@ -1461,7 +1461,7 @@ ${systemPrompt}` : systemPrompt;
1461
1461
  const { pipeline: pipeline2, env } = await import("@huggingface/transformers");
1462
1462
  env.allowLocalModels = false;
1463
1463
  env.useBrowserCache = true;
1464
- const captioner = await pipeline2("image-to-text", "onnx-community/Florence-2-base-ft", { device: "wasm", dtype: "q8" });
1464
+ const captioner = await pipeline2("image-to-text", "Xenova/vit-gpt2-image-captioning", { device: "wasm", dtype: "q8" });
1465
1465
  for (let i = 0; i < needsCaptioning.length; i++) {
1466
1466
  if (abortRef.current) break;
1467
1467
  const img = needsCaptioning[i];
@@ -1469,9 +1469,9 @@ ${systemPrompt}` : systemPrompt;
1469
1469
  setStreamingText(`[System: Extracting detailed visual description for ${img.name}... ${i + 1}/${needsCaptioning.length}]
1470
1470
  `);
1471
1471
  const out = await captioner(img.dataUrl, {
1472
- text: "<MORE_DETAILED_CAPTION>",
1473
- max_new_tokens: 512,
1474
- num_beams: 3
1472
+ max_new_tokens: 64,
1473
+ num_beams: 4,
1474
+ repetition_penalty: 1.5
1475
1475
  });
1476
1476
  let val = "";
1477
1477
  if (Array.isArray(out) && out[0] && out[0].generated_text) val = out[0].generated_text;
package/dist/index.js CHANGED
@@ -26,7 +26,7 @@ import {
26
26
  useCompletion,
27
27
  useLLM,
28
28
  useStream
29
- } from "./chunk-JOBJ4PY7.js";
29
+ } from "./chunk-T4VK6BPC.js";
30
30
  export {
31
31
  Chat,
32
32
  ChatInput,
@@ -9,7 +9,7 @@ import {
9
9
  useCompletion,
10
10
  useLLM,
11
11
  useStream
12
- } from "../chunk-JOBJ4PY7.js";
12
+ } from "../chunk-T4VK6BPC.js";
13
13
  export {
14
14
  Chat,
15
15
  ChatApp,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blank-utils/llm",
3
- "version": "0.4.19",
3
+ "version": "0.4.20",
4
4
  "description": "Run LLMs directly in your browser with WebGPU acceleration. Supports React hooks and eager background loading.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",