Downloads · 30 days
9
24% of all-time downloads
phanerozoic/threshold-xor4
threshold-xor4 is a machine learning model from phanerozoic. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
4-input XOR gate. Cascade of three standard XOR circuits (OR + NAND + AND).
Downloads · 30 days
9
24% of all-time downloads
All-time downloads
38
Public
Parameters
27
1.5 KB on disk
Likes
0
Public
Click a slice to open those files.
.py2.4 KB · 34%
From the Hugging Face model README
4-input XOR gate. Cascade of three standard XOR circuits (OR + NAND + AND).
a b c d
│ │ │ │
└──┴──┐ │ │
▼ │ │
┌─────┐ │ │
│ XOR │ │ │
└──┬──┘ │ │
└──┬─┘ │
▼ │
┌─────┐ │
│ XOR │ │
└──┬──┘ │
└────┬────┘
▼
┌─────┐
│ XOR │
└──┬──┘
▼
XOR4(a,b,c,d)
Each XOR uses the standard OR + NAND + AND structure:
| Neurons | 9 |
| Layers | 6 |
| Parameters | 27 |
| Magnitude | 30 |
See threshold-xor4-mag21 for a 30% magnitude reduction using optimized XOR blocks.
from safetensors.torch import load_file
w = load_file('model.safetensors')
# See model.py for implementation
MIT