@mineproness/tensorloop 2.1.59 → 2.1.61

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mineproness/tensorloop",
3
- "version": "2.1.59",
3
+ "version": "2.1.61",
4
4
  "description": "Raw-JAVASCRIPT Based Matirx and AI LLM Package called Tensorloop.",
5
5
  "keywords": [
6
6
  "ai",
@@ -63,7 +63,6 @@ export class SelfAttention {
63
63
  const finalOutput = await this.gpu.createBuffer(tokenCount * this.embeddingSize * 4)
64
64
  const outputBind = await this.gpu.createBindGroup(this.outputForward, 0, [this.weights, this.value, finalOutput, this.asParams]);
65
65
  await this.gpu.RunPipline(encoder, this.outputForward, outputBind, Math.ceil((tokenCount * this.embeddingSize) / 256))
66
-
67
66
  await this.gpu.submitQueue(encoder)
68
67
  scroes.destroy()
69
68
  return finalOutput
@@ -92,7 +91,7 @@ export class SelfAttention {
92
91
  const dv = await this.v.backward(dV, lr)
93
92
  const output = await this.gpu.createBuffer(this.embeddingSize * tokenCount * 4);
94
93
  const encode = this.gpu.CreateEncoder()
95
- const outputBind = await this.gpu.createBindGroup(this.sumShader, 0 , [dq, dk, dv, output, this.softmaxParams]);
94
+ const outputBind = await this.gpu.createBindGroup(this.sumShader, 0 , [dq, dk, dv, output, this.asParams]);
96
95
  await this.gpu.RunPipline(encode, this.sumShader, outputBind, Math.ceil((tokenCount * this.embeddingSize / 256)));
97
96
  await this.gpu.submitQueue(encode)
98
97
  dS.destroy()
@@ -114,7 +113,7 @@ export class SelfAttention {
114
113
  }
115
114
  async Save(){
116
115
  await this.q.Save()
117
- await this.q.Save()
118
- await this.q.Save()
116
+ await this.k.Save()
117
+ await this.v.Save()
119
118
  }
120
119
  }
@@ -27,5 +27,5 @@ fn main(@builtin(global_invocation_id) id: vec3<u32>) {
27
27
  }
28
28
  let p = P[index];
29
29
  let dp = dP[index];
30
- output[index] = clamp(p * (dp - dot), -1.0, 1.0);
30
+ output[index] = p * (dp - dot);
31
31
  }