webslm 0.4.0 → 0.5.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.
Binary file
@@ -112,6 +112,12 @@ export class WasmModel {
112
112
  * weights: a valid stored file serves them instead of converting the
113
113
  * checkpoint, else they are written to it as they are converted;
114
114
  * `info().weightCache` says which (see [`WeightCacheOutcome`]).
115
+ *
116
+ * `ggufFile` loads that GGUF file of the source (a source listing
117
+ * GGUF files and no safetensors loads its preferred one). Without
118
+ * `format`, a pre-quantized checkpoint (a `Q8_0` GGUF file, a
119
+ * `webslm export` checkpoint) loads in its own format, its blocks
120
+ * unchanged; weights already in the load format skip `weightCache`.
115
121
  */
116
122
  static load(source: JsSource, options_json: string, lora?: JsSource | null, weight_cache?: JsWeightCache | null): Promise<WasmModel>;
117
123
  /**
@@ -265,6 +265,12 @@ export class WasmModel {
265
265
  * weights: a valid stored file serves them instead of converting the
266
266
  * checkpoint, else they are written to it as they are converted;
267
267
  * `info().weightCache` says which (see [`WeightCacheOutcome`]).
268
+ *
269
+ * `ggufFile` loads that GGUF file of the source (a source listing
270
+ * GGUF files and no safetensors loads its preferred one). Without
271
+ * `format`, a pre-quantized checkpoint (a `Q8_0` GGUF file, a
272
+ * `webslm export` checkpoint) loads in its own format, its blocks
273
+ * unchanged; weights already in the load format skip `weightCache`.
268
274
  * @param {JsSource} source
269
275
  * @param {string} options_json
270
276
  * @param {JsSource | null} [lora]
@@ -1584,42 +1590,42 @@ function __wbg_get_imports(memory) {
1584
1590
  arg0.writeBuffer(arg1, arg2, getArrayU8FromWasm0(arg3, arg4), arg5, arg6);
1585
1591
  }, arguments); },
1586
1592
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
1587
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 365, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1593
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 368, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1588
1594
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue______true_);
1589
1595
  return ret;
1590
1596
  },
1591
1597
  __wbindgen_generic_0000000000000002: function(arg0, arg1) {
1592
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 888, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1598
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 908, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1593
1599
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue__core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true_);
1594
1600
  return ret;
1595
1601
  },
1596
1602
  __wbindgen_generic_0000000000000003: function(arg0, arg1) {
1597
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 890, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1603
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 910, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1598
1604
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___js_sys_b608be85a12bc1d0___futures__task__wait_async_polyfill__MessageEvent______true_);
1599
1605
  return ret;
1600
1606
  },
1601
1607
  __wbindgen_generic_0000000000000004: function(arg0, arg1) {
1602
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 363, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1608
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 366, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1603
1609
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___sys__JsNullable_wgpu_4ecf802b864e9046___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true_);
1604
1610
  return ret;
1605
1611
  },
1606
1612
  __wbindgen_generic_0000000000000005: function(arg0, arg1) {
1607
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 365, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1613
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 368, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1608
1614
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue______true__44);
1609
1615
  return ret;
1610
1616
  },
1611
1617
  __wbindgen_generic_0000000000000006: function(arg0, arg1) {
1612
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx: 365, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1618
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx: 368, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1613
1619
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue______true__45);
1614
1620
  return ret;
1615
1621
  },
1616
1622
  __wbindgen_generic_0000000000000007: function(arg0, arg1) {
1617
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 363, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1623
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 366, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1618
1624
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___sys__JsNullable_wgpu_4ecf802b864e9046___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true__46);
1619
1625
  return ret;
1620
1626
  },
1621
1627
  __wbindgen_generic_0000000000000008: function(arg0, arg1) {
1622
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 363, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1628
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 366, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1623
1629
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___sys__JsNullable_wgpu_4ecf802b864e9046___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true__47);
1624
1630
  return ret;
1625
1631
  },
Binary file