amv-forge 2.0.2__tar.gz → 2.0.3__tar.gz

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 (80) hide show
  1. {amv_forge-2.0.2 → amv_forge-2.0.3}/PKG-INFO +261 -261
  2. {amv_forge-2.0.2 → amv_forge-2.0.3}/README.md +3 -3
  3. {amv_forge-2.0.2 → amv_forge-2.0.3}/pyproject.toml +4 -4
  4. {amv_forge-2.0.2 → amv_forge-2.0.3}/setup.cfg +4 -4
  5. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/amv_forge.egg-info/PKG-INFO +261 -261
  6. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/__init__.pyi +20 -20
  7. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/autograd.py +306 -306
  8. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/bridge.py +266 -266
  9. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/data.py +130 -130
  10. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/device.py +127 -127
  11. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/distributions.py +220 -220
  12. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/errors.py +83 -83
  13. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/fft.py +137 -137
  14. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/functional.py +937 -937
  15. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/generated/__init__.py +3 -3
  16. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/generated/op_schema.py +13 -13
  17. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/graph.py +206 -206
  18. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/linalg.py +127 -127
  19. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/models/__init__.py +25 -25
  20. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/models/llama.py +249 -249
  21. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/models/nanogpt.py +182 -182
  22. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/nn.py +1757 -1757
  23. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/nn.pyi +34 -34
  24. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/ops.py +4271 -4271
  25. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/optim.py +911 -911
  26. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/optim.pyi +15 -15
  27. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/pipeline.py +159 -159
  28. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/rl/__init__.py +19 -19
  29. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/rl/cartpole.py +151 -151
  30. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/serialization.py +101 -101
  31. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/special.py +257 -257
  32. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/tensor.py +1768 -1768
  33. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/tensor.pyi +66 -66
  34. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_activation_functions.py +30 -30
  35. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_adversarial_fuzzer.py +1172 -1172
  36. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_arithmetic_ops.py +44 -44
  37. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_autograd.py +42 -42
  38. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_benchmark.py +75 -75
  39. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_broadcasting.py +39 -39
  40. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_compatibility.py +62 -62
  41. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_core.py +118 -118
  42. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_cpu_ops.py +196 -196
  43. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_dataloader.py +29 -29
  44. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_edge_cases.py +41 -41
  45. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_error_handling.py +31 -31
  46. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_exceptions.py +71 -71
  47. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_extreme.py +58 -58
  48. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_finite_difference.py +165 -165
  49. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_generated_schema.py +22 -22
  50. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_gpu_optimizers.py +116 -116
  51. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_gpu_sgd_contract.py +68 -68
  52. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_graph_monster.py +53 -53
  53. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_hub_models_and_rl.py +194 -194
  54. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_inplace_version_lock.py +259 -259
  55. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_loss_functions.py +32 -32
  56. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_machine_gun.py +64 -64
  57. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_massive_cpu.py +91 -91
  58. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_math_ops.py +30 -30
  59. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_matrix_ops.py +34 -34
  60. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_module_to_contract.py +105 -105
  61. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_nn_module.py +34 -34
  62. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_ops_slice.py +99 -99
  63. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_optimizer_versioning_contract.py +75 -75
  64. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_optimizers.py +126 -126
  65. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_reduction_ops.py +32 -32
  66. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_release2_llm_modules.py +148 -148
  67. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_security.py +127 -127
  68. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_shape_ops.py +31 -31
  69. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_stress.py +62 -62
  70. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_tensor_creation.py +54 -54
  71. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_unbroadcast.py +62 -62
  72. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_v3_features.py +567 -567
  73. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_v3_validation.py +148 -148
  74. {amv_forge-2.0.2 → amv_forge-2.0.3}/tests/test_vram_crusher.py +47 -47
  75. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/amv_forge.egg-info/SOURCES.txt +0 -0
  76. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/amv_forge.egg-info/dependency_links.txt +0 -0
  77. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/amv_forge.egg-info/requires.txt +0 -0
  78. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/amv_forge.egg-info/top_level.txt +0 -0
  79. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/__init__.py +0 -0
  80. {amv_forge-2.0.2 → amv_forge-2.0.3}/src/forge/py.typed +0 -0
@@ -1,261 +1,261 @@
1
- Metadata-Version: 2.4
2
- Name: amv-forge
3
- Version: 2.0.2
4
- Summary: High-performance WebGPU-accelerated tensor computation engine with reverse-mode autograd for browser and edge deep learning.
5
- Author-email: AMEVA Foundation <contact@uno-km.com>
6
- Maintainer: AMEVA Engineering Team
7
- License: MIT
8
- Project-URL: Homepage, https://uno-km.github.io/amv-forge/
9
- Project-URL: Documentation, https://uno-km.github.io/amv-forge/
10
- Project-URL: Repository, https://github.com/uno-km/amv-forge
11
- Project-URL: Issues, https://github.com/uno-km/amv-forge/issues
12
- Project-URL: Changelog, https://github.com/uno-km/amv-forge/blob/main/RELEASE_NOTES.md
13
- Keywords: deep-learning,tensor,autograd,webgpu,pytorch,transformers,pyodide,wasm,machine-learning
14
- Classifier: Development Status :: 4 - Beta
15
- Classifier: Intended Audience :: Developers
16
- Classifier: Intended Audience :: Science/Research
17
- Classifier: License :: OSI Approved :: MIT License
18
- Classifier: Programming Language :: Python :: 3
19
- Classifier: Programming Language :: Python :: 3.9
20
- Classifier: Programming Language :: Python :: 3.10
21
- Classifier: Programming Language :: Python :: 3.11
22
- Classifier: Programming Language :: Python :: 3.12
23
- Classifier: Programming Language :: Python :: 3.13
24
- Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
25
- Classifier: Topic :: Scientific/Engineering :: Mathematics
26
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
- Classifier: Operating System :: OS Independent
28
- Requires-Python: >=3.9
29
- Description-Content-Type: text/markdown
30
- Requires-Dist: numpy>=1.20.0
31
- Provides-Extra: dev
32
- Requires-Dist: pytest>=7.0; extra == "dev"
33
- Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
34
- Requires-Dist: pytest-cov>=4.0; extra == "dev"
35
-
36
- # amv-forge (`amv-forge`)
37
-
38
- [![PyPI Version](https://img.shields.io/badge/pypi-v1.0.1-blue.svg)](https://pypi.org/project/amv-forge/)
39
- [![Python Version](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue)](https://pypi.org/project/amv-forge/)
40
- [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://github.com/uno-km/amv-forge/blob/main/LICENSE)
41
- [![Test Suite](https://img.shields.io/badge/tests-279%2F279%20passed%20(100%25)-brightgreen.svg)](https://github.com/uno-km/amv-forge)
42
- [![WebGPU Acceleration](https://img.shields.io/badge/acceleration-WebGPU%20WGSL%20%2B%20CPU-orange.svg)](https://uno-km.github.io/amv-forge/)
43
-
44
- **High-Performance Client-Side Tensor Computation Engine & Reverse-Mode Autograd Framework Powered by WebGPU.**
45
-
46
- Developed and maintained by the **AMEVA Foundation** (?„ë©”ë°??¬ë‹¨), amv-forge is an industrial-grade, zero-server-cost deep learning library engineered to execute high-throughput tensor operations, automated differentiation, and end-to-end neural model training natively within client runtimes (WebGPU, WASM/Pyodide, and native Python environments).
47
-
48
- ---
49
-
50
- ## Architectural Pillars
51
-
52
- ```
53
- +-----------------------------------------------------------------------------------+
54
- | amv-forge User Space |
55
- | forge.nn | forge.optim | forge.linalg | forge.fft | forge.distributions |
56
- +-----------------------------------------------------------------------------------+
57
- | Reverse-Mode Autograd DAG Engine |
58
- | Vector-Jacobian Products (VJP) * In-Place Mutation Version Locks |
59
- +-----------------------------------------------------------------------------------+
60
- | Hardware Abstraction Layer |
61
- | CPU Backend (Vectorized C/NumPy) <---> WebGPU Backend (Async WGSL Kernels) |
62
- | Staging Buffer Recycling Pool <---> Zero-Leak Allocation Token Ring |
63
- +-----------------------------------------------------------------------------------+
64
- ```
65
-
66
- 1. **Deterministic Autograd & Topological Execution**
67
- Strict reverse-mode automatic differentiation graph with cycle detection, multi-output tuple bindings, in-place version invalidation, and scalar-tensor memory optimization.
68
- 2. **WebGPU Hardware Acceleration**
69
- Direct-to-silicon WGSL compute shaders featuring 8-dimensional non-contiguous stride dispatching, 2D workgroup partitioning ($65,535 \times 65,535$), and explicit buffer lifecycle tracking.
70
- 3. **PyTorch 1:1 API Parity**
71
- Seamless drop-in compatibility across neural layers (`nn.Module`, `nn.MultiheadAttention`, `nn.Conv2d`), mathematical primitives (`linalg`, `fft`, `special`), and probabilistic graphical models (`distributions`).
72
- 4. **Zero-Server Infrastructure (Edge & Browser)**
73
- Execute full model fine-tuning and inference directly inside the browser using Pyodide and WebGPU with zero cloud compute cost and total data privacy.
74
-
75
- ---
76
-
77
- ## Installation
78
-
79
- Install the official package from PyPI:
80
-
81
- ```bash
82
- pip install amv-forge
83
- ```
84
-
85
- Or install from source with development dependencies:
86
-
87
- ```bash
88
- git clone https://github.com/uno-km/amv-forge.git
89
- cd amv-forge/packages/forge-py
90
- pip install -e .
91
- ```
92
-
93
- ---
94
-
95
- ## Quick Start
96
-
97
- ### 1. Basic Tensor & Automated Differentiation
98
-
99
- ```python
100
- import forge as fg
101
-
102
- # Initialize tensors with gradient tracking
103
- x = fg.tensor([[1.0, 2.0], [3.0, 4.0]], requires_grad=True)
104
- w = fg.tensor([[0.5, -0.5], [1.0, 2.0]], requires_grad=True)
105
- b = fg.tensor([0.1, -0.1], requires_grad=True)
106
-
107
- # Forward pass: Linear projection + GELU activation
108
- y = fg.matmul(x, w) + b
109
- loss = fg.sum(fg.nn.functional.gelu(y))
110
-
111
- # Compute Vector-Jacobian Products (Autograd backward)
112
- loss.backward()
113
-
114
- print("Loss Value :", loss.numpy())
115
- print("Gradient dL/dw :\n", w.grad.numpy())
116
- ```
117
-
118
- ---
119
-
120
- ### 2. Character-Level Transformer (NanoGPT)
121
-
122
- Train a complete causal autoregressive transformer directly on your local device:
123
-
124
- ```python
125
- import forge as fg
126
- import forge.nn as nn
127
- from forge.models.nanogpt import GPT, GPTConfig
128
-
129
- # Define model configuration
130
- config = GPTConfig(
131
- block_size=32,
132
- vocab_size=64,
133
- n_layer=4,
134
- n_head=4,
135
- n_embd=64,
136
- bias=False
137
- )
138
- model = GPT(config)
139
- optimizer = fg.optim.AdamW(model.parameters(), lr=1e-3, weight_decay=1e-2)
140
- criterion = nn.CrossEntropyLoss()
141
-
142
- # Training step (Batch Size: 8, Sequence Length: 32)
143
- input_tokens = fg.tensor([[1, 5, 12, 3]], dtype="int32")
144
- target_tokens = fg.tensor([[5, 12, 3, 18]], dtype="int32")
145
-
146
- optimizer.zero_grad()
147
- logits = model(input_tokens)
148
- loss = criterion(logits, target_tokens)
149
- loss.backward()
150
- optimizer.step()
151
- ```
152
-
153
- ---
154
-
155
- ### 3. Speech-to-Text & Acoustic Signal Processing (`forge.fft` + `forge.nn`)
156
-
157
- Compute real Fourier Mel-spectrograms from raw acoustic waveforms:
158
-
159
- ```python
160
- import forge as fg
161
- import forge.nn as nn
162
-
163
- # 16kHz PCM audio waveform (Batch: 4, Samples: 8000)
164
- raw_audio = fg.tensor(audio_data, dtype="float32")
165
-
166
- # Fast Fourier Transform (Complex Spectrum)
167
- fft_complex = fg.fft.rfft(raw_audio, n=1024, dim=-1)
168
-
169
- # Power Spectrogram Energy
170
- power_spec = (fft_complex.real.pow(2.0) + fft_complex.imag.pow(2.0) + 1e-6).log()
171
-
172
- # 1D Convolutional Audio Feature Extractor
173
- conv = nn.Conv1d(in_channels=513, out_channels=64, kernel_size=3, padding=1)
174
- audio_features = conv(power_spec)
175
- ```
176
-
177
- ---
178
-
179
- ## Comprehensive Module Directory
180
-
181
- | Module | Core Functionality | Key Operators / Classes |
182
- | :--- | :--- | :--- |
183
- | **`forge`** | Core Tensor Engine & Factories | `tensor`, `zeros`, `ones`, `randn`, `matmul`, `einsum`, `reshape`, `permute`, `where` |
184
- | **`forge.nn`** | Deep Learning Layers & Containers | `Linear`, `Conv1d`, `Conv2d`, `MultiheadAttention`, `LayerNorm`, `RMSNorm`, `BatchNorm2d`, `Embedding`, `CrossEntropyLoss`, `MSELoss` |
185
- | **`forge.optim`** | Optimizers & Rate Schedulers | `SGD`, `Adam`, `AdamW`, `RMSprop`, `CosineAnnealingLR`, `StepLR` |
186
- | **`forge.linalg`** | Linear Algebra Decomposition | `norm`, `svd`, `qr`, `cholesky`, `inv`, `pinv`, `det`, `matrix_rank`, `solve`, `eigh` |
187
- | **`forge.fft`** | Discrete Fourier Transforms | `rfft`, `irfft`, `fft`, `ifft`, `fft2`, `ifft2`, `rfft2`, `irfft2`, `fftfreq`, `fftshift` |
188
- | **`forge.special`** | Transcendental & Error Functions | `erf`, `erfc`, `erfinv`, `gammaln`, `digamma`, `expm1`, `log1p`, `expit`, `logit`, `sinc`, `i0`, `xlogy` |
189
- | **`forge.distributions`**| Probability Distributions & KL | `Normal(rsample)`, `Uniform`, `Bernoulli`, `Categorical`, `kl_divergence` |
190
- | **`forge.models`** | Pre-architected Reference Models | `GPT`, `GPTConfig`, `LLaMA` |
191
-
192
- ---
193
-
194
- ## In-Browser Zero-Install Execution (WebGPU + Pyodide)
195
-
196
- amv-forge packages a single bundled JavaScript distribution (`forge-py-bundle.js`) that mounts into browser-native Pyodide runtimes:
197
-
198
- ```html
199
- <script src="https://cdn.jsdelivr.net/pyodide/v0.26.2/full/pyodide.js"></script>
200
- <script src="https://uno-km.github.io/amv-forge/dist/forge-py-bundle.js"></script>
201
- <script>
202
- async function runClientDeepLearning() {
203
- let pyodide = await loadPyodide();
204
- await window.loadAmevaForgeBundle(pyodide);
205
-
206
- await pyodide.runPythonAsync(`
207
- import forge as fg
208
- x = fg.randn((1024, 1024), device="gpu")
209
- y = fg.matmul(x, x)
210
- print("Computed 1024x1024 on WebGPU Hardware:", y.shape)
211
- `);
212
- }
213
- runClientDeepLearning();
214
- </script>
215
- ```
216
-
217
- ---
218
-
219
- ## ?Œ The AMEVA Foundation (?„ë©”ë°??¬ë‹¨)
220
-
221
- **amv-forge** is an open-source deep learning initiative created and governed by the **AMEVA Foundation** (?„ë©”ë°??¬ë‹¨).
222
-
223
- ### ?ޝ Our Mission & Zero-Server Paradigm
224
- The AMEVA Foundation is dedicated to the **democratisation of client-side artificial intelligence and edge computing**. We envision a decentralized web where deep learning training, fine-tuning, and neural inference occur directly on user devices (browsers, laptops, tablets, and smartphones)?”eliminating massive cloud server costs, safeguarding user data sovereignty with zero network leakage, and providing zero-latency neural intelligence everywhere.
225
-
226
- ### ?ŒŸ Core Foundation Initiatives
227
- - ?Œ **amv-forge Tensor Engine**: High-performance WebGPU tensor computation & reverse-mode autograd engine.
228
- - ?Ž™ï¸?**On-Device Whisper STT**: Real-time acoustic FFT signal processing & speech recognition running locally in browser.
229
- - ?¤– **Decentralized LLM Transformers**: Zero-install character and subword transformer models with zero cloud dependency.
230
- - ?”’ **Privacy-First AI Sovereignty**: Sovereign on-device machine learning where private data never leaves client silicon.
231
-
232
- * **Foundation Portal**: [https://uno-km.github.io/amv-forge/](https://uno-km.github.io/amv-forge/)
233
- * **Official Repository**: [https://github.com/uno-km/amv-forge](https://github.com/uno-km/amv-forge)
234
- * **Community & Governance**: [https://github.com/uno-km/amv-forge/issues](https://github.com/uno-km/amv-forge/issues)
235
- * **Sponsorship & Research Partnerships**: [https://github.com/uno-km](https://github.com/uno-km)
236
-
237
- ---
238
-
239
- ## Quality Assurance & Verification
240
-
241
- Every release of amv-forge undergoes rigorous multi-tier verification:
242
- * **292 Unit & Stress Tests**: 100% automated pass rate across CPU, GPU fallback, mathematical accuracy, and memory quota managers.
243
- * **Finite-Difference Gradcheck**: Numerical gradient validation against analytical Vector-Jacobian backward formulations.
244
- * **Memory Lifecycle Audit**: Zero-leak allocation token reclamation and buffer recycling verification across 10,000+ continuous execution cycles.
245
-
246
- ---
247
-
248
- ## License & Citation
249
-
250
- amv-forge is licensed under the [MIT License](https://github.com/uno-km/amv-forge/blob/main/LICENSE).
251
-
252
- ```bibtex
253
- @software{ameva_forge_2026,
254
- author = {AMEVA Foundation},
255
- title = {amv-forge: High-Performance WebGPU-Accelerated Tensor Computation Engine},
256
- year = {2026},
257
- publisher = {GitHub},
258
- url = {https://github.com/uno-km/amv-forge}
259
- }
260
- ```
261
-
1
+ Metadata-Version: 2.4
2
+ Name: amv-forge
3
+ Version: 2.0.3
4
+ Summary: High-performance WebGPU-accelerated tensor computation engine with reverse-mode autograd for browser and edge deep learning.
5
+ Author-email: AMEVA Foundation <amv.foundation.kr@gmail.com>
6
+ Maintainer: AMEVA Engineering Team
7
+ License: MIT
8
+ Project-URL: Homepage, https://ameva.pro/lib/forge/
9
+ Project-URL: Documentation, https://ameva.pro/lib/forge/
10
+ Project-URL: Repository, https://github.com/uno-km/amv-forge
11
+ Project-URL: Issues, https://github.com/uno-km/amv-forge/issues
12
+ Project-URL: Changelog, https://github.com/uno-km/amv-forge/blob/main/RELEASE_NOTES.md
13
+ Keywords: deep-learning,tensor,autograd,webgpu,pytorch,transformers,pyodide,wasm,machine-learning
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
25
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
26
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
+ Classifier: Operating System :: OS Independent
28
+ Requires-Python: >=3.9
29
+ Description-Content-Type: text/markdown
30
+ Requires-Dist: numpy>=1.20.0
31
+ Provides-Extra: dev
32
+ Requires-Dist: pytest>=7.0; extra == "dev"
33
+ Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
34
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
35
+
36
+ # amv-forge (`amv-forge`)
37
+
38
+ [![PyPI Version](https://img.shields.io/badge/pypi-v1.0.1-blue.svg)](https://pypi.org/project/amv-forge/)
39
+ [![Python Version](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue)](https://pypi.org/project/amv-forge/)
40
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://github.com/uno-km/amv-forge/blob/main/LICENSE)
41
+ [![Test Suite](https://img.shields.io/badge/tests-279%2F279%20passed%20(100%25)-brightgreen.svg)](https://github.com/uno-km/amv-forge)
42
+ [![WebGPU Acceleration](https://img.shields.io/badge/acceleration-WebGPU%20WGSL%20%2B%20CPU-orange.svg)](https://ameva.pro/lib/forge/)
43
+
44
+ **High-Performance Client-Side Tensor Computation Engine & Reverse-Mode Autograd Framework Powered by WebGPU.**
45
+
46
+ Developed and maintained by the **AMEVA Foundation** (?„ë©”ë°??¬ë‹¨), amv-forge is an industrial-grade, zero-server-cost deep learning library engineered to execute high-throughput tensor operations, automated differentiation, and end-to-end neural model training natively within client runtimes (WebGPU, WASM/Pyodide, and native Python environments).
47
+
48
+ ---
49
+
50
+ ## Architectural Pillars
51
+
52
+ ```
53
+ +-----------------------------------------------------------------------------------+
54
+ | amv-forge User Space |
55
+ | forge.nn | forge.optim | forge.linalg | forge.fft | forge.distributions |
56
+ +-----------------------------------------------------------------------------------+
57
+ | Reverse-Mode Autograd DAG Engine |
58
+ | Vector-Jacobian Products (VJP) * In-Place Mutation Version Locks |
59
+ +-----------------------------------------------------------------------------------+
60
+ | Hardware Abstraction Layer |
61
+ | CPU Backend (Vectorized C/NumPy) <---> WebGPU Backend (Async WGSL Kernels) |
62
+ | Staging Buffer Recycling Pool <---> Zero-Leak Allocation Token Ring |
63
+ +-----------------------------------------------------------------------------------+
64
+ ```
65
+
66
+ 1. **Deterministic Autograd & Topological Execution**
67
+ Strict reverse-mode automatic differentiation graph with cycle detection, multi-output tuple bindings, in-place version invalidation, and scalar-tensor memory optimization.
68
+ 2. **WebGPU Hardware Acceleration**
69
+ Direct-to-silicon WGSL compute shaders featuring 8-dimensional non-contiguous stride dispatching, 2D workgroup partitioning ($65,535 \times 65,535$), and explicit buffer lifecycle tracking.
70
+ 3. **PyTorch 1:1 API Parity**
71
+ Seamless drop-in compatibility across neural layers (`nn.Module`, `nn.MultiheadAttention`, `nn.Conv2d`), mathematical primitives (`linalg`, `fft`, `special`), and probabilistic graphical models (`distributions`).
72
+ 4. **Zero-Server Infrastructure (Edge & Browser)**
73
+ Execute full model fine-tuning and inference directly inside the browser using Pyodide and WebGPU with zero cloud compute cost and total data privacy.
74
+
75
+ ---
76
+
77
+ ## Installation
78
+
79
+ Install the official package from PyPI:
80
+
81
+ ```bash
82
+ pip install amv-forge
83
+ ```
84
+
85
+ Or install from source with development dependencies:
86
+
87
+ ```bash
88
+ git clone https://github.com/uno-km/amv-forge.git
89
+ cd amv-forge/packages/forge-py
90
+ pip install -e .
91
+ ```
92
+
93
+ ---
94
+
95
+ ## Quick Start
96
+
97
+ ### 1. Basic Tensor & Automated Differentiation
98
+
99
+ ```python
100
+ import forge as fg
101
+
102
+ # Initialize tensors with gradient tracking
103
+ x = fg.tensor([[1.0, 2.0], [3.0, 4.0]], requires_grad=True)
104
+ w = fg.tensor([[0.5, -0.5], [1.0, 2.0]], requires_grad=True)
105
+ b = fg.tensor([0.1, -0.1], requires_grad=True)
106
+
107
+ # Forward pass: Linear projection + GELU activation
108
+ y = fg.matmul(x, w) + b
109
+ loss = fg.sum(fg.nn.functional.gelu(y))
110
+
111
+ # Compute Vector-Jacobian Products (Autograd backward)
112
+ loss.backward()
113
+
114
+ print("Loss Value :", loss.numpy())
115
+ print("Gradient dL/dw :\n", w.grad.numpy())
116
+ ```
117
+
118
+ ---
119
+
120
+ ### 2. Character-Level Transformer (NanoGPT)
121
+
122
+ Train a complete causal autoregressive transformer directly on your local device:
123
+
124
+ ```python
125
+ import forge as fg
126
+ import forge.nn as nn
127
+ from forge.models.nanogpt import GPT, GPTConfig
128
+
129
+ # Define model configuration
130
+ config = GPTConfig(
131
+ block_size=32,
132
+ vocab_size=64,
133
+ n_layer=4,
134
+ n_head=4,
135
+ n_embd=64,
136
+ bias=False
137
+ )
138
+ model = GPT(config)
139
+ optimizer = fg.optim.AdamW(model.parameters(), lr=1e-3, weight_decay=1e-2)
140
+ criterion = nn.CrossEntropyLoss()
141
+
142
+ # Training step (Batch Size: 8, Sequence Length: 32)
143
+ input_tokens = fg.tensor([[1, 5, 12, 3]], dtype="int32")
144
+ target_tokens = fg.tensor([[5, 12, 3, 18]], dtype="int32")
145
+
146
+ optimizer.zero_grad()
147
+ logits = model(input_tokens)
148
+ loss = criterion(logits, target_tokens)
149
+ loss.backward()
150
+ optimizer.step()
151
+ ```
152
+
153
+ ---
154
+
155
+ ### 3. Speech-to-Text & Acoustic Signal Processing (`forge.fft` + `forge.nn`)
156
+
157
+ Compute real Fourier Mel-spectrograms from raw acoustic waveforms:
158
+
159
+ ```python
160
+ import forge as fg
161
+ import forge.nn as nn
162
+
163
+ # 16kHz PCM audio waveform (Batch: 4, Samples: 8000)
164
+ raw_audio = fg.tensor(audio_data, dtype="float32")
165
+
166
+ # Fast Fourier Transform (Complex Spectrum)
167
+ fft_complex = fg.fft.rfft(raw_audio, n=1024, dim=-1)
168
+
169
+ # Power Spectrogram Energy
170
+ power_spec = (fft_complex.real.pow(2.0) + fft_complex.imag.pow(2.0) + 1e-6).log()
171
+
172
+ # 1D Convolutional Audio Feature Extractor
173
+ conv = nn.Conv1d(in_channels=513, out_channels=64, kernel_size=3, padding=1)
174
+ audio_features = conv(power_spec)
175
+ ```
176
+
177
+ ---
178
+
179
+ ## Comprehensive Module Directory
180
+
181
+ | Module | Core Functionality | Key Operators / Classes |
182
+ | :--- | :--- | :--- |
183
+ | **`forge`** | Core Tensor Engine & Factories | `tensor`, `zeros`, `ones`, `randn`, `matmul`, `einsum`, `reshape`, `permute`, `where` |
184
+ | **`forge.nn`** | Deep Learning Layers & Containers | `Linear`, `Conv1d`, `Conv2d`, `MultiheadAttention`, `LayerNorm`, `RMSNorm`, `BatchNorm2d`, `Embedding`, `CrossEntropyLoss`, `MSELoss` |
185
+ | **`forge.optim`** | Optimizers & Rate Schedulers | `SGD`, `Adam`, `AdamW`, `RMSprop`, `CosineAnnealingLR`, `StepLR` |
186
+ | **`forge.linalg`** | Linear Algebra Decomposition | `norm`, `svd`, `qr`, `cholesky`, `inv`, `pinv`, `det`, `matrix_rank`, `solve`, `eigh` |
187
+ | **`forge.fft`** | Discrete Fourier Transforms | `rfft`, `irfft`, `fft`, `ifft`, `fft2`, `ifft2`, `rfft2`, `irfft2`, `fftfreq`, `fftshift` |
188
+ | **`forge.special`** | Transcendental & Error Functions | `erf`, `erfc`, `erfinv`, `gammaln`, `digamma`, `expm1`, `log1p`, `expit`, `logit`, `sinc`, `i0`, `xlogy` |
189
+ | **`forge.distributions`**| Probability Distributions & KL | `Normal(rsample)`, `Uniform`, `Bernoulli`, `Categorical`, `kl_divergence` |
190
+ | **`forge.models`** | Pre-architected Reference Models | `GPT`, `GPTConfig`, `LLaMA` |
191
+
192
+ ---
193
+
194
+ ## In-Browser Zero-Install Execution (WebGPU + Pyodide)
195
+
196
+ amv-forge packages a single bundled JavaScript distribution (`forge-py-bundle.js`) that mounts into browser-native Pyodide runtimes:
197
+
198
+ ```html
199
+ <script src="https://cdn.jsdelivr.net/pyodide/v0.26.2/full/pyodide.js"></script>
200
+ <script src="https://ameva.pro/lib/forge/dist/forge-py-bundle.js"></script>
201
+ <script>
202
+ async function runClientDeepLearning() {
203
+ let pyodide = await loadPyodide();
204
+ await window.loadAmevaForgeBundle(pyodide);
205
+
206
+ await pyodide.runPythonAsync(`
207
+ import forge as fg
208
+ x = fg.randn((1024, 1024), device="gpu")
209
+ y = fg.matmul(x, x)
210
+ print("Computed 1024x1024 on WebGPU Hardware:", y.shape)
211
+ `);
212
+ }
213
+ runClientDeepLearning();
214
+ </script>
215
+ ```
216
+
217
+ ---
218
+
219
+ ## ?Œ The AMEVA Foundation (?„ë©”ë°??¬ë‹¨)
220
+
221
+ **amv-forge** is an open-source deep learning initiative created and governed by the **AMEVA Foundation** (?„ë©”ë°??¬ë‹¨).
222
+
223
+ ### ?ޝ Our Mission & Zero-Server Paradigm
224
+ The AMEVA Foundation is dedicated to the **democratisation of client-side artificial intelligence and edge computing**. We envision a decentralized web where deep learning training, fine-tuning, and neural inference occur directly on user devices (browsers, laptops, tablets, and smartphones)?”eliminating massive cloud server costs, safeguarding user data sovereignty with zero network leakage, and providing zero-latency neural intelligence everywhere.
225
+
226
+ ### ?ŒŸ Core Foundation Initiatives
227
+ - ?Œ **amv-forge Tensor Engine**: High-performance WebGPU tensor computation & reverse-mode autograd engine.
228
+ - ?Ž™ï¸?**On-Device Whisper STT**: Real-time acoustic FFT signal processing & speech recognition running locally in browser.
229
+ - ?¤– **Decentralized LLM Transformers**: Zero-install character and subword transformer models with zero cloud dependency.
230
+ - ?”’ **Privacy-First AI Sovereignty**: Sovereign on-device machine learning where private data never leaves client silicon.
231
+
232
+ * **Foundation Portal**: [https://ameva.pro/lib/forge/](https://ameva.pro/lib/forge/)
233
+ * **Official Repository**: [https://github.com/uno-km/amv-forge](https://github.com/uno-km/amv-forge)
234
+ * **Community & Governance**: [https://github.com/uno-km/amv-forge/issues](https://github.com/uno-km/amv-forge/issues)
235
+ * **Sponsorship & Research Partnerships**: [https://github.com/uno-km](https://github.com/uno-km)
236
+
237
+ ---
238
+
239
+ ## Quality Assurance & Verification
240
+
241
+ Every release of amv-forge undergoes rigorous multi-tier verification:
242
+ * **292 Unit & Stress Tests**: 100% automated pass rate across CPU, GPU fallback, mathematical accuracy, and memory quota managers.
243
+ * **Finite-Difference Gradcheck**: Numerical gradient validation against analytical Vector-Jacobian backward formulations.
244
+ * **Memory Lifecycle Audit**: Zero-leak allocation token reclamation and buffer recycling verification across 10,000+ continuous execution cycles.
245
+
246
+ ---
247
+
248
+ ## License & Citation
249
+
250
+ amv-forge is licensed under the [MIT License](https://github.com/uno-km/amv-forge/blob/main/LICENSE).
251
+
252
+ ```bibtex
253
+ @software{ameva_forge_2026,
254
+ author = {AMEVA Foundation},
255
+ title = {amv-forge: High-Performance WebGPU-Accelerated Tensor Computation Engine},
256
+ year = {2026},
257
+ publisher = {GitHub},
258
+ url = {https://github.com/uno-km/amv-forge}
259
+ }
260
+ ```
261
+
@@ -4,7 +4,7 @@
4
4
  [![Python Version](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue)](https://pypi.org/project/amv-forge/)
5
5
  [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://github.com/uno-km/amv-forge/blob/main/LICENSE)
6
6
  [![Test Suite](https://img.shields.io/badge/tests-279%2F279%20passed%20(100%25)-brightgreen.svg)](https://github.com/uno-km/amv-forge)
7
- [![WebGPU Acceleration](https://img.shields.io/badge/acceleration-WebGPU%20WGSL%20%2B%20CPU-orange.svg)](https://uno-km.github.io/amv-forge/)
7
+ [![WebGPU Acceleration](https://img.shields.io/badge/acceleration-WebGPU%20WGSL%20%2B%20CPU-orange.svg)](https://ameva.pro/lib/forge/)
8
8
 
9
9
  **High-Performance Client-Side Tensor Computation Engine & Reverse-Mode Autograd Framework Powered by WebGPU.**
10
10
 
@@ -162,7 +162,7 @@ amv-forge packages a single bundled JavaScript distribution (`forge-py-bundle.js
162
162
 
163
163
  ```html
164
164
  <script src="https://cdn.jsdelivr.net/pyodide/v0.26.2/full/pyodide.js"></script>
165
- <script src="https://uno-km.github.io/amv-forge/dist/forge-py-bundle.js"></script>
165
+ <script src="https://ameva.pro/lib/forge/dist/forge-py-bundle.js"></script>
166
166
  <script>
167
167
  async function runClientDeepLearning() {
168
168
  let pyodide = await loadPyodide();
@@ -194,7 +194,7 @@ The AMEVA Foundation is dedicated to the **democratisation of client-side artifi
194
194
  - ?¤– **Decentralized LLM Transformers**: Zero-install character and subword transformer models with zero cloud dependency.
195
195
  - ?”’ **Privacy-First AI Sovereignty**: Sovereign on-device machine learning where private data never leaves client silicon.
196
196
 
197
- * **Foundation Portal**: [https://uno-km.github.io/amv-forge/](https://uno-km.github.io/amv-forge/)
197
+ * **Foundation Portal**: [https://ameva.pro/lib/forge/](https://ameva.pro/lib/forge/)
198
198
  * **Official Repository**: [https://github.com/uno-km/amv-forge](https://github.com/uno-km/amv-forge)
199
199
  * **Community & Governance**: [https://github.com/uno-km/amv-forge/issues](https://github.com/uno-km/amv-forge/issues)
200
200
  * **Sponsorship & Research Partnerships**: [https://github.com/uno-km](https://github.com/uno-km)
@@ -4,13 +4,13 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "amv-forge"
7
- version = "2.0.2"
7
+ version = "2.0.3"
8
8
  description = "High-performance WebGPU-accelerated tensor computation engine with reverse-mode autograd for browser and edge deep learning."
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
11
11
  requires-python = ">=3.9"
12
12
  authors = [
13
- {name = "AMEVA Foundation", email = "contact@uno-km.com"}
13
+ {name = "AMEVA Foundation", email = "amv.foundation.kr@gmail.com"}
14
14
  ]
15
15
  maintainers = [
16
16
  {name = "AMEVA Engineering Team"}
@@ -54,8 +54,8 @@ dev = [
54
54
  ]
55
55
 
56
56
  [project.urls]
57
- Homepage = "https://uno-km.github.io/amv-forge/"
58
- Documentation = "https://uno-km.github.io/amv-forge/"
57
+ Homepage = "https://ameva.pro/lib/forge/"
58
+ Documentation = "https://ameva.pro/lib/forge/"
59
59
  Repository = "https://github.com/uno-km/amv-forge"
60
60
  Issues = "https://github.com/uno-km/amv-forge/issues"
61
61
  Changelog = "https://github.com/uno-km/amv-forge/blob/main/RELEASE_NOTES.md"
@@ -1,4 +1,4 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+