@genai-fi/nanogpt 0.10.0 → 0.10.2
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/Generator.js +14 -14
- package/dist/{RealDiv-DgA3z9oO.js → RealDiv-zz7FpkKX.js} +17 -17
- package/dist/{Reshape-CF6odzV4.js → Reshape-CDVLyVfz.js} +3 -3
- package/dist/{Reshape-_kILl6tK.js → Reshape-CHdUjC72.js} +4 -4
- package/dist/TeachableLLM.js +8 -8
- package/dist/{axis_util-BvHEw88j.js → axis_util-BsIr9ZNu.js} +1 -1
- package/dist/backend.js +2 -2
- package/dist/{backend_util-D-rUb2ty.js → backend_util-B1XRLuq9.js} +31 -31
- package/dist/{backend_webgpu-B0u2ndUn.js → backend_webgpu-CqpfEImu.js} +5 -5
- package/dist/{broadcast_to-CwF7XIeu.js → broadcast_to-B0ChcDaz.js} +4 -4
- package/dist/checks/appendCache.js +2 -2
- package/dist/checks/attentionMask.js +3 -3
- package/dist/checks/gelu.js +2 -2
- package/dist/checks/matMulGelu.js +5 -5
- package/dist/checks/normRMS.js +4 -4
- package/dist/checks/normRMSGrad.js +3 -3
- package/dist/checks/packUnpack.js +2 -2
- package/dist/checks/qkv.js +3 -3
- package/dist/checks/rope.js +2 -2
- package/dist/{complex-CSlYz-2T.js → complex-BBiRlsVq.js} +3 -3
- package/dist/{concat-BHlIJeyT.js → concat-DmBLPVGC.js} +3 -3
- package/dist/{concat_util-DcJk7YHS.js → concat_util-iBYIyuQe.js} +1 -1
- package/dist/{dataset-0xP8GjwI.js → dataset-D2P7rHAw.js} +5 -5
- package/dist/{dropout-C1pM3f11.js → dropout-B1x1kYMa.js} +3 -3
- package/dist/{expand_dims-BPG4fwBP.js → expand_dims-ouvfxQ1n.js} +3 -3
- package/dist/{exports_initializers-xuidcwI4.js → exports_initializers-CZSUJoVE.js} +1 -1
- package/dist/{gather-DykLGqmW.js → gather-CH9sdacz.js} +2 -2
- package/dist/{gelu-CNLFZWea.js → gelu-Bmhopi0J.js} +2 -2
- package/dist/{gpgpu_math-DDVJCn6-.js → gpgpu_math-DsCcikas.js} +3 -3
- package/dist/{index-ZyQhjEPo.js → index-D6Q1lPZO.js} +55 -55
- package/dist/{index-CjOj7j-u.js → index-DRyE072i.js} +15 -15
- package/dist/{kernel_funcs_utils-Dg_-E44D.js → kernel_funcs_utils-CWfOAPGO.js} +9 -9
- package/dist/layers/BaseLayer.js +10 -10
- package/dist/layers/CausalSelfAttention.js +6 -6
- package/dist/layers/MLP.js +4 -4
- package/dist/layers/PositionEmbedding.js +5 -5
- package/dist/layers/RMSNorm.js +3 -3
- package/dist/layers/RoPECache.js +4 -4
- package/dist/layers/TiedEmbedding.js +6 -6
- package/dist/layers/TransformerBlock.js +1 -1
- package/dist/loader/loadTransformers.js +1 -1
- package/dist/loader/oldZipLoad.js +8 -8
- package/dist/{log_sum_exp-DWI-76TI.js → log_sum_exp-D3ftBNY5.js} +6 -6
- package/dist/main.js +8 -8
- package/dist/{matMul16--R5hOwDG.js → matMul16-fEAJ4smh.js} +4 -4
- package/dist/{mat_mul-DeAh4uTH.js → mat_mul-C59XWcJd.js} +2 -2
- package/dist/{mod-Gt1rMB4n.js → mod-DESSvHIU.js} +2 -2
- package/dist/models/NanoGPTV1.js +2 -2
- package/dist/models/model.js +8 -8
- package/dist/{mulmat_packed_gpu-BMFhLwta.js → mulmat_packed_gpu-Coh6qbJk.js} +1 -1
- package/dist/{ones-CAMiP4I2.js → ones-jU9jlQvM.js} +4 -4
- package/dist/ops/adamAdjust.js +1 -1
- package/dist/ops/adamMoments.js +1 -1
- package/dist/ops/add16.js +1 -1
- package/dist/ops/appendCache.js +3 -3
- package/dist/ops/attentionMask.js +1 -1
- package/dist/ops/concat16.js +2 -2
- package/dist/ops/cpu/adamAdjust.js +2 -2
- package/dist/ops/cpu/adamMoments.js +3 -3
- package/dist/ops/cpu/appendCache.js +3 -3
- package/dist/ops/cpu/attentionMask.js +6 -6
- package/dist/ops/cpu/fusedSoftmax.js +3 -3
- package/dist/ops/cpu/gatherSub.js +4 -4
- package/dist/ops/cpu/gelu.js +2 -2
- package/dist/ops/cpu/matMul16.js +3 -3
- package/dist/ops/cpu/matMulGelu.js +4 -4
- package/dist/ops/cpu/matMulMul.js +2 -2
- package/dist/ops/cpu/mulDropout.js +2 -2
- package/dist/ops/cpu/normRMS.js +2 -2
- package/dist/ops/cpu/qkv.js +4 -4
- package/dist/ops/cpu/rope.js +6 -6
- package/dist/ops/cpu/scatterSub.js +7 -7
- package/dist/ops/dot16.js +2 -2
- package/dist/ops/gatherSub.js +1 -1
- package/dist/ops/gelu.js +2 -2
- package/dist/ops/grads/add16.js +2 -2
- package/dist/ops/grads/attentionMask.js +3 -3
- package/dist/ops/grads/gelu.js +3 -3
- package/dist/ops/grads/matMul16.js +4 -4
- package/dist/ops/grads/matMulGelu.js +2 -2
- package/dist/ops/grads/normRMS.js +2 -2
- package/dist/ops/grads/pack16.js +4 -4
- package/dist/ops/grads/qkv.js +4 -4
- package/dist/ops/grads/rope.js +3 -3
- package/dist/ops/grads/softmax16.js +2 -2
- package/dist/ops/grads/unpack16.js +3 -3
- package/dist/ops/matMul16.js +3 -3
- package/dist/ops/matMulGelu.js +1 -1
- package/dist/ops/matMulMul.js +1 -1
- package/dist/ops/mul16.js +1 -1
- package/dist/ops/mulDrop.js +1 -1
- package/dist/ops/normRMS.js +1 -1
- package/dist/ops/pack16.js +2 -2
- package/dist/ops/qkv.js +1 -1
- package/dist/ops/reshape16.js +3 -3
- package/dist/ops/rope.js +5 -5
- package/dist/ops/scatterSub.js +1 -1
- package/dist/ops/slice16.js +2 -2
- package/dist/ops/softmax16.js +1 -1
- package/dist/ops/sub16.js +1 -1
- package/dist/ops/sum16.js +2 -2
- package/dist/ops/transpose16.js +4 -4
- package/dist/ops/unpack16.js +2 -2
- package/dist/ops/webgl/adamAdjust.js +3 -3
- package/dist/ops/webgl/adamMoments.js +2 -2
- package/dist/ops/webgl/appendCache.js +2 -2
- package/dist/ops/webgl/attentionMask.js +2 -2
- package/dist/ops/webgl/fusedSoftmax.js +6 -6
- package/dist/ops/webgl/gatherSub.js +2 -2
- package/dist/ops/webgl/gelu.js +3 -3
- package/dist/ops/webgl/log.js +4 -4
- package/dist/ops/webgl/matMul16.js +5 -5
- package/dist/ops/webgl/matMulGelu.js +6 -6
- package/dist/ops/webgl/matMulMul.js +2 -2
- package/dist/ops/webgl/mulDropout.js +2 -2
- package/dist/ops/webgl/normRMS.js +3 -3
- package/dist/ops/webgl/qkv.js +2 -2
- package/dist/ops/webgl/rope.js +2 -2
- package/dist/ops/webgl/scatterSub.js +2 -2
- package/dist/ops/webgpu/adamAdjust.js +5 -5
- package/dist/ops/webgpu/adamMoments.js +5 -5
- package/dist/ops/webgpu/add16.js +2 -2
- package/dist/ops/webgpu/appendCache.js +5 -5
- package/dist/ops/webgpu/attentionMask.js +4 -4
- package/dist/ops/webgpu/attentionMask32_program.js +2 -2
- package/dist/ops/webgpu/concat16.js +7 -7
- package/dist/ops/webgpu/gatherSub.js +5 -5
- package/dist/ops/webgpu/gelu.js +4 -4
- package/dist/ops/webgpu/matMul16.js +6 -6
- package/dist/ops/webgpu/matMul16_program.js +3 -3
- package/dist/ops/webgpu/mul16.js +2 -2
- package/dist/ops/webgpu/normRMS.js +4 -4
- package/dist/ops/webgpu/normRMSGrad.js +6 -6
- package/dist/ops/webgpu/pack16.js +2 -2
- package/dist/ops/webgpu/pack16_program.js +2 -2
- package/dist/ops/webgpu/qkv.js +4 -4
- package/dist/ops/webgpu/rope.js +5 -5
- package/dist/ops/webgpu/scatterSub.js +5 -5
- package/dist/ops/webgpu/slice16.js +6 -6
- package/dist/ops/webgpu/softmax16.js +4 -4
- package/dist/ops/webgpu/softmax16_program.js +2 -2
- package/dist/ops/webgpu/softmax16_subgroup_program.js +2 -2
- package/dist/ops/webgpu/softmax16grad.js +2 -2
- package/dist/ops/webgpu/sub16.js +2 -2
- package/dist/ops/webgpu/sum16.js +5 -5
- package/dist/ops/webgpu/transpose16.js +3 -3
- package/dist/ops/webgpu/transpose16_program.js +2 -2
- package/dist/ops/webgpu/transpose16_shared_program.js +4 -4
- package/dist/ops/webgpu/unpack16.js +4 -4
- package/dist/ops/webgpu/utils/binary_op.js +4 -4
- package/dist/ops/webgpu/utils/reductions.js +5 -5
- package/dist/{ops-CNI3TwqM.js → ops-BFDtP6th.js} +24 -24
- package/dist/{pack16-CFUqumar.js → pack16-CmVZs6af.js} +3 -3
- package/dist/patches/PackedTensor.js +1 -1
- package/dist/patches/engine.js +7 -5
- package/dist/patches/tape.js +1 -1
- package/dist/patches/webgpu_backend.js +5 -5
- package/dist/patches/webgpu_base.js +1 -1
- package/dist/patches/webgpu_program.js +3 -3
- package/dist/{random_width-DY6Kk2Dl.js → random_width-BVV9HveY.js} +31 -31
- package/dist/{range-BMS52eQi.js → range-ZZZD60Fx.js} +2 -2
- package/dist/{reciprocal-CTmshQ9J.js → reciprocal-CrYlsAGD.js} +2 -2
- package/dist/{register_all_kernels-Bwu1PTuU.js → register_all_kernels-nvj2k7OC.js} +41 -41
- package/dist/{relu-yZ2-7WxU.js → relu-BYDneVPn.js} +2 -2
- package/dist/{reshape-DevtBWtf.js → reshape-CaPQzFvz.js} +2 -2
- package/dist/{rope-B5UUMsPi.js → rope-s4W2XO9B.js} +5 -5
- package/dist/{scatter_nd_util-5EL-8VAQ.js → scatter_nd_util-C7zXRT_h.js} +1 -1
- package/dist/{selu_util-D1w6yyTO.js → selu_util-BGPXmd4B.js} +16 -16
- package/dist/{shared-BRksrJb3.js → shared-CHhxz-O5.js} +1 -1
- package/dist/{shared-BuAXb4CI.js → shared-D2NP_CpY.js} +8 -8
- package/dist/{sin-BGfy2HZo.js → sin-Djs4aQiu.js} +2 -2
- package/dist/{slice-D_gkkqZK.js → slice-DvovR5wq.js} +2 -2
- package/dist/{slice_util-DtEldBfK.js → slice_util-DyjSAD0u.js} +1 -1
- package/dist/{softmax-ZHVebtR1.js → softmax-C9JQEtnO.js} +2 -2
- package/dist/{split-DrfihRpZ.js → split-DBck65sX.js} +2 -2
- package/dist/{squeeze-DZEpeblb.js → squeeze-C00Ipm_7.js} +3 -3
- package/dist/{stack-yOIAalTq.js → stack-ChnHwRpX.js} +3 -3
- package/dist/{sum-_fzj5ZTB.js → sum-ywRJj3Zr.js} +2 -2
- package/dist/{tensor-f35l8Odg.js → tensor-0r5yOo2R.js} +1 -1
- package/dist/{tensor-DdQUJZlz.js → tensor-CzmOBsdf.js} +21 -21
- package/dist/{tensor1d-CeZuc-Rv.js → tensor1d-BlUT89BP.js} +2 -2
- package/dist/{tensor2d-G4Ys2GxX.js → tensor2d-CSB4KOb0.js} +2 -2
- package/dist/{tensor4d-B8roDgtc.js → tensor4d-D7bLqGqz.js} +2 -2
- package/dist/{tensor_util-DV-FP5Q3.js → tensor_util-DfwaWayG.js} +12 -12
- package/dist/{tfjs_backend-kNyO5L2d.js → tfjs_backend-CNkSTL0c.js} +38 -38
- package/dist/{tile-BzyEiF-F.js → tile-CR074jmp.js} +3 -3
- package/dist/training/Adam.js +2 -2
- package/dist/training/AdamExt.js +1 -1
- package/dist/training/DatasetBuilder.js +2 -2
- package/dist/training/FullTrainer.js +1 -1
- package/dist/training/Trainer.js +2 -2
- package/dist/training/sparseCrossEntropy.js +3 -3
- package/dist/{transpose-DKELTqhe.js → transpose-DH4gmHvu.js} +4 -4
- package/dist/utilities/dummy.js +3 -3
- package/dist/utilities/multinomialCPU.js +2 -2
- package/dist/utilities/packed.js +338 -304
- package/dist/utilities/performance.js +1 -1
- package/dist/utilities/profile.js +1 -1
- package/dist/utilities/safetensors.js +2 -2
- package/dist/utilities/sentences.js +5 -5
- package/dist/utilities/weights.js +2 -2
- package/dist/{variable-Bhn5bHYv.js → variable-DzfrwYuP.js} +1 -1
- package/dist/{webgpu_program-Cigz-7RF.js → webgpu_program-DzaQiqel.js} +2 -2
- package/dist/{webgpu_util-BBCnKm2X.js → webgpu_util-0_ubCEHJ.js} +2 -2
- package/dist/{zeros-2gldETuK.js → zeros-DBFVbpv5.js} +3 -3
- package/package.json +1 -1
package/dist/Generator.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { E as C } from "./index-DvYrXKkX.js";
|
|
2
|
-
import { A as _, B as I, E as O, t as R, k as q } from "./index-
|
|
2
|
+
import { A as _, B as I, E as O, t as R, k as q } from "./index-D6Q1lPZO.js";
|
|
3
3
|
import "./utilities/packed.js";
|
|
4
4
|
import "./ops/cpu/attentionMask.js";
|
|
5
5
|
import "./ops/webgl/attentionMask.js";
|
|
6
6
|
import "./ops/grads/attentionMask.js";
|
|
7
|
-
import { p as K } from "./random_width-
|
|
8
|
-
import { t as j } from "./register_all_kernels-
|
|
7
|
+
import { p as K } from "./random_width-BVV9HveY.js";
|
|
8
|
+
import { t as j } from "./register_all_kernels-nvj2k7OC.js";
|
|
9
9
|
import "./index-Cp39cXWe.js";
|
|
10
|
-
import "./dataset-
|
|
10
|
+
import "./dataset-D2P7rHAw.js";
|
|
11
11
|
import "./ops/cpu/rope.js";
|
|
12
12
|
import "./ops/webgl/rope.js";
|
|
13
|
-
import "./rope-
|
|
13
|
+
import "./rope-s4W2XO9B.js";
|
|
14
14
|
import "./ops/cpu/appendCache.js";
|
|
15
15
|
import "./ops/webgl/appendCache.js";
|
|
16
16
|
import "./ops/grads/softmax16.js";
|
|
17
|
-
import "./matMul16
|
|
17
|
+
import "./matMul16-fEAJ4smh.js";
|
|
18
18
|
import "./ops/webgl/matMul16.js";
|
|
19
19
|
import "./ops/cpu/matMul16.js";
|
|
20
|
-
import "./pack16-
|
|
20
|
+
import "./pack16-CmVZs6af.js";
|
|
21
21
|
import "./ops/transpose16.js";
|
|
22
22
|
import "./ops/reshape16.js";
|
|
23
23
|
import "./ops/cpu/qkv.js";
|
|
@@ -45,17 +45,17 @@ import "./ops/webgl/matMulGelu.js";
|
|
|
45
45
|
import "./ops/grads/matMulGelu.js";
|
|
46
46
|
import "./ops/cpu/gelu.js";
|
|
47
47
|
import "./ops/webgl/gelu.js";
|
|
48
|
-
import "./gelu-
|
|
48
|
+
import "./gelu-Bmhopi0J.js";
|
|
49
49
|
import "./ops/webgl/log.js";
|
|
50
50
|
import "./checks/normRMS.js";
|
|
51
51
|
import "./checks/normRMSGrad.js";
|
|
52
52
|
import M from "./utilities/multinomialCPU.js";
|
|
53
|
-
import { i as N } from "./tensor_util-
|
|
54
|
-
import { r as E } from "./reshape-
|
|
55
|
-
import { t as P } from "./tensor2d-
|
|
56
|
-
import { s as S } from "./softmax-
|
|
57
|
-
import { g as B } from "./gather-
|
|
58
|
-
import { c as H } from "./concat-
|
|
53
|
+
import { i as N } from "./tensor_util-DfwaWayG.js";
|
|
54
|
+
import { r as E } from "./reshape-CaPQzFvz.js";
|
|
55
|
+
import { t as P } from "./tensor2d-CSB4KOb0.js";
|
|
56
|
+
import { s as S } from "./softmax-C9JQEtnO.js";
|
|
57
|
+
import { g as B } from "./gather-CH9sdacz.js";
|
|
58
|
+
import { c as H } from "./concat-DmBLPVGC.js";
|
|
59
59
|
function U(l, t, s, e = !1) {
|
|
60
60
|
const o = I(l, "logits", "multinomial"), i = o.size, c = o.rank;
|
|
61
61
|
if (i < 2)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { r as $ } from "./Reshape-
|
|
3
|
-
import { _ as T, g as E, y as B, $ as F } from "./tensor_util-
|
|
4
|
-
import {
|
|
5
|
-
import { a as A, b as k, d as C, c as N, e as R } from "./axis_util-
|
|
6
|
-
import { t as
|
|
7
|
-
import { c as
|
|
8
|
-
import { f as y } from "./gpgpu_math-
|
|
9
|
-
import { g as
|
|
1
|
+
import "./index-D6Q1lPZO.js";
|
|
2
|
+
import { r as $ } from "./Reshape-CHdUjC72.js";
|
|
3
|
+
import { _ as T, g as E, y as B, $ as F } from "./tensor_util-DfwaWayG.js";
|
|
4
|
+
import { G as _, e as G, p as O, s as V } from "./tensor-CzmOBsdf.js";
|
|
5
|
+
import { a as A, b as k, d as C, c as N, e as R } from "./axis_util-BsIr9ZNu.js";
|
|
6
|
+
import { t as K, m as U } from "./shared-CHhxz-O5.js";
|
|
7
|
+
import { c as W } from "./backend_util-B1XRLuq9.js";
|
|
8
|
+
import { f as y } from "./gpgpu_math-DsCcikas.js";
|
|
9
|
+
import { g as j, b as L } from "./kernel_funcs_utils-CWfOAPGO.js";
|
|
10
10
|
class w {
|
|
11
11
|
constructor(s, e) {
|
|
12
12
|
this.variableNames = ["x"];
|
|
@@ -186,7 +186,7 @@ class X {
|
|
|
186
186
|
function q(a) {
|
|
187
187
|
const s = [];
|
|
188
188
|
for (; s.length === 0 || s[s.length - 1].outSize !== 1; ) {
|
|
189
|
-
const e = s.length ? s[s.length - 1].outSize : a[1], t =
|
|
189
|
+
const e = s.length ? s[s.length - 1].outSize : a[1], t = W(e);
|
|
190
190
|
s.push({
|
|
191
191
|
inSize: e,
|
|
192
192
|
windowSize: t,
|
|
@@ -205,14 +205,14 @@ function P(a, s, e, t) {
|
|
|
205
205
|
}
|
|
206
206
|
return l;
|
|
207
207
|
}
|
|
208
|
-
class
|
|
208
|
+
class Y {
|
|
209
209
|
constructor(s, e) {
|
|
210
210
|
this.variableNames = ["A"];
|
|
211
211
|
const t = new Array(s.length);
|
|
212
212
|
for (let r = 0; r < t.length; r++)
|
|
213
213
|
t[r] = s[e[r]];
|
|
214
214
|
this.outputShape = t, this.rank = t.length;
|
|
215
|
-
const n = y(this.rank), l =
|
|
215
|
+
const n = y(this.rank), l = H(e);
|
|
216
216
|
this.userCode = `
|
|
217
217
|
void main() {
|
|
218
218
|
${n} resRC = getOutputCoords();
|
|
@@ -221,7 +221,7 @@ class H {
|
|
|
221
221
|
`;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function H(a) {
|
|
225
225
|
const s = a.length;
|
|
226
226
|
if (s > 6)
|
|
227
227
|
throw Error(`Transpose for rank ${s} is not yet supported`);
|
|
@@ -238,7 +238,7 @@ class J {
|
|
|
238
238
|
t[u] = s[e[u]];
|
|
239
239
|
if (this.outputShape = t, this.rank = t.length, this.rank > 6)
|
|
240
240
|
throw Error(`Packed transpose for rank ${this.rank} is not yet supported.`);
|
|
241
|
-
const n = y(this.rank), l =
|
|
241
|
+
const n = y(this.rank), l = j("rc", this.rank), r = new Array(this.rank);
|
|
242
242
|
for (let u = 0; u < e.length; u++)
|
|
243
243
|
r[e[u]] = l[u];
|
|
244
244
|
const i = `vec2(${r.slice(-2).join()})`, c = `++${l[this.rank - 1]} < ${t[this.rank - 1]}`, o = `getChannel(getA(${r.join()}), ${i})`;
|
|
@@ -263,7 +263,7 @@ class J {
|
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
function D(a, s, e) {
|
|
266
|
-
const t =
|
|
266
|
+
const t = G().getBool("WEBGL_PACK_ARRAY_OPERATIONS") ? new J(a.shape, s) : new Y(a.shape, s);
|
|
267
267
|
return e.runWebGLProgram(t, [a], a.dtype);
|
|
268
268
|
}
|
|
269
269
|
function Q(a, s, e, t) {
|
|
@@ -301,7 +301,7 @@ function te(a) {
|
|
|
301
301
|
const I = e.texData.get(d.dataId).values, m = new Array(i);
|
|
302
302
|
for (let v = 0; v < m.length; v++)
|
|
303
303
|
m[v] = n.shape[u[v]];
|
|
304
|
-
const z =
|
|
304
|
+
const z = K(I, n.shape, n.dtype, u, m);
|
|
305
305
|
d = e.makeTensorInfo(m, n.dtype);
|
|
306
306
|
const M = e.texData.get(d.dataId);
|
|
307
307
|
M.values = z;
|
|
@@ -315,7 +315,7 @@ function te(a) {
|
|
|
315
315
|
r && (g = R(f, c));
|
|
316
316
|
let x;
|
|
317
317
|
if (h) {
|
|
318
|
-
const I = e.texData.get(d.dataId).values, m =
|
|
318
|
+
const I = e.texData.get(d.dataId).values, m = U(I, V(S), g, n.dtype);
|
|
319
319
|
x = e.makeTensorInfo(g, n.dtype);
|
|
320
320
|
const z = e.texData.get(x.dataId);
|
|
321
321
|
z.values = m;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { s as p, n as m, a as d } from "./tensor-
|
|
3
|
-
import { b as c } from "./tensor_util-
|
|
1
|
+
import "./index-D6Q1lPZO.js";
|
|
2
|
+
import { s as p, n as m, a as d } from "./tensor-CzmOBsdf.js";
|
|
3
|
+
import { b as c } from "./tensor_util-DfwaWayG.js";
|
|
4
4
|
function i(t) {
|
|
5
5
|
const { inputs: h, attrs: o } = t, { x: e } = h, { shape: r } = o, a = p(e.shape), s = m(r, a), n = p(s);
|
|
6
6
|
return d(a === n, () => `The new shape (${s}) has ${n} elements and the old shape (${e.shape}) has ${a} elements. The new shape and old shape must have the same number of elements.`), t.backend.incRef(e.dataId), { dataId: e.dataId, shape: s, dtype: e.dtype };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { u as C, g as f, a as R, b as g, c as I, d as c, e as u, i as m } from "./gpgpu_math-
|
|
3
|
-
import { b as x } from "./tensor_util-
|
|
4
|
-
import { s as l, n as F, a as $ } from "./tensor-
|
|
1
|
+
import "./index-D6Q1lPZO.js";
|
|
2
|
+
import { u as C, g as f, a as R, b as g, c as I, d as c, e as u, i as m } from "./gpgpu_math-DsCcikas.js";
|
|
3
|
+
import { b as x } from "./tensor_util-DfwaWayG.js";
|
|
4
|
+
import { s as l, n as F, a as $ } from "./tensor-CzmOBsdf.js";
|
|
5
5
|
class S {
|
|
6
6
|
constructor(t, i) {
|
|
7
7
|
this.variableNames = ["A"], this.packedInputs = !0, this.packedOutput = !0, this.customUniforms = [{ name: "inputShape", type: "ivec3" }], this.outputShape = t, this.enableShapeUniforms = C(this.outputShape.length);
|
package/dist/TeachableLLM.js
CHANGED
|
@@ -6,24 +6,24 @@ import p from "./Trainer.js";
|
|
|
6
6
|
import { E as f } from "./index-DvYrXKkX.js";
|
|
7
7
|
import { dummyPassTrainAsync as m } from "./utilities/dummy.js";
|
|
8
8
|
import "./utilities/packed.js";
|
|
9
|
-
import "./index-
|
|
9
|
+
import "./index-D6Q1lPZO.js";
|
|
10
10
|
import "./ops/cpu/attentionMask.js";
|
|
11
11
|
import "./ops/webgl/attentionMask.js";
|
|
12
12
|
import "./ops/grads/attentionMask.js";
|
|
13
|
-
import "./random_width-
|
|
14
|
-
import "./register_all_kernels-
|
|
13
|
+
import "./random_width-BVV9HveY.js";
|
|
14
|
+
import "./register_all_kernels-nvj2k7OC.js";
|
|
15
15
|
import "./index-Cp39cXWe.js";
|
|
16
|
-
import "./dataset-
|
|
16
|
+
import "./dataset-D2P7rHAw.js";
|
|
17
17
|
import "./ops/cpu/rope.js";
|
|
18
18
|
import "./ops/webgl/rope.js";
|
|
19
|
-
import "./rope-
|
|
19
|
+
import "./rope-s4W2XO9B.js";
|
|
20
20
|
import "./ops/cpu/appendCache.js";
|
|
21
21
|
import "./ops/webgl/appendCache.js";
|
|
22
22
|
import "./ops/grads/softmax16.js";
|
|
23
|
-
import "./matMul16
|
|
23
|
+
import "./matMul16-fEAJ4smh.js";
|
|
24
24
|
import "./ops/webgl/matMul16.js";
|
|
25
25
|
import "./ops/cpu/matMul16.js";
|
|
26
|
-
import "./pack16-
|
|
26
|
+
import "./pack16-CmVZs6af.js";
|
|
27
27
|
import "./ops/transpose16.js";
|
|
28
28
|
import "./ops/reshape16.js";
|
|
29
29
|
import "./ops/cpu/qkv.js";
|
|
@@ -46,7 +46,7 @@ import "./ops/webgl/matMulGelu.js";
|
|
|
46
46
|
import "./ops/grads/matMulGelu.js";
|
|
47
47
|
import "./ops/cpu/gelu.js";
|
|
48
48
|
import "./ops/webgl/gelu.js";
|
|
49
|
-
import "./gelu-
|
|
49
|
+
import "./gelu-Bmhopi0J.js";
|
|
50
50
|
import "./ops/webgl/log.js";
|
|
51
51
|
import "./ops/cpu/adamMoments.js";
|
|
52
52
|
import "./ops/webgl/adamMoments.js";
|
package/dist/backend.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { g as o, s as e, r as s } from "./index-
|
|
1
|
+
import { g as o, s as e, r as s } from "./index-D6Q1lPZO.js";
|
|
2
2
|
async function c(t, a) {
|
|
3
3
|
if (o() !== t) {
|
|
4
4
|
if (t === "webgpu") {
|
|
5
5
|
const { registerWebGPUBackend: i } = await import("./patches/webgpu_base.js");
|
|
6
|
-
i(a), await import("./index-
|
|
6
|
+
i(a), await import("./index-DRyE072i.js"), await import("./ops/webgpu/index.js");
|
|
7
7
|
}
|
|
8
8
|
await e(t), await s(), console.log(`Backend set to ${t}`);
|
|
9
9
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { s as m, i as w,
|
|
2
|
-
import { d as y, f as M, h as T, c as b, e as D, a as L, b as x, g as W } from "./axis_util-
|
|
3
|
-
import { j as v, h as F, q as N } from "./index-
|
|
4
|
-
import { a as C, c as P } from "./concat_util-
|
|
5
|
-
import { S as z, a as
|
|
6
|
-
import { s as se } from "./slice_util-
|
|
7
|
-
import { a0 as ne, u as re, w as oe } from "./tensor_util-
|
|
8
|
-
import { c as ae, v as ie, a as ue } from "./scatter_nd_util-
|
|
1
|
+
import { s as m, i as w, K as I, a as d, z as A, q as _ } from "./tensor-CzmOBsdf.js";
|
|
2
|
+
import { d as y, f as M, h as T, c as b, e as D, a as L, b as x, g as W } from "./axis_util-BsIr9ZNu.js";
|
|
3
|
+
import { j as v, h as F, q as N } from "./index-D6Q1lPZO.js";
|
|
4
|
+
import { a as C, c as P } from "./concat_util-iBYIyuQe.js";
|
|
5
|
+
import { S as z, a as q, b as B, c as U, d as j, e as G, f as H, g as V, h as Z, i as k, j as K, k as J, l as X, m as Y, s as Q, n as ee, t as te } from "./selu_util-BGPXmd4B.js";
|
|
6
|
+
import { s as se } from "./slice_util-DyjSAD0u.js";
|
|
7
|
+
import { a0 as ne, u as re, w as oe } from "./tensor_util-DfwaWayG.js";
|
|
8
|
+
import { c as ae, v as ie, a as ue } from "./scatter_nd_util-C7zXRT_h.js";
|
|
9
9
|
import { a as le, c as pe, b as ce, e as he, d as fe, g as ge, m as de, s as me } from "./complex_util-Yc1A_gV1.js";
|
|
10
10
|
function Ee(e, t) {
|
|
11
11
|
const r = e.shape.length, s = t.shape.length;
|
|
@@ -213,22 +213,22 @@ function ze(e, t) {
|
|
|
213
213
|
s.push([]);
|
|
214
214
|
const o = [];
|
|
215
215
|
for (let a = 0; a < r.length; ++a) {
|
|
216
|
-
const u = r[a], p =
|
|
216
|
+
const u = r[a], p = Be(t, u);
|
|
217
217
|
for (const c of p)
|
|
218
218
|
o.indexOf(c) === -1 && (s[a].push(c), o.push(c));
|
|
219
219
|
}
|
|
220
220
|
return { path: r, steps: s };
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function qe(e) {
|
|
223
223
|
return e.every((t, r) => t === r);
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function Be(e, t) {
|
|
226
226
|
const r = [];
|
|
227
227
|
for (let s = 0; s < e.length; ++s)
|
|
228
228
|
(e[s].length === 0 || e[s].indexOf(t) !== -1 || t === -1) && r.push(s);
|
|
229
229
|
return r;
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function Ue(e, t, r = 0) {
|
|
232
232
|
let s = [];
|
|
233
233
|
if (typeof t == "number")
|
|
234
234
|
d(e.shape[r] % t === 0, () => "Number of splits must evenly divide the axis."), s = new Array(t).fill(e.shape[r] / t);
|
|
@@ -244,7 +244,7 @@ function je(e, t, r = 0) {
|
|
|
244
244
|
}
|
|
245
245
|
return s;
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function je(e) {
|
|
248
248
|
return `Received SparseTensor with denseShape[0] = 0 but
|
|
249
249
|
indices.shape[0] = ${e}`;
|
|
250
250
|
}
|
|
@@ -263,12 +263,12 @@ function Ze(e, t) {
|
|
|
263
263
|
function ke() {
|
|
264
264
|
return "reshape cannot infer the missing input size for an empty tensor unless all specified input sizes are non-zero";
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function Ke(e, t) {
|
|
267
267
|
const r = m(e), s = m(t);
|
|
268
268
|
return `Input to reshape is a SparseTensor with ${r}
|
|
269
269
|
dense values, but the requested shape requires a multiple of ${s}. inputShape=${e} outputShape= ${t}`;
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function Je(e, t) {
|
|
272
272
|
const r = m(e), s = m(t);
|
|
273
273
|
return `Input to reshape is a tensor with ${r} dense values, but the requested shape has ${s}. inputShape=${e} outputShape=${t}`;
|
|
274
274
|
}
|
|
@@ -349,8 +349,8 @@ const mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
349
349
|
return f;
|
|
350
350
|
},
|
|
351
351
|
SELU_SCALE: z,
|
|
352
|
-
SELU_SCALEALPHA:
|
|
353
|
-
applyActivation:
|
|
352
|
+
SELU_SCALEALPHA: q,
|
|
353
|
+
applyActivation: B,
|
|
354
354
|
assertAndGetBroadcastShape: v,
|
|
355
355
|
assertAxesAreInnerMostDims: y,
|
|
356
356
|
assertParamsConsistent: C,
|
|
@@ -358,12 +358,12 @@ const mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
358
358
|
axesAreInnerMostDims: M,
|
|
359
359
|
calculateShapes: ae,
|
|
360
360
|
checkEinsumDimSizes: Pe,
|
|
361
|
-
checkPadOnDimRoundingMode:
|
|
361
|
+
checkPadOnDimRoundingMode: U,
|
|
362
362
|
combineLocations: T,
|
|
363
363
|
combineRaggedTensorToTensorShapes: Ie,
|
|
364
364
|
complexWithEvenIndex: pe,
|
|
365
365
|
complexWithOddIndex: ce,
|
|
366
|
-
computeConv2DInfo:
|
|
366
|
+
computeConv2DInfo: j,
|
|
367
367
|
computeConv3DInfo: G,
|
|
368
368
|
computeDefaultPad: H,
|
|
369
369
|
computeDilation2DInfo: V,
|
|
@@ -372,9 +372,9 @@ const mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
372
372
|
computeOutShape: P,
|
|
373
373
|
computePool2DInfo: Z,
|
|
374
374
|
computePool3DInfo: k,
|
|
375
|
-
convertConv2DDataFormat:
|
|
375
|
+
convertConv2DDataFormat: K,
|
|
376
376
|
decodeEinsumEquation: Ne,
|
|
377
|
-
eitherStridesOrDilationsAreOne:
|
|
377
|
+
eitherStridesOrDilationsAreOne: J,
|
|
378
378
|
expandShapeToKeepDim: D,
|
|
379
379
|
exponent: he,
|
|
380
380
|
exponents: fe,
|
|
@@ -397,12 +397,12 @@ const mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
397
397
|
getRowPartitionTypesHelper: $e,
|
|
398
398
|
getSliceBeginCoords: Me,
|
|
399
399
|
getSliceSize: Te,
|
|
400
|
-
getSparseFillEmptyRowsIndicesDenseShapeMismatch:
|
|
400
|
+
getSparseFillEmptyRowsIndicesDenseShapeMismatch: je,
|
|
401
401
|
getSparseFillEmptyRowsNegativeIndexErrorMessage: Ge,
|
|
402
402
|
getSparseFillEmptyRowsOutOfRangeIndexErrorMessage: He,
|
|
403
403
|
getSparseReshapeEmptyTensorZeroOutputDimErrorMessage: ke,
|
|
404
|
-
getSparseReshapeInputOutputMismatchErrorMessage:
|
|
405
|
-
getSparseReshapeInputOutputMultipleErrorMessage:
|
|
404
|
+
getSparseReshapeInputOutputMismatchErrorMessage: Je,
|
|
405
|
+
getSparseReshapeInputOutputMultipleErrorMessage: Ke,
|
|
406
406
|
getSparseReshapeMultipleNegativeOneOutputDimErrorMessage: Ve,
|
|
407
407
|
getSparseReshapeNegativeOutputDimErrorMessage: Ze,
|
|
408
408
|
getSparseSegmentReductionIndicesOutOfRangeErrorMessage: et,
|
|
@@ -410,11 +410,11 @@ const mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
410
410
|
getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage: Ye,
|
|
411
411
|
getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage: Qe,
|
|
412
412
|
getUndoAxesPermutation: W,
|
|
413
|
-
isIdentityPermutation:
|
|
413
|
+
isIdentityPermutation: qe,
|
|
414
414
|
log: ne,
|
|
415
415
|
mergeRealAndImagArrays: de,
|
|
416
416
|
prepareAndValidate: Ee,
|
|
417
|
-
prepareSplitSize:
|
|
417
|
+
prepareSplitSize: Ue,
|
|
418
418
|
segment_util: rt,
|
|
419
419
|
shouldFuse: Q,
|
|
420
420
|
slice_util: se,
|
|
@@ -437,11 +437,11 @@ export {
|
|
|
437
437
|
Pe as G,
|
|
438
438
|
ze as H,
|
|
439
439
|
Ce as I,
|
|
440
|
-
|
|
440
|
+
qe as J,
|
|
441
441
|
Ee as K,
|
|
442
442
|
nt as L,
|
|
443
443
|
we as M,
|
|
444
|
-
|
|
444
|
+
Ue as N,
|
|
445
445
|
st as O,
|
|
446
446
|
tt as P,
|
|
447
447
|
f as R,
|
|
@@ -452,14 +452,14 @@ export {
|
|
|
452
452
|
at as e,
|
|
453
453
|
ot as f,
|
|
454
454
|
$e as g,
|
|
455
|
-
|
|
455
|
+
je as h,
|
|
456
456
|
Ge as i,
|
|
457
457
|
He as j,
|
|
458
458
|
Ve as k,
|
|
459
459
|
Ze as l,
|
|
460
460
|
ke as m,
|
|
461
|
-
|
|
462
|
-
|
|
461
|
+
Ke as n,
|
|
462
|
+
Je as o,
|
|
463
463
|
Xe as p,
|
|
464
464
|
Ye as q,
|
|
465
465
|
Qe as r,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { e as D, J as W } from "./index-
|
|
2
|
-
import { e as g, a as _,
|
|
3
|
-
import { m as J, f as ee, P as te } from "./webgpu_program-
|
|
4
|
-
import { i as se, G as N } from "./webgpu_util-
|
|
5
|
-
import { K as re, J as ne } from "./tensor_util-
|
|
1
|
+
import { e as D, J as W } from "./index-D6Q1lPZO.js";
|
|
2
|
+
import { e as g, a as _, y as O, s as x, z as $, A as F, B as K, o as Z, q as j, g as X, i as q } from "./tensor-CzmOBsdf.js";
|
|
3
|
+
import { m as J, f as ee, P as te } from "./webgpu_program-DzaQiqel.js";
|
|
4
|
+
import { i as se, G as N } from "./webgpu_util-0_ubCEHJ.js";
|
|
5
|
+
import { K as re, J as ne } from "./tensor_util-DfwaWayG.js";
|
|
6
6
|
import { m as k } from "./complex_util-Yc1A_gV1.js";
|
|
7
7
|
const l = g();
|
|
8
8
|
l.registerFlag("WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE", () => 15);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as f, B as h, D as p, E as m } from "./index-
|
|
2
|
-
import { T as g } from "./tensor_util-
|
|
3
|
-
import { d as u } from "./tensor-
|
|
4
|
-
import { r as T } from "./reshape-
|
|
1
|
+
import { A as f, B as h, D as p, E as m } from "./index-D6Q1lPZO.js";
|
|
2
|
+
import { T as g } from "./tensor_util-DfwaWayG.js";
|
|
3
|
+
import { d as u } from "./tensor-CzmOBsdf.js";
|
|
4
|
+
import { r as T } from "./reshape-CaPQzFvz.js";
|
|
5
5
|
function b(e, o) {
|
|
6
6
|
let r = h(e, "broadcastTo", "x");
|
|
7
7
|
const a = r.shape;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { s as i, e } from "../index-
|
|
2
|
-
import { t } from "../tensor4d-
|
|
3
|
-
import { t as a } from "../tensor2d-
|
|
1
|
+
import { s as i, e } from "../index-D6Q1lPZO.js";
|
|
2
|
+
import { t } from "../tensor4d-D7bLqGqz.js";
|
|
3
|
+
import { t as a } from "../tensor2d-CSB4KOb0.js";
|
|
4
4
|
async function k(n) {
|
|
5
5
|
await i(n);
|
|
6
6
|
const s = t(
|
package/dist/checks/gelu.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as e, e as o } from "../index-
|
|
2
|
-
import { t as s } from "../tensor2d-
|
|
1
|
+
import { s as e, e as o } from "../index-D6Q1lPZO.js";
|
|
2
|
+
import { t as s } from "../tensor2d-CSB4KOb0.js";
|
|
3
3
|
async function m(t) {
|
|
4
4
|
await e(t);
|
|
5
5
|
const r = s(
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { s as n, e as s } from "../index-
|
|
2
|
-
import "../random_width-
|
|
3
|
-
import "../register_all_kernels-
|
|
1
|
+
import { s as n, e as s } from "../index-D6Q1lPZO.js";
|
|
2
|
+
import "../random_width-BVV9HveY.js";
|
|
3
|
+
import "../register_all_kernels-nvj2k7OC.js";
|
|
4
4
|
import "../index-Cp39cXWe.js";
|
|
5
|
-
import "../dataset-
|
|
6
|
-
import { t as e } from "../tensor2d-
|
|
5
|
+
import "../dataset-D2P7rHAw.js";
|
|
6
|
+
import { t as e } from "../tensor2d-CSB4KOb0.js";
|
|
7
7
|
async function f(t) {
|
|
8
8
|
await n(t);
|
|
9
9
|
const r = e(
|
package/dist/checks/normRMS.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as i, u as A, e as y } from "../index-
|
|
2
|
-
import { a as h } from "../ops-
|
|
3
|
-
import { t as p } from "../tensor1d-
|
|
4
|
-
import { t as a } from "../tensor-
|
|
1
|
+
import { s as i, u as A, e as y } from "../index-D6Q1lPZO.js";
|
|
2
|
+
import { a as h } from "../ops-BFDtP6th.js";
|
|
3
|
+
import { t as p } from "../tensor1d-BlUT89BP.js";
|
|
4
|
+
import { t as a } from "../tensor-0r5yOo2R.js";
|
|
5
5
|
const w = Array.from({ length: 2048 * 192 }, () => Math.random()), x = Array.from({ length: 192 }, () => Math.random()), M = Array.from({ length: 2048 * 192 }, () => Math.random());
|
|
6
6
|
async function k(t) {
|
|
7
7
|
await i(t);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { s as c, e as d } from "../index-
|
|
2
|
-
import { t as f } from "../tensor1d-
|
|
3
|
-
import { t as r } from "../tensor-
|
|
1
|
+
import { s as c, e as d } from "../index-D6Q1lPZO.js";
|
|
2
|
+
import { t as f } from "../tensor1d-BlUT89BP.js";
|
|
3
|
+
import { t as r } from "../tensor-0r5yOo2R.js";
|
|
4
4
|
const y = Array.from({ length: 2048 * 192 }, () => Math.random()), i = Array.from({ length: 192 }, () => Math.random()), l = Array.from({ length: 2048 * 192 }, () => Math.random());
|
|
5
5
|
async function x(t) {
|
|
6
6
|
await c(t);
|
package/dist/checks/qkv.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { x as i, y as u, s as c, e as l } from "../index-
|
|
2
|
-
import { c as m } from "../tensor-
|
|
3
|
-
import { t as f } from "../tensor2d-
|
|
1
|
+
import { x as i, y as u, s as c, e as l } from "../index-D6Q1lPZO.js";
|
|
2
|
+
import { c as m } from "../tensor-CzmOBsdf.js";
|
|
3
|
+
import { t as f } from "../tensor2d-CSB4KOb0.js";
|
|
4
4
|
function h(t, e, n) {
|
|
5
5
|
if (m(t), e != null && e.length !== 3)
|
|
6
6
|
throw new Error("tensor3d() requires shape to have three numbers");
|
package/dist/checks/rope.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import t from "../layers/RoPECache.js";
|
|
2
|
-
import { s as c, e as i } from "../index-
|
|
3
|
-
import { t as p } from "../tensor4d-
|
|
2
|
+
import { s as c, e as i } from "../index-D6Q1lPZO.js";
|
|
3
|
+
import { t as p } from "../tensor4d-D7bLqGqz.js";
|
|
4
4
|
async function y(a) {
|
|
5
5
|
await c(a);
|
|
6
6
|
const o = p(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as r, B as o, E as t } from "./index-
|
|
2
|
-
import { h as c } from "./tensor_util-
|
|
3
|
-
import { j as n } from "./tensor-
|
|
1
|
+
import { A as r, B as o, E as t } from "./index-D6Q1lPZO.js";
|
|
2
|
+
import { h as c } from "./tensor_util-DfwaWayG.js";
|
|
3
|
+
import { j as n } from "./tensor-CzmOBsdf.js";
|
|
4
4
|
function l(s, m) {
|
|
5
5
|
const a = o(s, "real", "complex"), e = o(m, "imag", "complex");
|
|
6
6
|
n(a.shape, e.shape, `real and imag shapes, ${a.shape} and ${e.shape}, must match in call to tf.complex().`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as c, C as s, D as p, E as i } from "./index-
|
|
2
|
-
import { C as m } from "./tensor_util-
|
|
3
|
-
import { a as f } from "./tensor-
|
|
1
|
+
import { A as c, C as s, D as p, E as i } from "./index-D6Q1lPZO.js";
|
|
2
|
+
import { C as m } from "./tensor_util-DfwaWayG.js";
|
|
3
|
+
import { a as f } from "./tensor-CzmOBsdf.js";
|
|
4
4
|
function l(o, r = 0) {
|
|
5
5
|
f(o.length >= 1, () => "Pass at least one tensor to concat");
|
|
6
6
|
const t = s(o, "tensors", "concat", "string_or_numeric");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { d as v, t as y } from "./index-
|
|
1
|
+
import { d as v, t as y } from "./index-D6Q1lPZO.js";
|
|
2
2
|
import { s as g } from "./index-CieiGp4Y.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as o, O as p } from "./tensor_util-
|
|
5
|
-
import { s as $ } from "./stack-
|
|
6
|
-
import { t as B } from "./tensor-
|
|
3
|
+
import { C as S, T as h, e as N, v as R, a as k } from "./tensor-CzmOBsdf.js";
|
|
4
|
+
import { t as o, O as p } from "./tensor_util-DfwaWayG.js";
|
|
5
|
+
import { s as $ } from "./stack-ChnHwRpX.js";
|
|
6
|
+
import { t as B } from "./tensor-0r5yOo2R.js";
|
|
7
7
|
function _(r, t) {
|
|
8
8
|
return b(r, t);
|
|
9
9
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as h, b as m, a as u, T as p } from "./tensor-
|
|
2
|
-
import { A as l, B as c, E as g, J as f, l as V, n as v, m as N } from "./index-
|
|
3
|
-
import { Q as w } from "./tensor_util-
|
|
1
|
+
import { d as h, b as m, a as u, T as p } from "./tensor-CzmOBsdf.js";
|
|
2
|
+
import { A as l, B as c, E as g, J as f, l as V, n as v, m as N } from "./index-D6Q1lPZO.js";
|
|
3
|
+
import { Q as w } from "./tensor_util-DfwaWayG.js";
|
|
4
4
|
import { s as d } from "./index-CieiGp4Y.js";
|
|
5
5
|
function b(e) {
|
|
6
6
|
const r = { x: c(e, "x", "floor", "float32") };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as e, B as a, E as i } from "./index-
|
|
2
|
-
import { E as m } from "./tensor_util-
|
|
3
|
-
import { a as p } from "./tensor-
|
|
1
|
+
import { A as e, B as a, E as i } from "./index-D6Q1lPZO.js";
|
|
2
|
+
import { E as m } from "./tensor_util-DfwaWayG.js";
|
|
3
|
+
import { a as p } from "./tensor-CzmOBsdf.js";
|
|
4
4
|
function c(r, n = 0) {
|
|
5
5
|
const s = a(r, "x", "expandDims", "string_or_numeric");
|
|
6
6
|
p(n <= s.rank, () => "Axis must be <= rank of the tensor");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as g, B as t, E as h } from "./index-
|
|
2
|
-
import { G as p } from "./tensor_util-
|
|
1
|
+
import { A as g, B as t, E as h } from "./index-D6Q1lPZO.js";
|
|
2
|
+
import { G as p } from "./tensor_util-DfwaWayG.js";
|
|
3
3
|
function m(n, r, s = 0, o = 0) {
|
|
4
4
|
const e = t(n, "x", "gather"), a = t(r, "indices", "gather", "int32"), i = { x: e, indices: a }, c = { axis: s, batchDims: o };
|
|
5
5
|
return h.runKernel(p, i, c);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { e as n } from "./index-
|
|
1
|
+
import { e as n } from "./index-D6Q1lPZO.js";
|
|
2
2
|
import "./ops/cpu/gelu.js";
|
|
3
3
|
import "./ops/webgl/gelu.js";
|
|
4
|
-
import { a as u } from "./tensor_util-
|
|
4
|
+
import { a as u } from "./tensor_util-DfwaWayG.js";
|
|
5
5
|
const o = {
|
|
6
6
|
kernelName: "Gelu",
|
|
7
7
|
inputsToSave: ["x"],
|