Futrell's ziplm, CLI and Rust library implementation. WIP.
cargo install --git https://github.com/ShettySach/ziplm --features cli
Usage: ziplm [OPTIONS]
Options:
-l, --length <LENGTH> Maximum length of sample generated [default: 100]
-p, --prefix <PREFIX> Prefix for sample generated [default: ]
-t, --temp <TEMP> Temperature for sample generated [default: 0.25]
-v, --vocab <VOCAB> Path of vocabulary data (.txt file) [Defaults to qwertyuiopasdfghjklzxcvbnm,. '"]
-d, --data <DATA> Path of training data (.txt file) [Defaults to Mary Shelley's Frankenstein]
-c, --conv <COMP> Conversion factor [default: 5.545177444479562]
-h, --help Print help
-V, --version Print version
cargo add --git https://github.com/ShettySach/ziplm
use ziplm::ZipModel;
fn main() {
let vocab = "qwertyuiopasdfghjklzxcvbnm,. '";
let data = include_str!("../data.txt");
let ln256 = 5.545177444479562;
let model = ZipModel::new(vocab, data, ln256);
let _output = model.sample_sequence(100, "arch", 0.25);
}