@imaduddin/fastbrain 0.0.0-stage → 1.0.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.
- package/index.js +20 -0
- package/package.json +29 -6
- package/readme.md +959 -0
- package/src/Embedding/index.d.ts +21 -0
- package/src/Embedding/index.js +141 -0
- package/src/FFN/index.d.ts +23 -0
- package/src/FFN/index.js +45 -0
- package/src/Linear/index.d.ts +31 -0
- package/src/Linear/index.js +198 -0
- package/src/OperationManager.js +169 -0
- package/src/PositionEmbedding/index.d.ts +30 -0
- package/src/PositionEmbedding/index.js +65 -0
- package/src/RMSNorm/index.d.ts +30 -0
- package/src/RMSNorm/index.js +96 -0
- package/src/Relu/index.d.ts +25 -0
- package/src/Relu/index.js +110 -0
- package/src/SelfAttention/index.d.ts +28 -0
- package/src/SelfAttention/index.js +138 -0
- package/src/Softmax/index.d.ts +26 -0
- package/src/Softmax/index.js +225 -0
- package/src/Tokenizer/index.d.ts +12 -0
- package/src/Tokenizer/index.js +164 -0
- package/src/Tokenizer/vocabs.json +19618 -0
- package/src/TransformerBlock/index.d.ts +28 -0
- package/src/TransformerBlock/index.js +78 -0
- package/src/getVec.js +30 -0
- package/src/gpu.js +0 -0
- package/src/residualConnection/index.js +32 -0
- package/src/shaders/CalculateAcc.wgsl +50 -0
- package/src/shaders/CalculateLoss.wgsl +30 -0
- package/src/shaders/ComputeDInput.wgsl +32 -0
- package/src/shaders/EB.wgsl +33 -0
- package/src/shaders/EF.wgsl +25 -0
- package/src/shaders/LB.wgsl +75 -0
- package/src/shaders/LF.wgsl +60 -0
- package/src/shaders/Norm/rmsBackward.wgsl +65 -0
- package/src/shaders/Norm/rmsForward.wgsl +30 -0
- package/src/shaders/Norm/sumSquare.wgsl +38 -0
- package/src/shaders/Norm/updateGamma.wgsl +52 -0
- package/src/shaders/PB.wgsl +25 -0
- package/src/shaders/PF.wgsl +19 -0
- package/src/shaders/RB.wgsl +37 -0
- package/src/shaders/RF.wgsl +33 -0
- package/src/shaders/ReductionFunction.wgsl +28 -0
- package/src/shaders/SB.wgsl +36 -0
- package/src/shaders/SF.wgsl +75 -0
- package/src/shaders/SoftmaxBackward.wgsl +31 -0
- package/src/shaders/add.wgsl +30 -0
- package/src/shaders/attentionShader/CompueFinalForwardOutput.wgsl +29 -0
- package/src/shaders/attentionShader/ComputeDA.wgsl +30 -0
- package/src/shaders/attentionShader/ComputeDV.wgsl +37 -0
- package/src/shaders/attentionShader/ComputeK.wgsl +30 -0
- package/src/shaders/attentionShader/ComputedQ.wgsl +31 -0
- package/src/shaders/attentionShader/attentionSocres.wgsl +40 -0
- package/src/shaders/attentionShader/sumGradient.wgsl +24 -0
- package/src/shaders/calculateTotal.wgsl +26 -0
- package/README.md +0 -3
package/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Embedding as E } from "./src/Embedding/index.js";
|
|
2
|
+
import { Linear as L } from "./src/Linear/index.js";
|
|
3
|
+
import { Softmax as S } from "./src/Softmax/index.js";
|
|
4
|
+
import { Relu as r } from "./src/Relu/index.js";
|
|
5
|
+
import { FFN as ffn } from "./src/FFN/index.js";
|
|
6
|
+
import { Tokenizer as to } from './src/Tokenizer/index.js'
|
|
7
|
+
import {SelfAttention as ST} from './src/SelfAttention/index.js'
|
|
8
|
+
import {TransformerBlock as TT} from './src/TransformerBlock/index.js'
|
|
9
|
+
import {PositionEmbedding as PM } from './src/PositionEmbedding/index.js'
|
|
10
|
+
import { RMSNorm as RM } from "./src/RMSNorm/index.js";
|
|
11
|
+
export const Embedding = E
|
|
12
|
+
export const Linear = L
|
|
13
|
+
export const Softmax = S;
|
|
14
|
+
export const RELU = r
|
|
15
|
+
export const FFN = ffn
|
|
16
|
+
export const Tokenizer = to;
|
|
17
|
+
export const SelfAttention = ST
|
|
18
|
+
export const TransformerBlock = TT;
|
|
19
|
+
export const PositionEmbedding = PM;
|
|
20
|
+
export const RMSNorm = RM
|
package/package.json
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@imaduddin/fastbrain",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@imaduddin/fastbrain",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Raw-JAVASCRIPT Based Matirx and AI LLM Package called fastBrain.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ai",
|
|
7
|
+
"llm",
|
|
8
|
+
"Large",
|
|
9
|
+
"Language",
|
|
10
|
+
"model",
|
|
11
|
+
"Small",
|
|
12
|
+
"Language",
|
|
13
|
+
"Model"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"author": "mineproness",
|
|
17
|
+
"type": "module",
|
|
18
|
+
"main": "index.js",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/imaduddin/fastBrain.git"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"webgpu": "^0.6.0"
|
|
25
|
+
},
|
|
26
|
+
"allowScripts": {
|
|
27
|
+
"webgpu@0.6.0": true
|
|
28
|
+
}
|
|
29
|
+
}
|