Downloads · 30 days
0
phanerozoic/threshold-pruner
threshold-pruner 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.
Multi-method pruning framework for threshold logic circuits.
Downloads · 30 days
0
Access
Public
Updated Jan 24, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py55 KB · 89%
From the Hugging Face model README
Multi-method pruning framework for threshold logic circuits.
| Method | Flag | Description |
|---|---|---|
| Magnitude Reduction | mag | Reduce weights by 1 toward zero |
| Batched Magnitude | batched | GPU-parallel magnitude reduction |
| Zero Pruning | zero | Set weights directly to 0 |
| Quantization | quant | Force weights to {-1, 0, 1} |
| Evolutionary | evo | Mutation + selection with parsimony |
| Simulated Annealing | anneal | Gradual cooling search |
| Pareto Search | pareto | Correctness vs size tradeoff |
# List available circuits
python prune.py --list
# Prune a circuit with all methods
python prune.py threshold-hamming74decoder
# Specific methods only
python prune.py threshold-hamming74decoder --methods mag,zero,evo
# Batch process
python prune.py --all --max-inputs 8
# Save best result
python prune.py threshold-hamming74decoder --save
torch
safetensors
Each circuit needs:
threshold-{name}/
├── model.safetensors # Weights: {layer.weight: [...], layer.bias: [...]}
├── model.py # Forward function
├── config.json # {inputs, outputs, neurons, layers, parameters}
MIT