stackgrad 0.2.0__tar.gz → 0.2.1__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.
- {stackgrad-0.2.0 → stackgrad-0.2.1}/PKG-INFO +9 -2
- {stackgrad-0.2.0 → stackgrad-0.2.1}/README.md +8 -1
- {stackgrad-0.2.0 → stackgrad-0.2.1}/pyproject.toml +4 -1
- stackgrad-0.2.1/stackgrad/__main__.py +24 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/.gitignore +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/LICENSE +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/__init__.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/attention.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/backend/__init__.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/backend/cpu.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/backend/cuda.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/backend/cuda_attention.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/backend/metal.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/backend/metal_attention.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/backend/metal_quant.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/checkpoint.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/conv.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/data.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/functional.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/gpt.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/grad_check.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/layers.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/lora.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/loss.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/mlops.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/module.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/optim.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/profile.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/quant.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/qwen3.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/sampling.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/serve/api.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/serve/engine.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/serve/kv_cache.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/serve/runner.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/serve/scheduler.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/speculative.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/state.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/tensor.py +0 -0
- {stackgrad-0.2.0 → stackgrad-0.2.1}/stackgrad/tokenizer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: stackgrad
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: A deep learning framework written from scratch, up to a served Qwen3 with retrieval and a tool-using agent
|
|
5
5
|
Project-URL: Homepage, https://github.com/samitmohan/stackgrad
|
|
6
6
|
Project-URL: Documentation, https://samitmohan.github.io/stackgrad/
|
|
@@ -120,6 +120,13 @@ A new backend is one module that exports the 27 names [cpu.py](https://github.co
|
|
|
120
120
|
|
|
121
121
|
## Installation
|
|
122
122
|
|
|
123
|
+
```sh
|
|
124
|
+
pip install stackgrad # add [metal] for Apple GPUs, [cuda] for NVIDIA
|
|
125
|
+
stackgrad # a quick example and links to the docs
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
From source:
|
|
129
|
+
|
|
123
130
|
```sh
|
|
124
131
|
git clone https://github.com/samitmohan/stackgrad.git
|
|
125
132
|
cd stackgrad
|
|
@@ -130,7 +137,7 @@ uv sync --extra metal --extra serve # Apple silicon; NVIDIA: uv sync --extra c
|
|
|
130
137
|
|
|
131
138
|
The [docs website](https://samitmohan.github.io/stackgrad/) has a quickstart, the API reference, and a
|
|
132
139
|
[showcase](https://samitmohan.github.io/stackgrad/showcase/) of what stackgrad runs, with every measured number and the
|
|
133
|
-
command that produced it. It builds from the [docs/](docs) directory. The write-up,
|
|
140
|
+
command that produced it. It builds from the [docs/](https://github.com/samitmohan/stackgrad/tree/master/docs) directory. The write-up,
|
|
134
141
|
[Modern AI: Autograd to Agents](https://samitmohan.in/blog/minitorch), explains each piece from first principles.
|
|
135
142
|
|
|
136
143
|
### Quick example comparing to PyTorch
|
|
@@ -95,6 +95,13 @@ A new backend is one module that exports the 27 names [cpu.py](https://github.co
|
|
|
95
95
|
|
|
96
96
|
## Installation
|
|
97
97
|
|
|
98
|
+
```sh
|
|
99
|
+
pip install stackgrad # add [metal] for Apple GPUs, [cuda] for NVIDIA
|
|
100
|
+
stackgrad # a quick example and links to the docs
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
From source:
|
|
104
|
+
|
|
98
105
|
```sh
|
|
99
106
|
git clone https://github.com/samitmohan/stackgrad.git
|
|
100
107
|
cd stackgrad
|
|
@@ -105,7 +112,7 @@ uv sync --extra metal --extra serve # Apple silicon; NVIDIA: uv sync --extra c
|
|
|
105
112
|
|
|
106
113
|
The [docs website](https://samitmohan.github.io/stackgrad/) has a quickstart, the API reference, and a
|
|
107
114
|
[showcase](https://samitmohan.github.io/stackgrad/showcase/) of what stackgrad runs, with every measured number and the
|
|
108
|
-
command that produced it. It builds from the [docs/](docs) directory. The write-up,
|
|
115
|
+
command that produced it. It builds from the [docs/](https://github.com/samitmohan/stackgrad/tree/master/docs) directory. The write-up,
|
|
109
116
|
[Modern AI: Autograd to Agents](https://samitmohan.in/blog/minitorch), explains each piece from first principles.
|
|
110
117
|
|
|
111
118
|
### Quick example comparing to PyTorch
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "stackgrad"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.1"
|
|
8
8
|
description = "A deep learning framework written from scratch, up to a served Qwen3 with retrieval and a tool-using agent"
|
|
9
9
|
authors = [{name = "Samit Mohan"}]
|
|
10
10
|
readme = "README.md"
|
|
@@ -15,6 +15,9 @@ dependencies = [
|
|
|
15
15
|
"regex",
|
|
16
16
|
]
|
|
17
17
|
|
|
18
|
+
[project.scripts]
|
|
19
|
+
stackgrad = "stackgrad.__main__:main"
|
|
20
|
+
|
|
18
21
|
[project.urls]
|
|
19
22
|
Homepage = "https://github.com/samitmohan/stackgrad"
|
|
20
23
|
Documentation = "https://samitmohan.github.io/stackgrad/"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from importlib.metadata import version
|
|
2
|
+
|
|
3
|
+
HELP = """stackgrad {}: a deep learning framework, from autograd to a served Qwen3 with retrieval and an agent.
|
|
4
|
+
|
|
5
|
+
import numpy as np
|
|
6
|
+
from stackgrad import Tensor
|
|
7
|
+
w = Tensor(np.random.randn(3, 1), requires_grad=True)
|
|
8
|
+
((Tensor(np.random.randn(8, 3)) @ w) ** 2).mean().backward()
|
|
9
|
+
print(w.grad)
|
|
10
|
+
|
|
11
|
+
GPUs: pip install "stackgrad[metal]" (Apple) or "stackgrad[cuda]" (NVIDIA). Chat server: "stackgrad[serve]".
|
|
12
|
+
|
|
13
|
+
docs https://samitmohan.github.io/stackgrad/
|
|
14
|
+
quickstart https://samitmohan.github.io/stackgrad/quickstart/
|
|
15
|
+
code https://github.com/samitmohan/stackgrad
|
|
16
|
+
write-up https://samitmohan.in/blog/minitorch"""
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def main():
|
|
20
|
+
print(HELP.format(version("stackgrad")))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
if __name__ == "__main__":
|
|
24
|
+
main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|