@genai-fi/nanogpt 1.4.1 → 1.6.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.
Files changed (341) hide show
  1. package/dist/{DatasetBuilder-DU1G1OKX.js → DatasetBuilder-DRDW8tcM.js} +85 -86
  2. package/dist/Generator-BcR_14Cj.js +316 -0
  3. package/dist/{RealDiv-CSnvtN2E.js → RealDiv-Cl8k3YTx.js} +54 -62
  4. package/dist/{Reshape-BlylqwWy.js → Reshape-CKxKPKqi.js} +9 -12
  5. package/dist/Reshape-H5zZRgr9.js +16 -0
  6. package/dist/RoPECache-dYscFINl.js +722 -0
  7. package/dist/TeachableLLM.js +29 -34
  8. package/dist/api/beamer.d.ts +1 -0
  9. package/dist/api/beamer.js +19 -10
  10. package/dist/api/responses.js +11 -12
  11. package/dist/api/training.js +12 -14
  12. package/dist/axis_util-rF9RnwKE.js +37 -0
  13. package/dist/backend.js +5 -6
  14. package/dist/{backend_util-DAV0I34P.js → backend_util-Cpp0Gwlp.js} +180 -185
  15. package/dist/{binary_op_util-CrYk9LXL.js → binary_op_util-WY9YIl0q.js} +3 -7
  16. package/dist/broadcast_to-CGvLNiQ0.js +20 -0
  17. package/dist/checks/appendCache.js +7 -7
  18. package/dist/checks/attentionMask.js +9 -8
  19. package/dist/checks/check.js +1 -2
  20. package/dist/checks/gelu.js +6 -6
  21. package/dist/checks/index.js +24 -25
  22. package/dist/checks/matMulGelu.js +7 -7
  23. package/dist/checks/normRMS.js +14 -12
  24. package/dist/checks/normRMSGrad.js +9 -8
  25. package/dist/checks/packUnpack.js +7 -7
  26. package/dist/checks/qkv.js +1 -34
  27. package/dist/checks/rope.js +6 -6
  28. package/dist/checks/weights.js +1 -2
  29. package/dist/clip_by_value-D-UX9am5.js +13 -0
  30. package/dist/complex-Cl904TqN.js +13 -0
  31. package/dist/{complex_util-CkazZsaH.js → complex_util-BBlPAm-s.js} +1 -2
  32. package/dist/concat-Oip5acVY.js +14 -0
  33. package/dist/{concat_util-CWzvQQlK.js → concat_util-CY45Hf4F.js} +2 -3
  34. package/dist/data/docx.js +3 -4
  35. package/dist/data/pdf.js +11 -14
  36. package/dist/data/stream.js +1 -2
  37. package/dist/data/textLoader.js +16 -15
  38. package/dist/data-CV_i_H6B.js +11 -0
  39. package/dist/data.js +5 -12
  40. package/dist/dist-CMMLi-qO.js +2675 -0
  41. package/dist/{dist-BGVm64AY.js → dist-DeVH1nGn.js} +1465 -1573
  42. package/dist/{dist-CwK5S7Ls.js → dist-DyL7qSLJ.js} +2664 -2400
  43. package/dist/dropout16-CA31Ud5a.js +20 -0
  44. package/dist/dropout_util-SiFMbFXz.js +22 -0
  45. package/dist/{eventemitter3-D_qV3Lof.js → eventemitter3-wmfmOP_f.js} +2 -3
  46. package/dist/expand_dims-Dh3Fulyn.js +10 -0
  47. package/dist/floor-BwjmUb7X.js +8 -0
  48. package/dist/gather-B5Z1RFt5.js +14 -0
  49. package/dist/gatherSub-CRUfUzBa.js +22 -0
  50. package/dist/gelu-Xx9-ohH9.js +25 -0
  51. package/dist/{gpgpu_math-20tPK8LM.js → gpgpu_math-48m8q3jI.js} +265 -286
  52. package/dist/inference/Beamer.d.ts +14 -2
  53. package/dist/inference/Beamer.js +170 -105
  54. package/dist/inference/Generator.js +1 -259
  55. package/dist/inference/tokenisePrompt.d.ts +2 -1
  56. package/dist/inference/tokenisePrompt.js +15 -11
  57. package/dist/inference/types.d.ts +7 -0
  58. package/dist/inference/utilities.js +1 -2
  59. package/dist/{jszip.min-DKa1Rjyn.js → jszip.min-Btv48m44.js} +68 -64
  60. package/dist/{kernel_funcs_utils-ql8Y8qPn.js → kernel_funcs_utils-BYRpSfV_.js} +39 -42
  61. package/dist/layers/BaseLayer.js +9 -10
  62. package/dist/layers/{CausalSelfAttention.d.ts → GQA.d.ts} +8 -3
  63. package/dist/layers/GQA.js +102 -0
  64. package/dist/layers/HeadLayer.d.ts +12 -0
  65. package/dist/layers/HeadLayer.js +28 -0
  66. package/dist/layers/LoRA.js +17 -20
  67. package/dist/layers/MHA.d.ts +43 -0
  68. package/dist/layers/MHA.js +102 -0
  69. package/dist/layers/MLP.d.ts +5 -1
  70. package/dist/layers/MLP.js +33 -20
  71. package/dist/layers/PositionEmbedding.js +14 -13
  72. package/dist/layers/RMSNorm.d.ts +2 -0
  73. package/dist/layers/RMSNorm.js +16 -11
  74. package/dist/layers/RoPECache.js +1 -337
  75. package/dist/layers/TiedEmbedding.js +15 -14
  76. package/dist/layers/TransformerBlock.d.ts +4 -10
  77. package/dist/layers/TransformerBlock.js +29 -30
  78. package/dist/layers/WeightStore.js +4 -5
  79. package/dist/layers-CFqEip3s.js +13 -0
  80. package/dist/layers.d.ts +1 -1
  81. package/dist/layers.js +4 -12
  82. package/dist/loader/load.js +27 -24
  83. package/dist/loader/loadHF.js +3 -3
  84. package/dist/loader/loadTransformers.js +22 -7
  85. package/dist/loader/loadZipMeta.js +1 -2
  86. package/dist/loader/newZipLoad.js +1 -2
  87. package/dist/loader/oldZipLoad.js +8 -9
  88. package/dist/loader/save.js +31 -17
  89. package/dist/loader/types.d.ts +8 -2
  90. package/dist/main.js +3281 -3463
  91. package/dist/matMul16-tE26fnhf.js +87 -0
  92. package/dist/{matMulGelu-CBoqTZM7.js → matMulGelu-ASUWlKqu.js} +33 -33
  93. package/dist/mat_mul-R9_DWmIT.js +16 -0
  94. package/dist/models/Llama.d.ts +16 -0
  95. package/dist/models/Llama.js +88 -0
  96. package/dist/models/NanoGPTV1.js +53 -54
  97. package/dist/models/NanoGPTV2.js +48 -49
  98. package/dist/models/Qwen3.d.ts +16 -0
  99. package/dist/models/Qwen3.js +88 -0
  100. package/dist/models/config.d.ts +18 -1
  101. package/dist/models/config.js +3 -8
  102. package/dist/models/factory.js +14 -11
  103. package/dist/models/model.d.ts +5 -7
  104. package/dist/models/model.js +1 -2
  105. package/dist/models-DyBpJJwM.js +13 -0
  106. package/dist/models.js +6 -14
  107. package/dist/mul16-C7sqgqik.js +41 -0
  108. package/dist/non_max_suppression_impl-B0H318rb.js +72 -0
  109. package/dist/not_equal-Bu3O8rh_.js +67 -0
  110. package/dist/one_hot-TEMPumJj.js +14 -0
  111. package/dist/ones-DpPXWa6A.js +13 -0
  112. package/dist/ops/adamAdjust.js +2 -3
  113. package/dist/ops/adamMoments.js +2 -3
  114. package/dist/ops/add16.js +2 -3
  115. package/dist/ops/appendCache.js +9 -8
  116. package/dist/ops/attentionMask.d.ts +1 -1
  117. package/dist/ops/attentionMask.js +8 -5
  118. package/dist/ops/concat16.js +5 -5
  119. package/dist/ops/cpu/adamAdjust.js +7 -8
  120. package/dist/ops/cpu/adamMoments.js +5 -5
  121. package/dist/ops/cpu/appendCache.js +3 -3
  122. package/dist/ops/cpu/attentionMask.js +12 -8
  123. package/dist/ops/cpu/fusedSoftmax.js +3 -3
  124. package/dist/ops/cpu/gatherSub.js +1 -12
  125. package/dist/ops/cpu/gelu.js +12 -13
  126. package/dist/ops/cpu/matMul16.js +7 -7
  127. package/dist/ops/cpu/matMulGelu.js +21 -18
  128. package/dist/ops/cpu/matMulMul.js +8 -9
  129. package/dist/ops/cpu/mulDropout.js +8 -9
  130. package/dist/ops/cpu/normRMS.js +12 -13
  131. package/dist/ops/cpu/qkv.js +14 -13
  132. package/dist/ops/cpu/rope.js +11 -8
  133. package/dist/ops/cpu/scatterSub.js +1 -12
  134. package/dist/ops/dot16.js +16 -17
  135. package/dist/ops/dropout.js +9 -8
  136. package/dist/ops/dropout16.js +1 -22
  137. package/dist/ops/gatherSub.js +3 -4
  138. package/dist/ops/gelu.js +1 -2
  139. package/dist/ops/globalNorm.js +14 -14
  140. package/dist/ops/grads/add16.js +16 -17
  141. package/dist/ops/grads/attentionMask.js +6 -7
  142. package/dist/ops/grads/dropout16.js +1 -1
  143. package/dist/ops/grads/gelu.js +1 -2
  144. package/dist/ops/grads/matMul16.js +1 -2
  145. package/dist/ops/grads/matMulGelu.js +6 -7
  146. package/dist/ops/grads/mul16.js +1 -1
  147. package/dist/ops/grads/normRMS.js +8 -9
  148. package/dist/ops/grads/pack16.js +1 -2
  149. package/dist/ops/grads/qkv.js +10 -10
  150. package/dist/ops/grads/rope.js +1 -2
  151. package/dist/ops/grads/silu.d.ts +2 -0
  152. package/dist/ops/grads/silu.js +1 -0
  153. package/dist/ops/grads/softmax16.js +6 -7
  154. package/dist/ops/grads/unpack16.js +1 -2
  155. package/dist/ops/grads/utils.js +1 -2
  156. package/dist/ops/matMul16.d.ts +2 -2
  157. package/dist/ops/matMul16.js +1 -2
  158. package/dist/ops/matMulGelu.js +3 -4
  159. package/dist/ops/matMulMul.js +2 -3
  160. package/dist/ops/mul16.js +1 -43
  161. package/dist/ops/mulDrop.js +2 -3
  162. package/dist/ops/normRMS.d.ts +1 -1
  163. package/dist/ops/normRMS.js +10 -11
  164. package/dist/ops/pack16.js +1 -2
  165. package/dist/ops/qkv.js +2 -3
  166. package/dist/ops/reshape16.js +11 -11
  167. package/dist/ops/rope.d.ts +1 -1
  168. package/dist/ops/rope.js +1 -2
  169. package/dist/ops/scatterSub.js +3 -4
  170. package/dist/ops/silu.d.ts +3 -0
  171. package/dist/ops/silu.js +1 -0
  172. package/dist/ops/slice16.js +5 -5
  173. package/dist/ops/softmax16.js +3 -4
  174. package/dist/ops/sub16.js +3 -4
  175. package/dist/ops/sum16.js +3 -3
  176. package/dist/ops/transpose16.js +16 -15
  177. package/dist/ops/unpack16.js +1 -2
  178. package/dist/ops/webgl/adamAdjust.js +8 -9
  179. package/dist/ops/webgl/adamMoments.js +2 -3
  180. package/dist/ops/webgl/appendCache.js +2 -3
  181. package/dist/ops/webgl/attentionMask.js +2 -3
  182. package/dist/ops/webgl/dropout16.js +2 -3
  183. package/dist/ops/webgl/fusedSoftmax.js +13 -13
  184. package/dist/ops/webgl/gatherSub.js +2 -3
  185. package/dist/ops/webgl/gelu.js +11 -12
  186. package/dist/ops/webgl/log.js +10 -10
  187. package/dist/ops/webgl/matMul16.js +31 -24
  188. package/dist/ops/webgl/matMulGelu.js +1 -2
  189. package/dist/ops/webgl/matMulMul.js +3 -4
  190. package/dist/ops/webgl/mulDropout.js +2 -3
  191. package/dist/ops/webgl/normRMS.js +11 -10
  192. package/dist/ops/webgl/qkv.js +2 -3
  193. package/dist/ops/webgl/rope.js +10 -9
  194. package/dist/ops/webgl/scatterSub.js +2 -3
  195. package/dist/ops/webgpu/adamAdjust.js +13 -14
  196. package/dist/ops/webgpu/adamMoments.js +13 -14
  197. package/dist/ops/webgpu/add16.js +3 -4
  198. package/dist/ops/webgpu/appendCache.js +20 -21
  199. package/dist/ops/webgpu/attentionMask.js +18 -19
  200. package/dist/ops/webgpu/attentionMask32_program.js +7 -8
  201. package/dist/ops/webgpu/clipScale.js +11 -12
  202. package/dist/ops/webgpu/concat16.js +17 -18
  203. package/dist/ops/webgpu/dropout16.js +6 -7
  204. package/dist/ops/webgpu/gatherSub.js +11 -12
  205. package/dist/ops/webgpu/gelu.js +10 -11
  206. package/dist/ops/webgpu/index.js +17 -16
  207. package/dist/ops/webgpu/matMul16.js +74 -57
  208. package/dist/ops/webgpu/matMul16_program.d.ts +4 -3
  209. package/dist/ops/webgpu/matMul16_program.js +30 -22
  210. package/dist/ops/webgpu/mul16.js +3 -4
  211. package/dist/ops/webgpu/norm2.js +9 -10
  212. package/dist/ops/webgpu/normRMS.js +13 -14
  213. package/dist/ops/webgpu/normRMS16_program.d.ts +2 -1
  214. package/dist/ops/webgpu/normRMS16_program.js +5 -5
  215. package/dist/ops/webgpu/normRMS32_program.d.ts +2 -1
  216. package/dist/ops/webgpu/normRMS32_program.js +5 -5
  217. package/dist/ops/webgpu/normRMSGrad.js +30 -30
  218. package/dist/ops/webgpu/pack16.js +2 -3
  219. package/dist/ops/webgpu/pack16_program.js +3 -4
  220. package/dist/ops/webgpu/qkv.js +10 -11
  221. package/dist/ops/webgpu/rope.js +113 -49
  222. package/dist/ops/webgpu/scatterSub.js +12 -13
  223. package/dist/ops/webgpu/silu.d.ts +14 -0
  224. package/dist/ops/webgpu/silu.js +117 -0
  225. package/dist/ops/webgpu/slice16.js +17 -18
  226. package/dist/ops/webgpu/softmax16.js +9 -9
  227. package/dist/ops/webgpu/softmax16_program.js +9 -10
  228. package/dist/ops/webgpu/softmax16_subgroup_program.js +11 -12
  229. package/dist/ops/webgpu/softmax16grad.js +8 -9
  230. package/dist/ops/webgpu/sub16.js +3 -4
  231. package/dist/ops/webgpu/sum16.js +16 -15
  232. package/dist/ops/webgpu/transpose16.js +13 -12
  233. package/dist/ops/webgpu/transpose16_program.js +3 -4
  234. package/dist/ops/webgpu/transpose16_shared_program.js +17 -18
  235. package/dist/ops/webgpu/unpack16.js +8 -9
  236. package/dist/ops/webgpu/utils/binary_op.js +20 -21
  237. package/dist/ops/webgpu/utils/deviceInfo.js +1 -2
  238. package/dist/ops/webgpu/utils/reductions.js +21 -20
  239. package/dist/ops-Be5ACU5R.js +13 -0
  240. package/dist/ops-C1UpdEYM.js +509 -0
  241. package/dist/{pack16-BhuXNUS7.js → pack16-BHO4t1-M.js} +14 -17
  242. package/dist/pad-Dy-1IP3A.js +13 -0
  243. package/dist/patches/webgpu_backend.js +18 -19
  244. package/dist/patches/webgpu_base.js +2 -3
  245. package/dist/patches/webgpu_program.js +21 -22
  246. package/dist/{pdf-Bzuk68Vy.js → pdf-CbnQ75VG.js} +380 -701
  247. package/dist/{picomatch-BO4HbNfo.js → picomatch--TW6gyBJ.js} +229 -291
  248. package/dist/qkv-BQfNPucX.js +42 -0
  249. package/dist/rand_util-_vCY93Uw.js +44 -0
  250. package/dist/random_normal-DUIT8kyC.js +11 -0
  251. package/dist/range-CYvQC3fW.js +13 -0
  252. package/dist/relu-C4XULT8A.js +8 -0
  253. package/dist/reshape-DJb1jgMt.js +8 -0
  254. package/dist/resize_nearest_neighbor-DAqcTYUe.js +188 -0
  255. package/dist/{chunk-CWhphoD1.js → rolldown-runtime-CwxnZyOB.js} +4 -5
  256. package/dist/rope-JjBVufF_.js +24 -0
  257. package/dist/scatterSub-BOnqk-uY.js +27 -0
  258. package/dist/scatter_nd_util-BepMCpLY.js +34 -0
  259. package/dist/seedrandom-SHEGFK6H.js +282 -0
  260. package/dist/selu_util-DeOTf-sc.js +27 -0
  261. package/dist/shared-BIDMUBCs.js +1864 -0
  262. package/dist/{shared-CfTzpULd.js → shared-CX_iPI5K.js} +2 -3
  263. package/dist/silu-DsAE2cJ5.js +23 -0
  264. package/dist/slice-Dlb1FlzG.js +13 -0
  265. package/dist/{slice_util-Dve4TkDn.js → slice_util-BVgPRoij.js} +3 -4
  266. package/dist/softmax-Dpav_dWw.js +10 -0
  267. package/dist/split-DYnT8chz.js +11 -0
  268. package/dist/squeeze-B3XYGAlg.js +9 -0
  269. package/dist/stack-Dbbt9mIk.js +10 -0
  270. package/dist/step-DA-5DNu9.js +348 -0
  271. package/dist/{stream-BpAwcvHz.js → stream-BBe2apn4.js} +68 -88
  272. package/dist/sum-C8qNbFNp.js +13 -0
  273. package/dist/tensor-ALxWZfmz.js +7 -0
  274. package/dist/tensor1d-BHgkkhTE.js +9 -0
  275. package/dist/tensor2d-ARItvqVn.js +10 -0
  276. package/dist/tensor4d-D1zRBipJ.js +10 -0
  277. package/dist/tfjs_backend-CsXOum0h.js +685 -0
  278. package/dist/tile-DfyQ0KX-.js +10 -0
  279. package/dist/tokenise-DbS2Ea-T.js +14 -0
  280. package/dist/tokenise.js +6 -15
  281. package/dist/tokeniser/BaseTokeniser.js +5 -9
  282. package/dist/tokeniser/CharTokeniser.js +1 -2
  283. package/dist/tokeniser/bpe.js +19 -20
  284. package/dist/topk-BrU2pkrR.js +19 -0
  285. package/dist/training/AdamW.js +35 -31
  286. package/dist/training/BasicTrainer.js +56 -56
  287. package/dist/training/DatasetBuilder.js +1 -2
  288. package/dist/training/Evaluator.js +8 -5
  289. package/dist/training/LRScheduler.js +1 -2
  290. package/dist/training/PreTrainer.js +7 -8
  291. package/dist/training/SFTTrainer.js +7 -8
  292. package/dist/training/configure.js +16 -15
  293. package/dist/training/factory.js +1 -2
  294. package/dist/training/loss.js +1 -2
  295. package/dist/training/orthoGrad.js +2 -3
  296. package/dist/training/prepareData.js +18 -17
  297. package/dist/training/sparseCrossEntropy.js +38 -32
  298. package/dist/training/tasks/TokenStore.js +21 -22
  299. package/dist/training/tasks/tokenStream.js +1 -2
  300. package/dist/training/validateOptions.js +1 -2
  301. package/dist/training/validation.js +1 -2
  302. package/dist/transpose-BC-M_OoT.js +34 -0
  303. package/dist/unsorted_segment_sum-BelC7R-q.js +408 -0
  304. package/dist/utilities/arrayClose.js +5 -4
  305. package/dist/utilities/arrayShape.js +1 -2
  306. package/dist/utilities/datasetID.js +1 -2
  307. package/dist/utilities/dummy.js +15 -15
  308. package/dist/utilities/float16.js +10 -10
  309. package/dist/utilities/maxHeap.d.ts +16 -0
  310. package/dist/utilities/maxHeap.js +54 -0
  311. package/dist/utilities/multinomialCPU.d.ts +1 -2
  312. package/dist/utilities/multinomialCPU.js +6 -8
  313. package/dist/utilities/packed.js +2 -3
  314. package/dist/utilities/parameters.js +34 -19
  315. package/dist/utilities/performance.js +2 -3
  316. package/dist/utilities/profile.js +3 -4
  317. package/dist/utilities/random.js +1 -2
  318. package/dist/utilities/safetensors.js +14 -14
  319. package/dist/utilities/sentences.js +16 -13
  320. package/dist/utilities/tokenParse.js +1 -2
  321. package/dist/utilities/tokens.js +5 -6
  322. package/dist/utilities/topP.d.ts +1 -0
  323. package/dist/utilities/topP.js +20 -13
  324. package/dist/utilities/waitForModel.js +1 -2
  325. package/dist/utilities/weights.js +4 -4
  326. package/dist/utilities/yielder.js +1 -2
  327. package/dist/{v4-BK7K-jy_.js → v4-YCkfo8OR.js} +4 -7
  328. package/dist/{webgpu-IAn9VotJ.js → webgpu-BHX-uBym.js} +156 -163
  329. package/dist/{webgpu_program-B0PokuRJ.js → webgpu_program-DvkFqRlR.js} +28 -29
  330. package/dist/{webgpu_util-DfODg6XI.js → webgpu_util-5QTyovaf.js} +2 -3
  331. package/dist/zeros-hxKGkRfl.js +12 -0
  332. package/package.json +3 -3
  333. package/dist/Reshape-CwxdaU8n.js +0 -17
  334. package/dist/dist-Da20xy8E.js +0 -6375
  335. package/dist/gelu-B6637MKa.js +0 -27
  336. package/dist/layers/CausalSelfAttention.js +0 -99
  337. package/dist/matMul16-DGtlziMn.js +0 -81
  338. package/dist/rope-C8EAiSGY.js +0 -25
  339. package/dist/selu_util-B_AFEfoz.js +0 -24
  340. package/dist/shared-24EoeHJl.js +0 -1314
  341. package/dist/tfjs_backend-h5weiy1O.js +0 -614
@@ -1,8 +1,10 @@
1
- import { I as e, P as t, ii as n, ui as r } from "../dist-Da20xy8E.js";
2
- //#region lib/checks/attentionMask.ts
1
+ import { H as e, J as t } from "../dist-CMMLi-qO.js";
2
+ import { t as n } from "../tensor2d-ARItvqVn.js";
3
+ import { t as r } from "../tensor4d-D1zRBipJ.js";
4
+ // lib/checks/attentionMask.ts
3
5
  async function i(i) {
4
- await r(i);
5
- let a = t([[[[
6
+ await t(i);
7
+ let a = r([[[[
6
8
  .1,
7
9
  .2,
8
10
  .3,
@@ -17,7 +19,7 @@ async function i(i) {
17
19
  1,
18
20
  2,
19
21
  4
20
- ]), o = t([[[[
22
+ ]), o = r([[[[
21
23
  .5,
22
24
  .6,
23
25
  .5,
@@ -32,7 +34,7 @@ async function i(i) {
32
34
  1,
33
35
  2,
34
36
  4
35
- ]), s = e([[
37
+ ]), s = n([[
36
38
  0,
37
39
  -Infinity,
38
40
  -Infinity,
@@ -43,7 +45,7 @@ async function i(i) {
43
45
  0,
44
46
  -Infinity
45
47
  ]], [2, 4]);
46
- return await n().runKernel("AttentionMask", {
48
+ return await e().runKernel("AttentionMask", {
47
49
  q: a,
48
50
  k: o,
49
51
  mask: s
@@ -52,5 +54,4 @@ async function i(i) {
52
54
  pastLen: 0
53
55
  }).array();
54
56
  }
55
- //#endregion
56
57
  export { i as execute };
@@ -1,5 +1,5 @@
1
1
  import { arraysClose as e } from "../utilities/arrayClose.js";
2
- //#region lib/checks/check.ts
2
+ // lib/checks/check.ts
3
3
  async function t(t, n, r) {
4
4
  let i = r ?? [
5
5
  "cpu",
@@ -28,5 +28,4 @@ async function t(t, n, r) {
28
28
  }
29
29
  return o;
30
30
  }
31
- //#endregion
32
31
  export { t as default };
@@ -1,8 +1,9 @@
1
- import { I as e, ii as t, ui as n } from "../dist-Da20xy8E.js";
2
- //#region lib/checks/gelu.ts
1
+ import { H as e, J as t } from "../dist-CMMLi-qO.js";
2
+ import { t as n } from "../tensor2d-ARItvqVn.js";
3
+ // lib/checks/gelu.ts
3
4
  async function r(r) {
4
- await n(r);
5
- let i = e([
5
+ await t(r);
6
+ let i = n([
6
7
  [
7
8
  .1,
8
9
  .2,
@@ -40,7 +41,6 @@ async function r(r) {
40
41
  0
41
42
  ]
42
43
  ], [4, 7]);
43
- return await t().runKernel("Gelu", { x: i }).array();
44
+ return await e().runKernel("Gelu", { x: i }).array();
44
45
  }
45
- //#endregion
46
46
  export { r as execute };
@@ -1,28 +1,27 @@
1
- import { createTensorStatistics as e, createWeightStatistics as t } from "./weights.js";
2
- import { execute as n } from "./rope.js";
3
- import { execute as r } from "./normRMS.js";
4
- import { execute as i } from "./qkv.js";
5
- import { execute as a } from "./gelu.js";
6
- import { execute as o } from "./normRMSGrad.js";
7
- import { execute as s } from "./appendCache.js";
8
- import { execute as c } from "./attentionMask.js";
9
- import { execute as l } from "./matMulGelu.js";
10
- import { execute as u } from "./packUnpack.js";
11
- import d from "./check.js";
12
- //#region lib/checks/index.ts
1
+ import { execute as e } from "./rope.js";
2
+ import { execute as t } from "./normRMS.js";
3
+ import { t as n } from "../qkv-BQfNPucX.js";
4
+ import { execute as r } from "./gelu.js";
5
+ import { execute as i } from "./normRMSGrad.js";
6
+ import { execute as a } from "./appendCache.js";
7
+ import { execute as o } from "./attentionMask.js";
8
+ import { execute as s } from "./matMulGelu.js";
9
+ import { execute as c } from "./packUnpack.js";
10
+ import l from "./check.js";
11
+ import { createTensorStatistics as u, createWeightStatistics as d } from "./weights.js";
12
+ // lib/checks/index.ts
13
13
  var f = {
14
- rope: n,
15
- qkv: i,
16
- gelu: a,
17
- normRMS: r,
18
- normRMSGrad: o,
19
- appendCache: s,
20
- attentionMask: c,
21
- matMulGelu: l,
22
- packUnpack: u,
23
- runCheck: d,
24
- createLayerWeightStatistics: t,
25
- createWeightStatistics: e
14
+ rope: e,
15
+ qkv: n,
16
+ gelu: r,
17
+ normRMS: t,
18
+ normRMSGrad: i,
19
+ appendCache: a,
20
+ attentionMask: o,
21
+ matMulGelu: s,
22
+ packUnpack: c,
23
+ runCheck: l,
24
+ createLayerWeightStatistics: d,
25
+ createWeightStatistics: u
26
26
  };
27
- //#endregion
28
27
  export { f as default };
@@ -1,8 +1,9 @@
1
- import { I as e, ii as t, ui as n } from "../dist-Da20xy8E.js";
2
- //#region lib/checks/matMulGelu.ts
1
+ import { H as e, J as t } from "../dist-CMMLi-qO.js";
2
+ import { t as n } from "../tensor2d-ARItvqVn.js";
3
+ // lib/checks/matMulGelu.ts
3
4
  async function r(r) {
4
- await n(r);
5
- let i = e([
5
+ await t(r);
6
+ let i = n([
6
7
  [
7
8
  .1,
8
9
  .2,
@@ -38,7 +39,7 @@ async function r(r) {
38
39
  -10,
39
40
  -11
40
41
  ]
41
- ], [5, 5]), a = e([
42
+ ], [5, 5]), a = n([
42
43
  [
43
44
  .5,
44
45
  .6,
@@ -75,10 +76,9 @@ async function r(r) {
75
76
  0
76
77
  ]
77
78
  ], [5, 5]);
78
- return await t().runKernel("MatMulGelu", {
79
+ return await e().runKernel("MatMulGelu", {
79
80
  x: a,
80
81
  kernel: i
81
82
  }).array();
82
83
  }
83
- //#endregion
84
84
  export { r as execute };
@@ -1,22 +1,25 @@
1
- import { Kt as e, L as t, fi as n, ii as r, m as i, ui as a } from "../dist-Da20xy8E.js";
2
- //#region lib/checks/normRMS.ts
3
- var o = Array.from({ length: 2048 * 192 }, () => Math.random()), s = Array.from({ length: 192 }, () => Math.random()), c = Array.from({ length: 2048 * 192 }, () => Math.random());
1
+ import { H as e, J as t, g as n } from "../dist-CMMLi-qO.js";
2
+ import { t as r } from "../tensor-ALxWZfmz.js";
3
+ import { r as i } from "../ops-C1UpdEYM.js";
4
+ import { t as a } from "../tensor1d-BHgkkhTE.js";
5
+ // lib/checks/normRMS.ts
6
+ var o = Array.from({ length: 393216 }, () => Math.random()), s = Array.from({ length: 192 }, () => Math.random()), c = Array.from({ length: 393216 }, () => Math.random());
4
7
  async function l(l) {
5
- await a(l);
6
- let u = t(s, "float32"), d = n(o, [
8
+ await t(l);
9
+ let u = a(s, "float32"), d = r(o, [
7
10
  16,
8
11
  128,
9
12
  192
10
- ], "float32"), f = n(c, [
13
+ ], "float32"), f = r(c, [
11
14
  16,
12
15
  128,
13
16
  192
14
- ], "float32"), { value: p, grads: m } = e((e, t) => {
15
- let n = r().runKernel("RMSNorm", {
16
- x: e,
17
- gamma: t
17
+ ], "float32"), { value: p, grads: m } = n((t, n) => {
18
+ let r = e().runKernel("RMSNorm", {
19
+ x: t,
20
+ gamma: n
18
21
  });
19
- return i.meanSquaredError(n, f);
22
+ return i.meanSquaredError(r, f);
20
23
  })([d, u]);
21
24
  return [
22
25
  await p.array(),
@@ -24,5 +27,4 @@ async function l(l) {
24
27
  await m[1].array()
25
28
  ];
26
29
  }
27
- //#endregion
28
30
  export { l as execute };
@@ -1,22 +1,23 @@
1
- import { L as e, fi as t, ii as n, ui as r } from "../dist-Da20xy8E.js";
2
- //#region lib/checks/normRMSGrad.ts
3
- var i = Array.from({ length: 2048 * 192 }, () => Math.random()), a = Array.from({ length: 192 }, () => Math.random()), o = Array.from({ length: 2048 * 192 }, () => Math.random());
1
+ import { H as e, J as t } from "../dist-CMMLi-qO.js";
2
+ import { t as n } from "../tensor-ALxWZfmz.js";
3
+ import { t as r } from "../tensor1d-BHgkkhTE.js";
4
+ // lib/checks/normRMSGrad.ts
5
+ var i = Array.from({ length: 393216 }, () => Math.random()), a = Array.from({ length: 192 }, () => Math.random()), o = Array.from({ length: 393216 }, () => Math.random());
4
6
  async function s(s) {
5
- await r(s);
6
- let c = e(a, "float32"), l = t(i, [
7
+ await t(s);
8
+ let c = r(a, "float32"), l = n(i, [
7
9
  16,
8
10
  128,
9
11
  192
10
- ], "float32"), u = t(o, [
12
+ ], "float32"), u = n(o, [
11
13
  16,
12
14
  128,
13
15
  192
14
- ], "float32"), d = n().runKernel("RMSNormGrad", {
16
+ ], "float32"), d = e().runKernel("RMSNormGrad", {
15
17
  x: l,
16
18
  gamma: c,
17
19
  dy: u
18
20
  });
19
21
  return [await d[0].array(), await d[1].array()];
20
22
  }
21
- //#endregion
22
23
  export { s as execute };
@@ -1,8 +1,9 @@
1
- import { I as e, ii as t, ui as n } from "../dist-Da20xy8E.js";
2
- //#region lib/checks/packUnpack.ts
1
+ import { H as e, J as t } from "../dist-CMMLi-qO.js";
2
+ import { t as n } from "../tensor2d-ARItvqVn.js";
3
+ // lib/checks/packUnpack.ts
3
4
  async function r(r) {
4
- await n(r);
5
- let i = e([
5
+ await t(r);
6
+ let i = n([
6
7
  [
7
8
  .1,
8
9
  .2,
@@ -39,8 +40,7 @@ async function r(r) {
39
40
  .001,
40
41
  0
41
42
  ]
42
- ], [4, 7]), a = t().runKernel("Pack16", { x: i });
43
- return await t().runKernel("Unpack16", { x: a }).array();
43
+ ], [4, 7]), a = e().runKernel("Pack16", { x: i });
44
+ return await e().runKernel("Unpack16", { x: a }).array();
44
45
  }
45
- //#endregion
46
46
  export { r as execute };
@@ -1,34 +1 @@
1
- import { F as e, I as t, ii as n, ui as r } from "../dist-Da20xy8E.js";
2
- //#region lib/checks/qkv.ts
3
- async function i(i) {
4
- await r(i);
5
- let a = e([[[.1, .2], [.3, .4]]], [
6
- 1,
7
- 2,
8
- 2
9
- ]), o = t([[
10
- .5,
11
- .6,
12
- .9,
13
- 1,
14
- 1.3,
15
- 1.4
16
- ], [
17
- .7,
18
- .8,
19
- 1.1,
20
- 1.2,
21
- 1.5,
22
- 1.6
23
- ]], [2, 6]), s = n().runKernel("QKV", {
24
- x: a,
25
- kernel: o
26
- }, { heads: 1 });
27
- return [
28
- await s[0].array(),
29
- await s[1].array(),
30
- await s[2].array()
31
- ];
32
- }
33
- //#endregion
34
- export { i as execute };
1
+ export { t as execute } from "../qkv-BQfNPucX.js";
@@ -1,14 +1,15 @@
1
- import { P as e, ii as t, ui as n } from "../dist-Da20xy8E.js";
2
- import r from "../layers/RoPECache.js";
3
- //#region lib/checks/rope.ts
1
+ import { t as e } from "../RoPECache-dYscFINl.js";
2
+ import { H as t, J as n } from "../dist-CMMLi-qO.js";
3
+ import { t as r } from "../tensor4d-D1zRBipJ.js";
4
+ // lib/checks/rope.ts
4
5
  async function i(i) {
5
6
  await n(i);
6
- let a = e([[[[.1, .2], [.3, .4]]]], [
7
+ let a = r([[[[.1, .2], [.3, .4]]]], [
7
8
  1,
8
9
  1,
9
10
  2,
10
11
  2
11
- ]), o = new r({
12
+ ]), o = new e({
12
13
  modelType: "GenAI_NanoGPT_v1",
13
14
  vocabSize: 20,
14
15
  nEmbed: 16,
@@ -26,5 +27,4 @@ async function i(i) {
26
27
  });
27
28
  return Array.isArray(s) ? s.map((e) => e.array()) : s.array();
28
29
  }
29
- //#endregion
30
30
  export { i as execute };
@@ -1,4 +1,4 @@
1
- //#region lib/checks/weights.ts
1
+ // lib/checks/weights.ts
2
2
  async function e(e) {
3
3
  if (!Array.isArray(e) && e.dtype !== "float32") throw Error(`Unsupported dtype ${e.dtype} for weight statistics.`);
4
4
  let t = Array.isArray(e) ? e : await e.data(), n = t.length, r = 0, i = 0, a = t[0], o = t[0], s = 0, c = !0, l = !1, u = 0;
@@ -23,5 +23,4 @@ async function t(t) {
23
23
  for (let t of n) r[t.name] = await e(t);
24
24
  return r;
25
25
  }
26
- //#endregion
27
26
  export { e as createTensorStatistics, t as createWeightStatistics };
@@ -0,0 +1,13 @@
1
+ import { E as e, Kt as t, Q as n, Z as r, rt as i, yi as a } from "./dist-CMMLi-qO.js";
2
+ // node_modules/@tensorflow/tfjs-core/dist/ops/clip_by_value.js
3
+ function o(r, o, s) {
4
+ let c = n(r, "x", "clipByValue");
5
+ if (a(o <= s, () => `Error in clip: min (${o}) must be less than or equal to max (${s}).`), o === s) return e(c.shape, o, c.dtype);
6
+ let l = { x: c }, u = {
7
+ clipValueMin: o,
8
+ clipValueMax: s
9
+ };
10
+ return i.runKernel(t, l, u);
11
+ }
12
+ var s = /* @__PURE__ */ r({ clipByValue_: o });
13
+ export { s as t };
@@ -0,0 +1,13 @@
1
+ import { Q as e, Si as t, Z as n, qt as r, rt as i } from "./dist-CMMLi-qO.js";
2
+ // node_modules/@tensorflow/tfjs-core/dist/ops/complex.js
3
+ function a(n, a) {
4
+ let o = e(n, "real", "complex"), s = e(a, "imag", "complex");
5
+ t(o.shape, s.shape, `real and imag shapes, ${o.shape} and ${s.shape}, must match in call to tf.complex().`);
6
+ let c = {
7
+ real: o,
8
+ imag: s
9
+ };
10
+ return i.runKernel(r, c);
11
+ }
12
+ var o = /* @__PURE__ */ n({ complex_: a });
13
+ export { o as t };
@@ -1,4 +1,4 @@
1
- //#region node_modules/@tensorflow/tfjs-core/dist/backends/complex_util.js
1
+ // node_modules/@tensorflow/tfjs-core/dist/backends/complex_util.js
2
2
  function e(e, t) {
3
3
  if (e.length !== t.length) throw Error(`Cannot merge real and imag arrays of different lengths. real:${e.length}, imag: ${t.length}.`);
4
4
  let n = new Float32Array(e.length * 2);
@@ -56,5 +56,4 @@ function s(e, t, n) {
56
56
  imag: Math.sin(r)
57
57
  };
58
58
  }
59
- //#endregion
60
59
  export { o as a, t as c, s as i, n, i as o, r, e as s, a as t };
@@ -0,0 +1,14 @@
1
+ import { $ as e, M as t, Yt as n, Z as r, rt as i, yi as a } from "./dist-CMMLi-qO.js";
2
+ // node_modules/@tensorflow/tfjs-core/dist/ops/concat.js
3
+ function o(r, o = 0) {
4
+ a(r.length >= 1, () => "Pass at least one tensor to concat");
5
+ let s = e(r, "tensors", "concat", "string_or_numeric");
6
+ if (s[0].dtype === "complex64" && s.forEach((e) => {
7
+ if (e.dtype !== "complex64") throw Error(`Cannot concatenate complex64 tensors with a tensor
8
+ with dtype ${e.dtype}. `);
9
+ }), s.length === 1) return t(s[0]);
10
+ let c = s, l = { axis: o };
11
+ return i.runKernel(n, c, l);
12
+ }
13
+ var s = /* @__PURE__ */ r({ concat_: o });
14
+ export { s as t };
@@ -1,5 +1,5 @@
1
- import { Ps as e } from "./dist-Da20xy8E.js";
2
- //#region node_modules/@tensorflow/tfjs-core/dist/ops/concat_util.js
1
+ import { yi as e } from "./dist-CMMLi-qO.js";
2
+ // node_modules/@tensorflow/tfjs-core/dist/ops/concat_util.js
3
3
  function t(t, n) {
4
4
  let r = t[0].length;
5
5
  t.forEach((t, n) => {
@@ -15,5 +15,4 @@ function n(e, t) {
15
15
  for (let r = 1; r < e.length; r++) n[t] += e[r][t];
16
16
  return n;
17
17
  }
18
- //#endregion
19
18
  export { n, t };
package/dist/data/docx.js CHANGED
@@ -1,6 +1,6 @@
1
- import { i as e } from "../chunk-CWhphoD1.js";
2
- import { t } from "../jszip.min-DKa1Rjyn.js";
3
- //#region lib/data/docx.ts
1
+ import { i as e } from "../rolldown-runtime-CwxnZyOB.js";
2
+ import { t } from "../jszip.min-Btv48m44.js";
3
+ // lib/data/docx.ts
4
4
  var n = /* @__PURE__ */ e(t(), 1);
5
5
  async function r(e) {
6
6
  let t = await (await n.default.loadAsync(e)).file("word/document.xml")?.async("string");
@@ -14,5 +14,4 @@ function i(e) {
14
14
  let t = new DOMParser().parseFromString(e, "application/xml");
15
15
  return Array.from(t.getElementsByTagName("w:t")).map((e) => e.textContent).join("\n");
16
16
  }
17
- //#endregion
18
17
  export { r as loadDOCX };
package/dist/data/pdf.js CHANGED
@@ -1,17 +1,14 @@
1
- //#region lib/data/pdf.ts
2
- var e = 100 * 1024 * 1024, t = "https://store.gen-ai.fi/llm/deps";
3
- async function n(n, r = e) {
4
- let i = await import("../pdf-Bzuk68Vy.js");
5
- i.GlobalWorkerOptions.workerSrc || (i.GlobalWorkerOptions.workerSrc = new URL(`${t}/pdf.worker.min.mjs`).toString());
6
- let a = await i.getDocument({ data: n instanceof Blob ? await n.arrayBuffer() : n }).promise, o = a.numPages, s = [], c = 0;
7
- for (let e = 1; e <= o; e++) {
8
- let t = (await (await a.getPage(e)).getTextContent()).items.filter((e) => e.str.trim().length > 10).map((e) => e.str).join(" ");
9
- if (s.push([{
1
+ async function e(e, t = 104857600) {
2
+ let n = await import("../pdf-CbnQ75VG.js");
3
+ n.GlobalWorkerOptions.workerSrc || (n.GlobalWorkerOptions.workerSrc = new URL("https://store.gen-ai.fi/llm/deps/pdf.worker.min.mjs").toString());
4
+ let r = await n.getDocument({ data: e instanceof Blob ? await e.arrayBuffer() : e }).promise, i = r.numPages, a = [], o = 0;
5
+ for (let e = 1; e <= i; e++) {
6
+ let n = (await (await r.getPage(e)).getTextContent()).items.filter((e) => e.str.trim().length > 10).map((e) => e.str).join(" ");
7
+ if (a.push([{
10
8
  role: "text",
11
- content: t
12
- }]), c += t.length, c > r) break;
9
+ content: n
10
+ }]), o += n.length, o > t) break;
13
11
  }
14
- return s;
12
+ return a;
15
13
  }
16
- //#endregion
17
- export { n as loadPDF };
14
+ export { e as loadPDF };
@@ -1,2 +1 @@
1
- import { n as e, r as t, t as n } from "../stream-BpAwcvHz.js";
2
- export { n as JSONLConversationStream, e as MemoryConversationStream, t as ZipJSONLConversationStream };
1
+ export { t as JSONLConversationStream, n as MemoryConversationStream, r as ZipJSONLConversationStream } from "../stream-BBe2apn4.js";
@@ -1,13 +1,12 @@
1
- import { i as e, t } from "../chunk-CWhphoD1.js";
1
+ import { i as e, t } from "../rolldown-runtime-CwxnZyOB.js";
2
2
  import { loadPDF as n } from "./pdf.js";
3
3
  import { loadDOCX as r } from "./docx.js";
4
- import { n as i, r as a, t as o } from "../stream-BpAwcvHz.js";
5
- //#endregion
6
- //#region lib/data/textLoader.ts
7
- var s = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
4
+ import { n as i, r as a, t as o } from "../stream-BBe2apn4.js";
5
+ // lib/data/textLoader.ts
6
+ var s = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t, n) => {
8
7
  ((n, r) => {
9
8
  typeof define == "function" && define.amd ? define([], r) : typeof t == "object" && e !== void 0 ? t.exports = r() : n.Papa = r();
10
- })(e, function e() {
9
+ })(n, function e() {
11
10
  var t = typeof self < "u" ? self : typeof window < "u" ? window : t === void 0 ? {} : t, n, r = !t.document && !!t.postMessage, i = t.IS_PAPA_WORKER || !1, a = {}, o = 0, s = {};
12
11
  function c(e) {
13
12
  this._handle = null, this._finished = !1, this._completed = !1, this._halted = !1, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = !0, this._completeResults = {
@@ -141,10 +140,12 @@ var s = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
141
140
  if (v && r && (w("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + s.DefaultDelimiter + "'"), r = !1), e.skipEmptyLines && (v.data = v.data.filter(function(e) {
142
141
  return !b(e);
143
142
  })), C()) {
144
- if (v) if (Array.isArray(v.data[0])) {
145
- for (var t = 0; C() && t < v.data.length; t++) v.data[t].forEach(n);
146
- v.data.splice(0, 1);
147
- } else v.data.forEach(n);
143
+ if (v) {
144
+ if (Array.isArray(v.data[0])) {
145
+ for (var t = 0; C() && t < v.data.length; t++) v.data[t].forEach(n);
146
+ v.data.splice(0, 1);
147
+ } else v.data.forEach(n);
148
+ }
148
149
  function n(t, n) {
149
150
  x(e.transformHeader) && (t = e.transformHeader(t, n)), _.push(t);
150
151
  }
@@ -414,7 +415,7 @@ var s = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
414
415
  if (typeof e == "string" && (e = JSON.parse(e)), Array.isArray(e)) {
415
416
  if (!e.length || Array.isArray(e[0])) return p(null, e, l);
416
417
  if (typeof e[0] == "object") return p(u || Object.keys(e[0]), e, l);
417
- } else if (typeof e == "object") return typeof e.data == "string" && (e.data = JSON.parse(e.data)), Array.isArray(e.data) && (e.fields ||= e.meta && e.meta.fields || u, e.fields ||= Array.isArray(e.data[0]) ? e.fields : typeof e.data[0] == "object" ? Object.keys(e.data[0]) : [], Array.isArray(e.data[0]) || typeof e.data[0] == "object" || (e.data = [e.data])), p(e.fields || [], e.data || [], l);
418
+ } else if (typeof e == "object") return typeof e.data == "string" && (e.data = JSON.parse(e.data)), Array.isArray(e.data) && (e.fields || (e.fields = e.meta && e.meta.fields || u), e.fields || (e.fields = Array.isArray(e.data[0]) ? e.fields : typeof e.data[0] == "object" ? Object.keys(e.data[0]) : []), Array.isArray(e.data[0]) || typeof e.data[0] == "object" || (e.data = [e.data])), p(e.fields || [], e.data || [], l);
418
419
  throw Error("Unable to serialize unrecognized input");
419
420
  function p(e, t, n) {
420
421
  var o = "", s = (typeof e == "string" && (e = JSON.parse(e)), typeof t == "string" && (t = JSON.parse(t)), Array.isArray(e) && 0 < e.length), c = !Array.isArray(t[0]);
@@ -552,8 +553,8 @@ async function f(e, t) {
552
553
  complete: (n) => {
553
554
  if (n.errors.length > 0) console.error(n.errors), r(/* @__PURE__ */ Error("bad_format"));
554
555
  else {
555
- let r = c(n.data[0], t?.column || "text");
556
- e(new i((t?.hasHeader ?? l(n.data[0]) ? n.data.slice(1) : n.data).map((e) => [{
556
+ let r = c(n.data[0], t?.column || "text"), a = t?.hasHeader ?? l(n.data[0]) ? n.data.slice(1) : n.data;
557
+ e(new i(a.map((e) => [{
557
558
  role: "text",
558
559
  content: e[r]
559
560
  }])));
@@ -564,11 +565,11 @@ async function f(e, t) {
564
565
  }
565
566
  });
566
567
  });
567
- } else if (u === "text/plain") return new i([[{
568
+ }
569
+ if (u === "text/plain") return new i([[{
568
570
  role: "text",
569
571
  content: await e.text()
570
572
  }]]);
571
573
  throw Error("unsupported_file_type");
572
574
  }
573
- //#endregion
574
575
  export { f as default };
@@ -0,0 +1,11 @@
1
+ import { n as e } from "./rolldown-runtime-CwxnZyOB.js";
2
+ import t from "./data/textLoader.js";
3
+ import { n } from "./stream-BBe2apn4.js";
4
+ import r from "./utilities/datasetID.js";
5
+ // lib/data.ts
6
+ var i = /* @__PURE__ */ e({
7
+ MemoryConversationStream: () => n,
8
+ generateDatasetID: () => r,
9
+ loadTextData: () => t
10
+ });
11
+ export { i as t };
package/dist/data.js CHANGED
@@ -1,12 +1,5 @@
1
- import { n as e } from "./chunk-CWhphoD1.js";
2
- import t from "./utilities/datasetID.js";
3
- import { n } from "./stream-BpAwcvHz.js";
4
- import r from "./data/textLoader.js";
5
- //#region lib/data.ts
6
- var i = /* @__PURE__ */ e({
7
- MemoryConversationStream: () => n,
8
- generateDatasetID: () => t,
9
- loadTextData: () => r
10
- });
11
- //#endregion
12
- export { n as MemoryConversationStream, t as generateDatasetID, r as loadTextData, i as t };
1
+ import e from "./utilities/datasetID.js";
2
+ import { n as t } from "./stream-BBe2apn4.js";
3
+ import n from "./data/textLoader.js";
4
+ import "./data-CV_i_H6B.js";
5
+ export { t as MemoryConversationStream, e as generateDatasetID, n as loadTextData };