dkteg
commited on
Commit
·
0034eac
1
Parent(s):
db32fc7
update README.md
Browse files
README.md
CHANGED
|
@@ -1,10 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
```python
|
| 2 |
import torch
|
| 3 |
-
from
|
| 4 |
-
|
| 5 |
-
model =
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
pipeline_tag: feature-extraction
|
| 6 |
+
library_name: transformers
|
| 7 |
+
tags:
|
| 8 |
+
- pytorch
|
| 9 |
+
- toy-model
|
| 10 |
+
- tiny-mlp
|
| 11 |
+
base_model: none
|
| 12 |
+
base_model_relation: finetune
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# TinyModel
|
| 16 |
+
|
| 17 |
+
A small MLP (100 → 200 → 10) using ReLU and Softmax, designed as a simple example for publisher workflows.
|
| 18 |
+
|
| 19 |
+
## Intended Uses & Limitations
|
| 20 |
+
|
| 21 |
+
This model is purely educational and not trained on real-world data. 🧪 It is not suitable for production tasks or any mission-critical usage.
|
| 22 |
+
|
| 23 |
+
## Usage
|
| 24 |
+
|
| 25 |
```python
|
| 26 |
import torch
|
| 27 |
+
from tiny_model import TinyModel
|
| 28 |
+
|
| 29 |
+
model = TinyModel()
|
| 30 |
+
state = torch.load(
|
| 31 |
+
"https://huggingface.co/tester-123456789/tiny-model/resolve/main/pytorch_model.bin",
|
| 32 |
+
map_location="cpu",
|
| 33 |
+
weights_only=True
|
| 34 |
+
)
|
| 35 |
+
model.load_state_dict(state)
|
| 36 |
+
model.eval()
|
| 37 |
+
|
| 38 |
+
x = torch.randn(1, 100)
|
| 39 |
+
y = model(x)
|
| 40 |
+
print(y)
|