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
| 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 |
| 75 | void 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 | } |
| 85 | void 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); |
no test coverage detected