phanerozoic / threshold-ffs4

huggingface.co
Total runs: 15
24-hour runs: 0
7-day runs: 4
30-day runs: 6
Model's Last Updated: January 24 2026

Introduction of threshold-ffs4

Model Details of threshold-ffs4

threshold-ffs4

4-bit find first set (priority encoder). Returns 1-indexed position of the least significant set bit.

Function

ffs4(a3, a2, a1, a0) = position of first (least significant) 1 bit, 0 if no bits set

Truth Table (selected rows)
Input First bit Output (y2,y1,y0)
0000 none 000 (0)
0001 bit 0 001 (1)
0010 bit 1 010 (2)
0011 bit 0 001 (1)
0100 bit 2 011 (3)
1000 bit 3 100 (4)
1010 bit 1 010 (2)
Architecture
Layer 1: Priority detection
  has0 = a0 (bit 0 is set)
  has1_first = a1 AND NOT(a0)
  has2_first = a2 AND NOT(a1) AND NOT(a0)
  has3_first = a3 AND NOT(a2) AND NOT(a1) AND NOT(a0)

Layer 2: Binary encoding
  y0 = has0 OR has2_first (ffs is 1 or 3)
  y1 = has1_first OR has2_first (ffs is 2 or 3)
  y2 = has3_first (ffs is 4)
Parameters
Inputs 4
Outputs 3
Neurons 7
Layers 2
Parameters 35
Magnitude 22
Usage
from safetensors.torch import load_file
# See model.py for full implementation

# ffs4(1, 0, 1, 0) = [0, 1, 0] = 2 (bit 1 is first set)
# ffs4(0, 0, 0, 1) = [0, 0, 1] = 1 (bit 0 is first set)
License

MIT

Runs of phanerozoic threshold-ffs4 on huggingface.co

15
Total runs
0
24-hour runs
2
3-day runs
4
7-day runs
6
30-day runs

More Information About threshold-ffs4 huggingface.co Model

More threshold-ffs4 license Visit here:

https://choosealicense.com/licenses/mit

threshold-ffs4 huggingface.co

threshold-ffs4 huggingface.co is an AI model on huggingface.co that provides threshold-ffs4's model effect (), which can be used instantly with this phanerozoic threshold-ffs4 model. huggingface.co supports a free trial of the threshold-ffs4 model, and also provides paid use of the threshold-ffs4. Support call threshold-ffs4 model through api, including Node.js, Python, http.

phanerozoic threshold-ffs4 online free

threshold-ffs4 huggingface.co is an online trial and call api platform, which integrates threshold-ffs4's modeling effects, including api services, and provides a free online trial of threshold-ffs4, you can try threshold-ffs4 online for free by clicking the link below.

phanerozoic threshold-ffs4 online free url in huggingface.co:

https://huggingface.co/phanerozoic/threshold-ffs4

threshold-ffs4 install

threshold-ffs4 is an open source model from GitHub that offers a free installation service, and any user can find threshold-ffs4 on GitHub to install. At the same time, huggingface.co provides the effect of threshold-ffs4 install, users can directly use threshold-ffs4 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

threshold-ffs4 install url in huggingface.co:

https://huggingface.co/phanerozoic/threshold-ffs4

Url of threshold-ffs4

threshold-ffs4 huggingface.co Url

Provider of threshold-ffs4 huggingface.co

phanerozoic
ORGANIZATIONS

Other API from phanerozoic

huggingface.co

Total runs: 86
Run Growth: 35
Growth Rate: 40.70%
Updated:September 26 2026