This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # perplexity_subprocess_script.py | |
| # Quick and dirty way to measure prompt perplexity from llama.cpp | |
| # by Evin Jaff | |
| import subprocess | |
| import json | |
| # Paths to executables | |
| PERPLEXITY_ABSOLUTE_PATH = "" | |
| TOKENIZE_ABSOLUTE_PATH = "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DRY_RUN = true | |
| SEED_PHRASE = "Yeag!" | |
| async function myFunction() { | |
| /* Random Number Generation Setup */ | |
| // Create cyrb128 state: | |
| var seed = cyrb128(SEED_PHRASE); | |
| // Four 32-bit component hashes provide the seed for sfc32. | |
| var rand = sfc32(seed[0], seed[1], seed[2], seed[3]); |
OlderNewer