MCPcopy Create free account
hub / github.com/Niko1221/Strata / choice

Function choice

engine/src/split/tools/rope_test.cpp:75–84  ·  view source on GitHub ↗

choose_rope: the model's YaRN keys and the settings, each case (model factor, model orig, context_length, env scale -1 unset / 0 off, env orig 0 unset) with the scale, trained length and limit it must give, or a refusal

Source from the content-addressed store, hash-verified

73// choose_rope: the model's YaRN keys and the settings, each case (model factor, model orig, context_length, env scale
74// -1 unset / 0 off, env orig 0 unset) with the scale, trained length and limit it must give, or a refusal
75void choice(const char* what, double mf, long long mo, long long ctx, double es, long long eo, double S, long long orig, long long limit) {
76 try {
77 const fnx::RopeChoice c = fnx::choose_rope(mf, mo, ctx, es, eo);
78 if (c.S != S || c.orig != orig || c.limit != limit)
79 fail(std::string(what) + ": x" + std::to_string(c.S) + " from " + std::to_string(c.orig) + ", limit " + std::to_string(c.limit) +
80 "; want x" + std::to_string(S) + " from " + std::to_string(orig) + ", limit " + std::to_string(limit));
81 } catch (const std::runtime_error& e) {
82 fail(std::string(what) + ": refused (" + e.what() + ")");
83 }
84}
85void choice_refused(const char* what, double mf, long long mo, long long ctx, double es, long long eo) {
86 try {
87 fnx::choose_rope(mf, mo, ctx, es, eo);

Callers 1

mainFunction · 0.70

Calls 4

choose_ropeFunction · 0.85
failFunction · 0.70
stringFunction · 0.50
to_stringFunction · 0.50

Tested by

no test coverage detected