diff --git a/abi/rad_yarn.h b/abi/rad_yarn.h new file mode 100644 index 00000000..80904020 --- /dev/null +++ b/abi/rad_yarn.h @@ -0,0 +1,46 @@ +#ifndef RAD_YARN_H +#define RAD_YARN_H + +/* Static YaRN coefficients. The architecture resolves the correction bounds using + * the ORIGINAL training length, never the deployment/table length. Kernels share + * the resolved coefficients so direct and table-backed RoPE cannot disagree. */ +#include "rad_plugin.h" +#include + +#if defined(__HIPCC__) +#define RAD_YARN_HD __host__ __device__ +#else +#define RAD_YARN_HD +#endif + +struct RadYarn { + float factor = 0.0f; /* zero: keep the legacy arithmetic exactly */ + float low = 0.0f; + float high = 0.0f; + float magnitude = 1.0f; + + RAD_YARN_HD float frequency(float inv, int i) const { + if (factor == 0.0f) return inv; + const float width = high == low ? 0.001f : high - low; + const float ramp = fminf(1.0f, fmaxf(0.0f, ((float)i - low) / width)); + /* Keep the blend order used by the reference YaRN implementation. */ + const float mask = 1.0f - ramp; + return (inv / factor) * (1.0f - mask) + inv * mask; + } +}; + +inline RadYarn rad_yarn_args(const RadArgs* a) { + return { (float)rad_args_getf_or(a, "yarn_factor", 0.0), + (float)rad_args_getf_or(a, "yarn_low", 0.0), + (float)rad_args_getf_or(a, "yarn_high", 0.0), + (float)rad_args_getf_or(a, "yarn_magnitude", 1.0) }; +} + +inline bool rad_yarn_valid(const RadYarn& y) { + return std::isfinite(y.factor) && (y.factor == 0.0f || + (y.factor >= 1.0f && std::isfinite(y.low) && std::isfinite(y.high) && + y.high >= y.low && std::isfinite(y.magnitude) && y.magnitude > 0.0f)); +} + +#undef RAD_YARN_HD +#endif diff --git a/arch/common/rad_arch.h b/arch/common/rad_arch.h index eca94953..18a06867 100644 --- a/arch/common/rad_arch.h +++ b/arch/common/rad_arch.h @@ -16,6 +16,7 @@ #include "rad_builder.h" #include "rad_device.h" #include "rad_runtime.h" +#include "rad_yarn.h" #include #include @@ -626,6 +627,7 @@ struct Geom { float wadd_qk = 0.0f; float theta = 1e6f; float rope_scale = 1.0f; + RadYarn yarn; /* M-RoPE: the checkpoint's `mrope_section`, when it has one. A model whose rotary has several * position components declares `rope` with `rope_mode` and these sections and hands it * RadBatch::rope_pos; empty, the rotary is one-component NeoX over `positions`. Stored here @@ -1025,17 +1027,97 @@ inline bool rope_mixed(const RadBatch* b) { return b->rope_pos && b->rope_mixed; /* `rope` declared for the geometry's rotary: M-RoPE's mode and sections when the model has them, * `mode` otherwise. */ +/* Append only for explicit YaRN, preserving stock op identities and tune keys. */ +inline rad_op decl_rotary(RadBuilder* b, const Geom& g, const char* name, + const RadParam* params, int n, const rad_weight* weights, int nw) { + if (g.yarn.factor == 0.0f) return rad_decl_op(b, name, params, n, weights, nw); + std::vector p(params, params + n); + p.push_back(RAD_F64("yarn_factor", g.yarn.factor)); + p.push_back(RAD_F64("yarn_low", g.yarn.low)); + p.push_back(RAD_F64("yarn_high", g.yarn.high)); + p.push_back(RAD_F64("yarn_magnitude", g.yarn.magnitude)); + return rad_decl_op(b, name, p.data(), (int)p.size(), weights, nw); +} + +/* Both modern HF rope_parameters and legacy rope_scaling. Nested text_config is + * authoritative for a multimodal target; the draft has its own independent config. */ +inline int yarn_from(Geom& g, const RadModelMeta* meta, const char* prefix, int64_t rot) { + g.yarn = {}; + const std::string root(prefix); + const std::vector homes = root.empty() + ? std::vector{"text_config.rope_parameters.", "rope_parameters.", + "text_config.rope_scaling.", "rope_scaling."} + : std::vector{root + "rope_parameters.", root + "rope_scaling."}; + std::string home; + const char* type = nullptr; + for (const auto& h : homes) { + type = rad_meta_gets(meta, (h + "rope_type").c_str(), + rad_meta_gets(meta, (h + "type").c_str(), nullptr)); + if (type) { home = h; break; } + } + if (!type || !std::strcmp(type, "default")) return RAD_OK; + auto get = [&](const char* key, double fallback) { + const char* text = rad_meta_gets(meta, (home + key).c_str(), nullptr); + if (!text) return fallback; + char* end = nullptr; + const double value = std::strtod(text, &end); + if (end == text) return (double)NAN; + while (*end == ' ' || *end == '\t' || *end == '\n') ++end; + return *end ? (double)NAN : value; + }; + if (!std::strcmp(type, "linear")) { + const double factor = get("factor", 0.0); + if (!std::isfinite(factor) || factor <= 0.0) return RAD_E_INVAL; + g.rope_scale = (float)factor; + return RAD_OK; + } + if (std::strcmp(type, "yarn")) { + fprintf(stderr, "radiance: %s rotary type '%s' is unsupported\n", prefix, type); + return RAD_E_UNSUPPORTED; + } + const double factor = get("factor", 0.0), original = get("original_max_position_embeddings", 0.0); + const double fast = get("beta_fast", 32.0), slow = get("beta_slow", 1.0); + const double magnitude = get("attention_factor", factor > 1.0 ? 1.0 + 0.1 * std::log(factor) : 1.0); + const double truncate = get("truncate", 1.0); + if (!std::isfinite(factor) || factor < 1.0 || !std::isfinite(original) || original < 1.0 || + original != std::floor(original) || (truncate != 0.0 && truncate != 1.0) || + !std::isfinite(fast) || !std::isfinite(slow) || slow <= 0.0 || fast < slow || + !std::isfinite(magnitude) || magnitude <= 0.0 || !std::isfinite(g.theta) || g.theta <= 1.0f || + rot < 2 || (rot & 1)) { + fprintf(stderr, "radiance: %s YaRN needs finite factor >= 1, original context > 0, " + "beta_fast >= beta_slow > 0 and attention_factor > 0\n", prefix); + return RAD_E_INVAL; + } + /* mscale variants are a different contract; never silently ignore them. */ + for (const char* k : {"mscale", "mscale_all_dim"}) + if (rad_meta_gets(meta, (home + k).c_str(), nullptr)) { + fprintf(stderr, "radiance: %s YaRN %s is unsupported; use attention_factor\n", prefix, k); + return RAD_E_UNSUPPORTED; + } + auto correction = [&](double beta) { + return rot * std::log(original / (beta * 2.0 * 3.14159265358979323846)) / + (2.0 * std::log((double)g.theta)); + }; + double low = correction(fast), high = correction(slow); + if (truncate != 0.0) { low = std::floor(low); high = std::ceil(high); } + g.yarn = {(float)factor, (float)std::max(0.0, low), + (float)std::min((double)rot - 1, high), (float)magnitude}; + if (!rad_yarn_valid(g.yarn)) return RAD_E_INVAL; + g.rope_scale = 1.0f; /* YaRN blends frequencies; it does not divide positions. */ + return RAD_OK; +} + inline rad_op decl_rope(RadBuilder* b, const Geom& g, int64_t rows, int64_t head_dim, int64_t n_head, int64_t n_head_kv, int64_t rot, const char* mode) { if (g.rope_mc) - return RAD_OP(b, "rope", + return decl_rotary(b, g, "rope", RAD_PARAMS(RAD_RANGE("M", 1, rows), RAD_INT("head_dim", head_dim), RAD_INT("n_head", n_head), RAD_INT("n_head_kv", n_head_kv), RAD_F64("theta", g.theta), RAD_F64("scale", g.rope_scale), RAD_STR("mode", g.rope_mode), RAD_INT("rotary_dim", rot), RAD_STR("sections", g.rope_sections)), RAD_NOWEIGHTS); - return RAD_OP(b, "rope", + return decl_rotary(b, g, "rope", RAD_PARAMS(RAD_RANGE("M", 1, rows), RAD_INT("head_dim", head_dim), RAD_INT("n_head", n_head), RAD_INT("n_head_kv", n_head_kv), RAD_F64("theta", g.theta), RAD_F64("scale", g.rope_scale), diff --git a/arch/common/rad_block_dflash2.h b/arch/common/rad_block_dflash2.h index 3033b210..8a99535e 100644 --- a/arch/common/rad_block_dflash2.h +++ b/arch/common/rad_block_dflash2.h @@ -538,7 +538,7 @@ inline int Dflash2::declare(RadBuilder* b, Names& nm, const Geom& geom, const Co * V heads that follow alone, so a K-only tensor is described by n_head = n_head_kv and * n_head_kv = 0: all the heads there are rotate, none follow them. Weightless, so one op * serves every layer. */ - op_crope = rw(b, RAD_OP(b, "rope", + op_crope = rw(b, decl_rotary(b, g, "rope", RAD_PARAMS(RAD_RANGE("M", 1, crows), RAD_INT("head_dim", g.head_dim), RAD_INT("n_head", g.n_head_kv), RAD_INT("n_head_kv", 0), RAD_F64("theta", g.theta), RAD_F64("scale", g.rope_scale), @@ -712,14 +712,14 @@ inline int Dflash2::declare(RadBuilder* b, Names& nm, const Geom& geom, const Co RAD_WEIGHTS(w_fcb[i])), {w.h, w.coef}, {w.h2}); } - op_qrope = rw(b, RAD_OP(b, "rope", + op_qrope = rw(b, decl_rotary(b, g, "rope", RAD_PARAMS(RAD_RANGE("M", 1, qrows), RAD_INT("head_dim", g.head_dim), RAD_INT("n_head", g.n_head), RAD_INT("n_head_kv", 0), RAD_F64("theta", g.theta), RAD_F64("scale", g.rope_scale), RAD_STR("mode", "neox")), RAD_NOWEIGHTS), {w.q}, {w.q}); - op_krope = rw(b, RAD_OP(b, "rope", + op_krope = rw(b, decl_rotary(b, g, "rope", RAD_PARAMS(RAD_RANGE("M", 1, qrows), RAD_INT("head_dim", g.head_dim), RAD_INT("n_head", g.n_head_kv), RAD_INT("n_head_kv", 0), RAD_F64("theta", g.theta), RAD_F64("scale", g.rope_scale), diff --git a/arch/qwen35_bf16/qwen35_bf16.cpp b/arch/qwen35_bf16/qwen35_bf16.cpp index 8315c4b2..18d73225 100644 --- a/arch/qwen35_bf16/qwen35_bf16.cpp +++ b/arch/qwen35_bf16/qwen35_bf16.cpp @@ -237,6 +237,8 @@ static int declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* c return RAD_E_INVAL; } + RAD_ARCH_TRY(yarn_from(g, meta, "", m.n_rot)); + /* The linear-attention geometry. llama.cpp maps the GGUF ssm keys onto these: * ssm.state_size -> the key AND value head width, ssm.group_count -> key heads, * ssm.time_step_rank -> value heads, ssm.inner_size -> value heads * value width. */ diff --git a/arch/qwen35_fp8/qwen35_fp8.cpp b/arch/qwen35_fp8/qwen35_fp8.cpp index 31a3bf7e..fec43f62 100644 --- a/arch/qwen35_fp8/qwen35_fp8.cpp +++ b/arch/qwen35_fp8/qwen35_fp8.cpp @@ -340,6 +340,7 @@ static int declare_dflash2(RadBuilder* b, const RadModelMeta* meta, const RadBui dg.theta = (float)rad_meta_getf(meta, "draft.rope_parameters.rope_theta", rad_meta_getf(meta, "draft.rope_theta", 0.0)); dg.rope_scale = 1.0f; + RAD_ARCH_TRY(yarn_from(dg, meta, "draft.", dg.head_dim)); /* PLAIN RMS NORM. The drafter uses the ordinary norm where the trunk uses GemmaRMSNorm, and * the checkpoint agrees rather than only vLLM -- rad_block_dflash2.h has the numbers. Two * conventions in one process, which is exactly why this is a second Geom and not a flag. */ @@ -635,6 +636,7 @@ static int declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* c return RAD_E_INVAL; } + RAD_ARCH_TRY(yarn_from(g, meta, "", m.n_rot)); GdnFP8::Config& gc = m.gcfg; const int64_t n_head_k_all = meta_int2(meta, "qwen35.ssm.group_count", "linear_num_key_heads", 0); @@ -952,7 +954,7 @@ static int declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* c * which is why `aw.cos_sin` is cleared rather than left pointing at a plane nothing fills. Its * band is the fused prologue's (qk_fuse_rows), so a step the prologue does not serve -- a * prefill chunk, where the fill's grid is one block a TOKEN -- issues no fill either. */ - m.op_rope_cs = rw(b, RAD_OP(b, "rope_table", + m.op_rope_cs = rw(b, decl_rotary(b, g, "rope_table", RAD_PARAMS(RAD_RANGE("M", 1, qk_fuse_rows(g)), RAD_INT("rot", m.n_rot), RAD_F64("theta", g.theta), RAD_F64("scale", g.rope_scale), RAD_STR("dtype", "f32")), diff --git a/docs/OPS.md b/docs/OPS.md index 887081ab..ff31f5fd 100644 --- a/docs/OPS.md +++ b/docs/OPS.md @@ -371,8 +371,8 @@ that folds dequantisation into its epilogue still receives them. | `attn_paged` | `q_len`(range) `head_dim` `gqa` `block_size`/der `causal` `window` `q_dtype` `kv_dtype` `scale`:f64/opt `max_ctx`/opt `n_head`/opt `max_seqs`/opt | `q`, `kv_cache`, `block_table`, `seqused`, `k_descale`?, `v_descale`?, `cu_seqlens`? → `out` | | `attn_dense` | `M`(range) `head_dim` `gqa` `causal` `dtype` `scale`:f64/opt `max_seqlen`/opt | `q`, `k`, `v`, `cu_seqlens` → `out` | | `kv_store` | `M`(range) `head_dim` `n_head_kv` `block_size` `kv_dtype` `k_scale`:f64/opt `v_scale`:f64/opt | `k`, `v`, `slot_mapping`, `kv_cache`:inout | -| `rope` | `M`(range) `head_dim` `n_head` `n_head_kv` `theta`:f64 `scale`:f64 `mode` `rotary_dim`/opt `sections`/opt | `qkv`:inout, `positions` | -| `rope_table` | `M`(range) `rot` `theta`:f64 `scale`:f64 `dtype` | `positions` → `cos_sin` | +| `rope` | `M`(range) `head_dim` `n_head` `n_head_kv` `theta`:f64 `scale`:f64 `mode` `rotary_dim`/opt `sections`/opt `yarn_factor`:f64/opt `yarn_low`:f64/opt `yarn_high`:f64/opt `yarn_magnitude`:f64/opt | `qkv`:inout, `positions` | +| `rope_table` | `M`(range) `rot` `theta`:f64 `scale`:f64 `dtype` `yarn_factor`:f64/opt `yarn_low`:f64/opt `yarn_high`:f64/opt `yarn_magnitude`:f64/opt | `positions` → `cos_sin` | | `qk_norm_rope` | `M`(range) `head_dim` `n_head` `n_head_kv` `theta`:f64 `eps`:f64 `scale`:f64/opt `mode`/opt `rotary_dim`/opt `wadd`:f64/opt | `qkv`:inout, `positions`, `q_w`w, `k_w`w | `attn_paged` is the ranged op whose band is `q_len`, not `M`: one query row at decode, up to 64 at diff --git a/docs/YARN.md b/docs/YARN.md new file mode 100644 index 00000000..f3b346d4 --- /dev/null +++ b/docs/YARN.md @@ -0,0 +1,85 @@ +# Static YaRN for Qwen dense FP8 and DFlash2 + +Increasing `--max-model-len` reserves a larger serving window; it does not change +the model's rotary embeddings. A Qwen checkpoint trained at 262144 positions can +explicitly request static YaRN for a 524288-token deployment. Whether that extension +preserves useful accuracy must be measured on the model and workload. + +The Qwen dense FP8 architecture reads the target's `text_config.rope_parameters`, +then `rope_parameters`, then their legacy `rope_scaling` spellings, in that order. +The first object with `rope_type` (or legacy `type`) is authoritative. The DFlash2 +drafter reads its own `draft.rope_parameters` / `draft.rope_scaling`; it does not +inherit the target's scaling. The vision tower keeps its original axial rotations. + +## Metadata + +| Key within the rotary object | Meaning | +| --- | --- | +| `rope_type` | `yarn`; default/absent preserves stock behavior; `linear` divides positions uniformly | +| `factor` | finite number >= 1, required for YaRN | +| `original_max_position_embeddings` | positive integer, required; the **training** length, not the enlarged deployment/table length | +| `beta_fast`, `beta_slow` | defaults 32 and 1; finite, fast >= slow > 0 | +| `attention_factor` | positive finite cos/sin multiplier; default 1 + 0.1 ln(factor) for factor > 1, otherwise 1 | +| `truncate` | 1 (default): floor/ceil correction bounds; 0: retain fractional bounds | + +`mscale` and `mscale_all_dim` variants are refused; specify `attention_factor` +explicitly. Other explicit rotary types are refused in this architecture. Rotary +width (including partial rotary), theta and M-RoPE section selection are unchanged. + +## Convert a separate container + +Use the original target and drafter checkpoints, the same quantization recipe, +and a **new output path**. `--reuse` is valid only for the same source weights and +recipe; it is not a way to mix weights from different model revisions. + +```sh +rad-convert /checkpoints/Qwen3.8-27B-FP8 \ + --draft-model /checkpoints/Qwen3.8-27B-DFlash2 \ + --recipe data/recipes/q38-27b-fp8-df2.recipe \ + --reuse /models/qwen3.8-27b-fp8.rad \ + --set text_config.rope_parameters.rope_type=yarn \ + --set text_config.rope_parameters.factor=2 \ + --set text_config.rope_parameters.original_max_position_embeddings=262144 \ + --set draft.rope_parameters.rope_type=yarn \ + --set draft.rope_parameters.factor=2 \ + --set draft.rope_parameters.original_max_position_embeddings=262144 \ + --max-ctx 524288 --kv-cache-dtype bf16 \ + -o /models/qwen3.8-27b-fp8-yarn2.rad +``` + +Run with `--plan-only` first. `--max-ctx` is the converter's graph bound, not a +replacement for the explicit YaRN metadata or the server's `--max-model-len`. +The bundled `.rad` by itself is not a converter input; keep the source checkpoints. +Check both target and draft settings with `rad-info --meta` after conversion. + +Serve on enough memory for the requested window: + +```sh +radiance --model /models/qwen3.8-27b-fp8-yarn2.rad \ + --tp 4 --max-model-len 524288 --max-num-seqs 32 --kv-cache-dtype bf16 +``` + +That cache flag controls **both** target and drafter KV. Startup capacity and +successful actual long requests must be checked; the command is not a promise +of concurrency or accuracy. Keep the unmodified model and serving setup until +long-context quality and speed meet the deployment's requirements. + +## Kernel and test contract + +`rope` and `rope_table` take optional resolved coefficients `yarn_factor`, +`yarn_low`, `yarn_high`, `yarn_magnitude`. Absent factor is the original path. +With YaRN, `scale` must be 1: inverse frequencies are blended rather than all +positions being divided. Axial rotary with YaRN is refused. Rebuild the bundled +plugins together because their shared op schemas must match. + +The math follows the static YaRN formulation (Peng et al.) and is checked against +independent vLLM `YaRNScalingRotaryEmbedding` FP32 vectors for each backend. The fixture generator +is `tests/data/generate_yarn_reference.py`; it is not a runtime dependency. +Vectors cover target rotary width 64, draft width 128, an additional width 256, +and positions through 524287. +The CPU fixture uses torch CPU; the HIP fixture uses torch ROCm on gfx1201 +(`generate_yarn_reference.py cuda`). CPU and ROCm `pow` differ by a few ULPs; +at 524K positions their cos/sin values can differ by 0.033 even within torch. +Compare each implementation against its backend's independent vectors. +The numerical check allows 0.004 absolute cos/sin error; fused versus unfused HIP rotation is checked +byte-for-byte separately. Existing stock rotary tests remain active. diff --git a/libavx/avx_attn.cpp b/libavx/avx_attn.cpp index 67be512f..a63d8981 100644 --- a/libavx/avx_attn.cpp +++ b/libavx/avx_attn.cpp @@ -54,6 +54,7 @@ */ #include "avx_vec.h" #include "avx_common.h" +#include "rad_yarn.h" using namespace avx; @@ -836,6 +837,12 @@ AVX_KERNEL(rope) { } } const int pair_mode = mode == ROPE_GPTJ ? ROPE_GPTJ : ROPE_NEOX; + const RadYarn yarn = rad_yarn_args(a); + if (!rad_yarn_valid(yarn)) return RAD_E_INVAL; + if (yarn.factor != 0.0f) { + if (mode == ROPE_AXIAL || rscale != 1.0f) return RAD_E_UNSUPPORTED; + for (int64_t i = 0; i < half; ++i) invf[i] = yarn.frequency(invf[i], (int)i); + } const int64_t pcs = multi ? pos->stride[0] : 0, pms = multi ? pos->stride[1] : 0; AVX_PARALLEL_FOR_IF(M * (n_head + n_head_kv) * rot >= AVX_PAR_MIN) @@ -851,6 +858,8 @@ AVX_KERNEL(rope) { } else { angles(cs, invf, half, (float)ldi(pos, offlin(pos, m)) / div); } + if (yarn.factor != 0.0f) + for (int64_t i = 0; i < rot; ++i) cs[i] *= yarn.magnitude; /* Q heads then K heads. The V heads that follow are left alone, which is the whole reason * this op takes the fused qkv rather than two tensors. */ for (int64_t h = 0; h < n_head + n_head_kv; ++h) @@ -953,7 +962,11 @@ AVX_KERNEL(rope_table) { if (M <= 0 || numel(cs) % rot) return RAD_E_SHAPE; const int64_t rows = numel(cs) / rot; const int64_t half = rot / 2; - const float* invf = inv_freqs(half, rot, theta); + float* invf = inv_freqs(half, rot, theta); + const RadYarn yarn = rad_yarn_args(a); + if (!rad_yarn_valid(yarn) || (yarn.factor != 0.0f && rscale != 1.0f)) return RAD_E_INVAL; + if (yarn.factor != 0.0f) + for (int64_t i = 0; i < half; ++i) invf[i] = yarn.frequency(invf[i], (int)i); AVX_PARALLEL_FOR_IF(M * rot >= AVX_PAR_MIN) for (int64_t m = 0; m < M; ++m) { @@ -962,6 +975,8 @@ AVX_KERNEL(rope_table) { const float p = (float)pp / (rscale != 0.0f ? rscale : 1.0f); float* buf = scratch_f32((size_t)rot); angles(buf, invf, half, p); + if (yarn.factor != 0.0f) + for (int64_t i = 0; i < rot; ++i) buf[i] *= yarn.magnitude; /* `cs` may be strided, and offlin has to be evaluated per element there -- which is what * libref does unconditionally. The dense case is one row store. */ if (rad_tensor_is_contiguous(cs)) { diff --git a/libavx/avx_cases.cpp b/libavx/avx_cases.cpp index 5fdf8d12..bbcfc12e 100644 --- a/libavx/avx_cases.cpp +++ b/libavx/avx_cases.cpp @@ -206,6 +206,17 @@ std::vector build_cases() { } add("rope_table", { HI("M", 12), HI("rot", 64), HF("theta", 10000.0), HF("scale", 1.0), HS("dtype", "f32") }); + for (const char* dt : { "f32", "bf16" }) { + for (const char* mode : { "neox", "gptj", "imrope" }) + add("rope", { HI("M", 12), HI("head_dim", 128), HI("n_head", 4), HI("n_head_kv", 2), + HF("theta", 1e7), HF("scale", 1), HS("mode", mode), + HI("rotary_dim", 64), HS("sections", "11 11 10"), HS("dtype", dt), + HF("yarn_factor", 2), HF("yarn_low", 14), HF("yarn_high", 22), + HF("yarn_magnitude", 1.069314718) }); + add("rope_table", { HI("M", 12), HI("rot", 64), HF("theta", 1e7), HF("scale", 1), + HS("dtype", dt), HF("yarn_factor", 2), HF("yarn_low", 14), + HF("yarn_high", 22), HF("yarn_magnitude", 1.069314718) }); + } /* The multi-component forms: Qwen3-VL's interleaved M-RoPE over a partial rotary, and a vision * tower's 2-D axial rotary over a whole 72-wide head. */ for (const char* dt : { "f32", "bf16" }) { diff --git a/libavx/avx_registry.cpp b/libavx/avx_registry.cpp index 15947922..99d761c6 100644 --- a/libavx/avx_registry.cpp +++ b/libavx/avx_registry.cpp @@ -218,11 +218,15 @@ static const RadOperandSpec oKvStore[] = { OPD("k"), OPD("v"), OPD("slot_mapping static const RadParamSpec pRope[] = { P_INT("M"), P_INT("head_dim"), P_INT("n_head"), P_INT("n_head_kv"), P_F64("theta"), P_F64("scale"), - P_STR("mode"), P_INTO("rotary_dim"), P_STRO("sections") }; + P_STR("mode"), P_INTO("rotary_dim"), P_STRO("sections"), + P_F64O("yarn_factor"), P_F64O("yarn_low"), + P_F64O("yarn_high"), P_F64O("yarn_magnitude") }; static const RadOperandSpec oRope[] = { INOUT("qkv"), OPD("positions") }; static const RadParamSpec pRopeTable[] = { P_INT("M"), P_INT("rot"), P_F64("theta"), - P_F64("scale"), P_STR("dtype") }; + P_F64("scale"), P_STR("dtype"), + P_F64O("yarn_factor"), P_F64O("yarn_low"), + P_F64O("yarn_high"), P_F64O("yarn_magnitude") }; static const RadOperandSpec oRopeTable[] = { OPD("positions"), OUT("cos_sin") }; static const RadParamSpec pQkNormRope[] = { P_INT("M"), P_INT("head_dim"), P_INT("n_head"), diff --git a/libr4d/r4d_model_bf16.hip b/libr4d/r4d_model_bf16.hip index 2ccae110..3e361f2e 100644 --- a/libr4d/r4d_model_bf16.hip +++ b/libr4d/r4d_model_bf16.hip @@ -45,6 +45,7 @@ #include "r4d_args.h" #include "r4d_emit.h" #include "r4d_common.h" +#include "rad_yarn.h" #include "r4d_fp8_wmma.h" #include @@ -356,7 +357,7 @@ __global__ __launch_bounds__(kThreads) void rope_kernel( uint16_t* __restrict__ qkv, const int32_t* __restrict__ pos, uint32_t head_dim, uint32_t n_rope_heads, uint32_t rot, int gptj, float theta, float rscale, uint32_t row_pitch, - int mode, int s0, int s1, int s2, int n_sec, uint32_t plane) { + int mode, int s0, int s1, int s2, int n_sec, uint32_t plane, RadYarn yarn) { const uint32_t m = blockIdx.x; const uint32_t half = rot / 2; const float div = rscale != 0.0f ? rscale : 1.0f; @@ -376,9 +377,11 @@ __global__ __launch_bounds__(kThreads) void rope_kernel( if (mode == 4) inv = 1.0f / powf(theta, (float)(2 * j) / (float)(2 * sec[c])); } + inv = yarn.frequency(inv, (int)i); const float ang = p * inv; float c, s; sincosf(ang, &s, &c); + if (yarn.factor != 0.0f) { c *= yarn.magnitude; s *= yarn.magnitude; } const uint32_t i0 = gptj ? 2 * i : i; const uint32_t i1 = gptj ? 2 * i + 1 : i + half; const float x0 = bf2f(hd[i0]), x1 = bf2f(hd[i1]); @@ -787,7 +790,7 @@ extern "C" int r4d_rope_mc_bf16(long qkv, long pos, int M, int head_dim, int n_r hipLaunchKernelGGL(rope_kernel, dim3((uint32_t)M, gy), dim3(kThreads), 0, (hipStream_t)stream, (uint16_t*)qkv, (const int32_t*)pos, (uint32_t)head_dim, (uint32_t)n_rope_heads, (uint32_t)rot, gptj, theta, rscale, - (uint32_t)row_pitch, mode, s0, s1, s2, n_sec, (uint32_t)plane); + (uint32_t)row_pitch, mode, s0, s1, s2, n_sec, (uint32_t)plane, RadYarn{}); return hipGetLastError() == hipSuccess ? 0 : -4; } @@ -1384,6 +1387,18 @@ extern "C" int r4d_rad_rope(const RadArgs* a, RadStream s) { const float theta = (float)r4d_getf(a, "theta", 10000.0); const float rscale = (float)r4d_getf(a, "scale", 1.0); + const RadYarn yarn = rad_yarn_args(a); + if (!rad_yarn_valid(yarn)) return R4D_NO(RAD_E_INVAL); + if (yarn.factor != 0.0f) { + if (mc == 4 || rscale != 1.0f) return R4D_NO(RAD_E_UNSUPPORTED); + const uint32_t heads = (uint32_t)(n_head + n_head_kv); + const uint32_t gy = (heads * (uint32_t)(rot / 2) + kThreads - 1) / kThreads; + hipLaunchKernelGGL(rope_kernel, dim3((uint32_t)Mp, gy), dim3(kThreads), 0, (hipStream_t)s, + (uint16_t*)r4d_addr(qkv), (const int32_t*)r4d_addr(pos), + (uint32_t)head_dim, heads, (uint32_t)rot, gptj, theta, rscale, + (uint32_t)pitch, mc, sec[0], sec[1], sec[2], n_sec, (uint32_t)plane, yarn); + return hipGetLastError() == hipSuccess ? RAD_OK : RAD_E_DEVICE; + } /* The Q heads and the K heads rotate; the V heads that follow them do not, which is the whole * reason this op takes the fused projection rather than two tensors. */ return r4d_rope_mc_bf16(r4d_addr(qkv), r4d_addr(pos), (int)Mp, (int)head_dim, diff --git a/libr4d/r4d_qk_norm_rope_gate.hip b/libr4d/r4d_qk_norm_rope_gate.hip index ade6e200..c7cd6ce7 100644 --- a/libr4d/r4d_qk_norm_rope_gate.hip +++ b/libr4d/r4d_qk_norm_rope_gate.hip @@ -23,6 +23,7 @@ #include "r4d_args.h" #include "r4d_emit.h" #include "r4d_common.h" +#include "rad_yarn.h" #include #include #include @@ -205,7 +206,7 @@ __global__ __launch_bounds__(256) void r4d_qk_norm_rope_gate_kernel( // those here silently changes the model's output -- a different rope is a different model. __global__ __launch_bounds__(64) void r4d_qk_rope_table_kernel( const void* __restrict__ POS, void* __restrict__ CS, long rows, int rot, float theta, - float rscale, int cs_f32, int pos_i64) { + float rscale, int cs_f32, int pos_i64, RadYarn yarn) { const int m = blockIdx.x; const long pp = pos_i64 ? ((const long*)POS)[m] : (long)((const int*)POS)[m]; // A padded row addresses no table row, and a position at or past the table's height writes @@ -216,9 +217,10 @@ __global__ __launch_bounds__(64) void r4d_qk_rope_table_kernel( const float p = (float)pp / (rscale != 0.0f ? rscale : 1.0f); const size_t o = (size_t)pp * rot; for (int i = threadIdx.x; i < half; i += (int)blockDim.x) { - const float inv = 1.0f / powf(theta, (float)(2 * i) / (float)rot); + const float inv = yarn.frequency(1.0f / powf(theta, (float)(2 * i) / (float)rot), i); float c, s; sincosf(p * inv, &s, &c); + if (yarn.factor != 0.0f) { c *= yarn.magnitude; s *= yarn.magnitude; } if (cs_f32) { ((float*)CS)[o + i] = c; ((float*)CS)[o + half + i] = s; @@ -386,8 +388,10 @@ static int rad_rope_table_body(const RadArgs* args, const R4dSink& sk) { const float theta = (float)r4d_getf(args, "theta", 10000.0); const float rscale = (float)r4d_getf(args, "scale", 1.0); + const RadYarn yarn = rad_yarn_args(args); + if (!rad_yarn_valid(yarn) || (yarn.factor != 0.0f && rscale != 1.0f)) return R4D_NO(RAD_E_INVAL); return R4D_EMIT(sk, r4d_qk_rope_table_kernel, dim3((int)M), dim3(64), 0, r4d_p(po), r4d_wp(cs), (long)(r4d_numel(cs) / rot), (int)rot, theta, rscale, - cs->dtype == RAD_F32 ? 1 : 0, po->dtype == RAD_I64 ? 1 : 0); + cs->dtype == RAD_F32 ? 1 : 0, po->dtype == RAD_I64 ? 1 : 0, yarn); } R4D_ENTRY(r4d_rad_rope_table, rad_rope_table_body) diff --git a/libr4d/r4d_rows.cpp b/libr4d/r4d_rows.cpp index 015165f2..62007a40 100644 --- a/libr4d/r4d_rows.cpp +++ b/libr4d/r4d_rows.cpp @@ -276,6 +276,10 @@ static const RadParamSpec pRopeTable[] = { P_F64("theta"), P_F64("scale"), { "dtype", RAD_P_STR, RAD_REQUIRED }, + { "yarn_factor", RAD_P_F64, RAD_OPTIONAL }, + { "yarn_low", RAD_P_F64, RAD_OPTIONAL }, + { "yarn_high", RAD_P_F64, RAD_OPTIONAL }, + { "yarn_magnitude", RAD_P_F64, RAD_OPTIONAL }, }; static const RadOperandSpec oRopeTable[] = { { "positions", RAD_OPD_IN, 0 }, @@ -1574,6 +1578,10 @@ static const RadParamSpec pRope[] = { { "mode", RAD_P_STR, RAD_REQUIRED }, { "rotary_dim", RAD_P_INT, RAD_OPTIONAL }, { "sections", RAD_P_STR, RAD_OPTIONAL }, + { "yarn_factor", RAD_P_F64, RAD_OPTIONAL }, + { "yarn_low", RAD_P_F64, RAD_OPTIONAL }, + { "yarn_high", RAD_P_F64, RAD_OPTIONAL }, + { "yarn_magnitude", RAD_P_F64, RAD_OPTIONAL }, }; /* ---------------------------------------------------------------------- the vision tower */ diff --git a/libr4d/r4d_selftest.cpp b/libr4d/r4d_selftest.cpp index 60bddb38..cf1a8642 100644 --- a/libr4d/r4d_selftest.cpp +++ b/libr4d/r4d_selftest.cpp @@ -45,6 +45,8 @@ #include "rad_abi.h" #include "rad_plugin.h" +#include "../vendor/nlohmann/json.hpp" +#include #include "r4d_args.h" #include "r4d_hc_fp8.h" #include "r4d_fp8_frag.h" @@ -1195,7 +1197,7 @@ static bool restores(const RadKernelInfo* r, const std::vector& lp, in * The q side reads a STRIDED view in the engine (the [q|gate] projection is interleaved per head) * and the unfused norm cannot, so the reference is fed a contiguous copy of the same numbers. The * arithmetic does not depend on the stride; the values are what is being compared. */ -static void qk_prologue_case(const Plugin& pl, uint32_t gain_dt) { +static void qk_prologue_case(const Plugin& pl, uint32_t gain_dt, bool yarn = false, int64_t rot = 64) { if (!sel("qk_norm_rope_gate") && !sel("rope_table_f32")) return; /* THE GAIN'S WIDTH IS RUN BOTH WAYS, because the two callers differ: every architecture plugin * here declares an f32 norm gain and vLLM's declares bf16, and one flag inside the kernel picks @@ -1213,7 +1215,12 @@ static void qk_prologue_case(const Plugin& pl, uint32_t gain_dt) { * one k buffer does, and 4 query heads is not 12: the wave count the launcher picks is a * function of nq + nkv, so a head count the model does not have exercises a launch it does not * make. */ - const int64_t M = 512, nq = 12, nkv = 2, hd = 256, rot = 64, ctx = 4096; + const int64_t M = 512, nq = 12, nkv = 2, hd = 256, ctx = yarn ? 524288 : 4096; + auto add_yarn = [&](std::vector& ps) { + if (!yarn) return; + ps.push_back(PF("yarn_factor", 2)); ps.push_back(PF("yarn_low", rot == 64 ? 14 : 28)); + ps.push_back(PF("yarn_high", rot == 64 ? 22 : 43)); ps.push_back(PF("yarn_magnitude", 1.069314718)); + }; const double theta = 1e7, eps = 1e-6, wadd = 1.0; /* MANY ROWS, because the difference this case is hunting is one bf16 in tens of thousands: two * summation orders for the same mean-square agree to a ULP in f32 and that ULP almost never @@ -1222,6 +1229,10 @@ static void qk_prologue_case(const Plugin& pl, uint32_t gain_dt) { * near the top. */ std::vector pos((size_t)M); for (int64_t i = 0; i < M; ++i) pos[(size_t)i] = (int32_t)((i * 7 + i * i) % ctx); + if (yarn) { + const int32_t edges[] = {0, 1, 4096, 262143, 262144, 500000, 524287}; + std::copy(std::begin(edges), std::end(edges), pos.begin()); + } auto rnd = [](int64_t i) { /* deterministic, and spans the exponent */ const uint32_t x = (uint32_t)(i * 2654435761u + 12345u); @@ -1311,6 +1322,7 @@ static void qk_prologue_case(const Plugin& pl, uint32_t gain_dt) { std::vector ps = { PI("M", M), PI("head_dim", hd), PI("n_head", nh), PI("n_head_kv", 0), PF("theta", theta), PF("scale", 1.0), PS("mode", "neox"), PI("rotary_dim", rot) }; + add_yarn(ps); run_case(rr, ts, ps); } @@ -1319,7 +1331,26 @@ static void qk_prologue_case(const Plugin& pl, uint32_t gain_dt) { std::vector ts = { T(d_p, RAD_I32, { M }), T(d_cs, RAD_F32, { ctx, rot }) }; std::vector ps = { PI("M", M), PI("rot", rot), PF("theta", theta), PF("scale", 1.0), PS("dtype", "f32") }; + add_yarn(ps); run_case(rt, ts, ps); + if (yarn) { + const std::string here = __FILE__; + std::ifstream input(here.substr(0, here.find_last_of('/')) + "/../tests/data/yarn_reference_rocm.json"); + if (!input) { ok("YaRN independent vectors", false, "fixture missing"); return; } + const auto fixture = nlohmann::json::parse(input); + const auto& c = fixture["cases"][rot == 64 ? 0 : 1]; + std::vector row(rot); + double worst = 0.0; + for (size_t m = 0; m < fixture["positions"].size(); ++m) { + st_memcpy(row.data(), (float*)d_cs + (size_t)pos[m] * rot, rot * sizeof(float), hipMemcpyDeviceToHost); + for (int i = 0; i < rot / 2; ++i) { + worst = std::max(worst, std::abs((double)row[i] - c["cos"][m][i].get())); + worst = std::max(worst, std::abs((double)row[rot/2+i] - c["sin"][m][i].get())); + } + } + ok("YaRN GPU table vs independent vLLM through 524287", worst <= 0.004, + ("worst absolute error " + std::to_string(worst)).c_str()); + } } { std::vector ts = { @@ -1381,7 +1412,7 @@ static void qk_prologue_case(const Plugin& pl, uint32_t gain_dt) { " vs " + std::to_string(h_bf16(want[i])); } } - const std::string tag = std::string(gf32 ? "f32 gain, " : "bf16 gain, ") + what; + const std::string tag = std::string(yarn ? "YaRN, " : "") + (gf32 ? "f32 gain, " : "bf16 gain, ") + what; char rate[128]; std::snprintf(rate, sizeof rate, "%lld of %zu differ, worst %.2e of full scale", (long long)n_off, got.size(), worst); @@ -10945,6 +10976,8 @@ static void device_phase(const Plugin& pl) { } qk_prologue_case(pl, RAD_BF16); qk_prologue_case(pl, RAD_F32); + qk_prologue_case(pl, RAD_F32, true); + qk_prologue_case(pl, RAD_F32, true, 128); qk_kv_fold_case(pl, false); qk_kv_fold_case(pl, true); qsa_qprep_case(pl); diff --git a/libref/ref_attn.cpp b/libref/ref_attn.cpp index 81507b53..f0eab16b 100644 --- a/libref/ref_attn.cpp +++ b/libref/ref_attn.cpp @@ -27,6 +27,7 @@ * the two-sided reading libr4d's h128 kernel documents. */ #include "ref_common.h" +#include "rad_yarn.h" /* `row_stride`: which axis carries a row of `cols` elements, at whatever rank the operand arrived * in. Every q/k/v/out below goes through it rather than through `rank >= 3 ? stride[rank-3] : cols` * -- the comment above kv_store shows where that shortcut is wrong. */ @@ -412,11 +413,11 @@ static int rope_freqs(int mode, int64_t rot, float theta, const int64_t* sec, in } static void rope_head(const RadTensor* t, int64_t base, int64_t ds, int64_t rot, int mode, - const RopeFreq& f, const float* pos) { + const RopeFreq& f, const float* pos, float magnitude = 1.0f) { const int64_t half = rot / 2; for (int64_t i = 0; i < half; ++i) { const float ang = pos[f.comp[i]] * f.inv[i]; - const float c = std::cos(ang), s = std::sin(ang); + const float c = std::cos(ang) * magnitude, s = std::sin(ang) * magnitude; const int64_t i0 = (mode == ROPE_GPTJ) ? 2 * i : i; const int64_t i1 = (mode == ROPE_GPTJ) ? 2 * i + 1 : i + half; const float x0 = ldt(t, base + i0 * ds), x1 = ldt(t, base + i1 * ds); @@ -471,6 +472,12 @@ int ref_rope(const RadArgs* a, RadStream) { } RopeFreq f; RAD_REF_TRY(rope_freqs(mode, rot, theta, sec, multi ? n_sec : 0, &f)); + const RadYarn yarn = rad_yarn_args(a); + if (!rad_yarn_valid(yarn)) return RAD_E_INVAL; + if (yarn.factor != 0.0f) { + if (mode == ROPE_AXIAL || rscale != 1.0f) return RAD_E_UNSUPPORTED; + for (int64_t i = 0; i < rot / 2; ++i) f.inv[i] = yarn.frequency(f.inv[i], (int)i); + } const int64_t stride_row = (n_head + 2 * n_head_kv) * head_dim; if (M <= 0 || numel(qkv) < M * stride_row) return RAD_E_SHAPE; @@ -493,7 +500,7 @@ int ref_rope(const RadArgs* a, RadStream) { /* Q heads then K heads. The V heads that follow are left alone, which is the whole reason * this op takes the fused qkv rather than two tensors. */ for (int64_t h = 0; h < n_head + n_head_kv; ++h) - rope_head(qkv, row + h * head_dim * ds, ds, rot, mode, f, p); + rope_head(qkv, row + h * head_dim * ds, ds, rot, mode, f, p, yarn.magnitude); } return RAD_OK; } @@ -577,16 +584,18 @@ int ref_rope_table(const RadArgs* a, RadStream) { const int64_t rows = numel(cs) / rot; const int64_t half = rot / 2; + const RadYarn yarn = rad_yarn_args(a); + if (!rad_yarn_valid(yarn) || (yarn.factor != 0.0f && rscale != 1.0f)) return RAD_E_INVAL; #pragma omp parallel for schedule(static) for (int64_t m = 0; m < M; ++m) { const int64_t pp = ld_int(pos->dtype, pos->data, offlin(pos, m)); if (pp < 0 || pp >= rows) continue; const float p = (float)pp / (rscale != 0.0f ? rscale : 1.0f); for (int64_t i = 0; i < half; ++i) { - const float inv = 1.0f / std::pow(theta, (float)(2 * i) / (float)rot); + const float inv = yarn.frequency(1.0f / std::pow(theta, (float)(2 * i) / (float)rot), (int)i); const float ang = p * inv; - stt(cs, offlin(cs, pp * rot + i), std::cos(ang)); - stt(cs, offlin(cs, pp * rot + half + i), std::sin(ang)); + stt(cs, offlin(cs, pp * rot + i), std::cos(ang) * yarn.magnitude); + stt(cs, offlin(cs, pp * rot + half + i), std::sin(ang) * yarn.magnitude); } } return RAD_OK; diff --git a/libref/ref_registry.cpp b/libref/ref_registry.cpp index 918810f5..f159fc34 100644 --- a/libref/ref_registry.cpp +++ b/libref/ref_registry.cpp @@ -278,14 +278,18 @@ static const RadOperandSpec oKvStore[] = { OPD("k"), OPD("v"), OPD("slot_mapping static const RadParamSpec pRope[] = { P_INT("M"), P_INT("head_dim"), P_INT("n_head"), P_INT("n_head_kv"), P_F64("theta"), P_F64("scale"), - P_STR("mode"), P_INTO("rotary_dim"), P_STRO("sections") }; + P_STR("mode"), P_INTO("rotary_dim"), P_STRO("sections"), + P_F64O("yarn_factor"), P_F64O("yarn_low"), + P_F64O("yarn_high"), P_F64O("yarn_magnitude") }; static const RadOperandSpec oRope[] = { INOUT("qkv"), OPD("positions") }; /* The cos/sin plane a fused prologue reads instead of theta: written at each position's OWN row * of a [max_ctx, rot] table. `rot`, `theta` and `scale` are `rope`'s, spelled the same way, * because the two have to compute the same angles. */ static const RadParamSpec pRopeTable[] = { P_INT("M"), P_INT("rot"), P_F64("theta"), - P_F64("scale"), P_STR("dtype") }; + P_F64("scale"), P_STR("dtype"), + P_F64O("yarn_factor"), P_F64O("yarn_low"), + P_F64O("yarn_high"), P_F64O("yarn_magnitude") }; static const RadOperandSpec oRopeTable[] = { OPD("positions"), OUT("cos_sin") }; static const RadParamSpec pQkNormRope[] = { P_INT("M"), P_INT("head_dim"), P_INT("n_head"), diff --git a/tests/arch_test.cpp b/tests/arch_test.cpp index 7fda62aa..95f0c3d2 100644 --- a/tests/arch_test.cpp +++ b/tests/arch_test.cpp @@ -550,6 +550,34 @@ TEST(declare_is_a_qwen35_trunk) { CHECK_EQ(count_op(b, "silu_mul"), 8); } +TEST(qwen35_bf16_yarn_reaches_every_text_rotary_op) { + RadModelMeta meta = qwen35_meta(); + std::vector keys(meta.kv_key, meta.kv_key + meta.n_kv); + std::vector vals(meta.kv_val, meta.kv_val + meta.n_kv); + keys.insert(keys.end(), {"rope_parameters.rope_type", "rope_parameters.factor", + "rope_parameters.original_max_position_embeddings"}); + vals.insert(vals.end(), {"yarn", "2", "262144"}); + meta.n_kv = (int)keys.size(); meta.kv_key = keys.data(); meta.kv_val = vals.data(); + RadBuildCtx ctx = build_ctx(); + RadBuilder b; + CHECK_OK(qwen35_bf16::declare(&b, &meta, &ctx)); + int rotary = 0; + for (const auto& op : b.ops) if (op.op == "rope") { + ++rotary; + int found = 0; + for (const auto& p : op.p) { + if (p.key == "yarn_factor") { CHECK_EQ(p.dval, 2.0); ++found; } + if (p.key == "yarn_magnitude") { CHECK_NEAR(p.dval, 1.069314718, 1e-7); ++found; } + if (p.key == "scale") CHECK_EQ(p.dval, 1.0); + } + CHECK_EQ(found, 2); + } + CHECK_EQ(rotary, 4); + vals[vals.size()-2] = "nan"; + RadBuilder invalid; + CHECK_EQ(qwen35_bf16::declare(&invalid, &meta, &ctx), RAD_E_INVAL); +} + TEST(the_alternation_puts_full_attention_at_3_and_7) { RadBuilder b; RadModelMeta meta = qwen35_meta(); diff --git a/tests/data/generate_yarn_reference.py b/tests/data/generate_yarn_reference.py new file mode 100644 index 00000000..6cc9c3a3 --- /dev/null +++ b/tests/data/generate_yarn_reference.py @@ -0,0 +1,27 @@ +"""Generate independent YaRN vectors using vLLM (Apache-2.0). + +Run in the reference environment, redirect stdout to yarn_reference.json (CPU) +or pass cuda and redirect to yarn_reference_rocm.json (ROCm/gfx1201). +This script is not a runtime dependency and does not load model weights. +""" +import json +import sys +from types import SimpleNamespace +import torch +from vllm.model_executor.layers.rotary_embedding.yarn_scaling_rope import YaRNScalingRotaryEmbedding + +positions = [0, 1, 4096, 262143, 262144, 500000, 524287] +cases = [] +device = sys.argv[1] if len(sys.argv) > 1 else 'cpu' +with torch.device(device): + for rot in (64, 128, 256): + cfg = SimpleNamespace(base=10000000.0, rotary_dim=rot, max_position_embeddings=262144, + beta_fast=32, beta_slow=1, truncate=True) + inv = YaRNScalingRotaryEmbedding._compute_inv_freq(cfg, 2.0) + phase = torch.tensor(positions, dtype=torch.float32)[:, None] * inv[None, :] + magnitude = 1.0 + 0.1 * __import__('math').log(2.0) + cases.append(dict(rot=rot, theta=cfg.base, factor=2.0, original=262144, + magnitude=magnitude, inv_freq=inv.tolist(), + cos=(phase.cos()*magnitude).tolist(), sin=(phase.sin()*magnitude).tolist())) +print(json.dumps({'reference': f'vLLM YaRNScalingRotaryEmbedding; torch {device} FP32; static factor=2', + 'positions': positions, 'cases': cases}, indent=2)) diff --git a/tests/data/yarn_reference.json b/tests/data/yarn_reference.json new file mode 100644 index 00000000..74637dd1 --- /dev/null +++ b/tests/data/yarn_reference.json @@ -0,0 +1,3497 @@ +{ + "reference": "vLLM YaRNScalingRotaryEmbedding; torch CPU FP32; static factor=2", + "positions": [ + 0, + 1, + 4096, + 262143, + 262144, + 500000, + 524287 + ], + "cases": [ + { + "rot": 64, + "theta": 10000000.0, + "factor": 2.0, + "original": 262144, + "magnitude": 1.0693147180559945, + "inv_freq": [ + 1.0, + 0.6042963862419128, + 0.36517414450645447, + 0.22067339718341827, + 0.1333521455526352, + 0.08058421313762665, + 0.04869675263762474, + 0.02942727319896221, + 0.017782794311642647, + 0.010746078565716743, + 0.006493816617876291, + 0.003924189601093531, + 0.0023713738191872835, + 0.0014330126577988267, + 0.0008659643353894353, + 0.0004905929090455174, + 0.00027669931296259165, + 0.0001552649337099865, + 8.660864841658622e-05, + 4.797585279447958e-05, + 2.6356034140917473e-05, + 1.4334168554341886e-05, + 7.699632078583818e-06, + 4.6528602979378775e-06, + 2.81170673588349e-06, + 1.6991041320579825e-06, + 1.0267624475090997e-06, + 6.204688816069392e-07, + 3.7494712046282075e-07, + 2.2657918918866926e-07, + 1.3692098832507327e-07, + 8.274085416815069e-08 + ], + "cos": [ + [ + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646 + ], + [ + 0.5777531862258911, + 0.8799412846565247, + 0.9988058805465698, + 1.0433841943740845, + 1.0598211288452148, + 1.0658446550369263, + 1.068047046661377, + 1.0688518285751343, + 1.069145679473877, + 1.0692529678344727, + 1.0692921876907349, + 1.069306492805481, + 1.0693117380142212, + 1.069313645362854, + 1.0693143606185913, + 1.0693145990371704, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.0693145990371704, + 1.06931471824646, + 1.06931471824646 + ], + [ + 0.8597189784049988, + 0.9942150712013245, + 1.0025675296783447, + 0.6643202304840088, + 0.9734213352203369, + -1.0467698574066162, + -0.03125664219260216, + 0.4332946836948395, + -0.8934475779533386, + 1.0687097311019897, + 0.11192795634269714, + -0.9986746907234192, + -1.0251615047454834, + 0.9791648387908936, + -0.9826422333717346, + -0.4541783928871155, + 0.45298120379447937, + 0.860262393951416, + 1.002732515335083, + 1.0487347841262817, + 1.0630897283554077, + 1.067472219467163, + 1.0687830448150635, + 1.0691205263137817, + 1.0692437887191772, + 1.0692888498306274, + 1.069305181503296, + 1.0693113803863525, + 1.0693135261535645, + 1.0693142414093018, + 1.0693145990371704, + 1.0693145990371704 + ], + [ + -0.6513853669166565, + 0.9871648550033569, + -0.9953957200050354, + 0.2872334420681, + -0.7212009429931641, + 0.9285621643066406, + -0.36571380496025085, + -0.02881699800491333, + 0.9443736672401428, + -0.5783533453941345, + 0.9698985815048218, + -0.18379777669906616, + 0.986435055732727, + 0.2478526532649994, + 0.7358847260475159, + -1.0480421781539917, + -1.0282130241394043, + -1.0589879751205444, + -0.8090404272079468, + 1.069259524345398, + 0.8666334748268127, + -0.8727647662162781, + -0.4628109335899353, + 0.3677518665790558, + 0.791765034198761, + 0.9649869203567505, + 1.0308140516281128, + 1.0552012920379639, + 1.0641536712646484, + 1.0674290657043457, + 1.068626046180725, + 1.0690631866455078 + ], + [ + -1.0655258893966675, + 0.5742302536964417, + -0.7887967228889465, + 0.5039116740226746, + -0.6103026866912842, + 0.8831673860549927, + -0.316233366727829, + 0.0025070905685424805, + 0.9530443549156189, + -0.5879814028739929, + 0.972791314125061, + -0.17968153953552246, + 0.9874148368835449, + 0.2493443638086319, + 0.7352097034454346, + -1.0481456518173218, + -1.0281323194503784, + -1.0590109825134277, + -0.8089804649353027, + 1.0692589282989502, + 0.8666170239448547, + -0.8727558851242065, + -0.46281829476356506, + 0.3677472174167633, + 0.7917630076408386, + 0.9649860858917236, + 1.0308138132095337, + 1.0552011728286743, + 1.0641536712646484, + 1.0674290657043457, + 1.0686259269714355, + 1.0690631866455078 + ], + [ + -1.0522708892822266, + -0.7683091163635254, + -0.7019533514976501, + -0.7297235727310181, + 0.49248647689819336, + -0.4076384902000427, + 0.5469351410865784, + -0.013338646851480007, + 0.8245336413383484, + 0.6515282988548279, + 0.07713282108306885, + -0.1811583787202835, + -0.279379278421402, + 1.0427840948104858, + 0.9073381423950195, + 1.0354822874069214, + 1.0616787672042847, + -0.6585246324539185, + 0.8328317999839783, + 0.44185671210289, + 0.8754521608352661, + 0.6780965924263, + -0.8121644854545593, + -0.7332826256752014, + 0.17557725310325623, + 0.706089437007904, + 0.93146812915802, + 1.0182678699493408, + 1.0505784749984741, + 1.062459945678711, + 1.0668097734451294, + 1.0683997869491577 + ], + [ + 0.7204014658927917, + 0.16690370440483093, + 0.46298733353614807, + -0.7731164693832397, + -0.23665851354599, + 0.4698231816291809, + -0.8517317771911621, + -1.06899094581604, + 0.6142278909683228, + -0.4332176446914673, + 0.6953068971633911, + -1.0075379610061646, + 0.7525005340576172, + -0.9537095427513123, + -0.05741226673126221, + 0.9852739572525024, + 0.9079124927520752, + 1.0282539129257202, + 0.15483181178569794, + 1.0690927505493164, + 0.33539730310440063, + 0.35535576939582825, + -0.6686892509460449, + -0.8163681030273438, + 0.10319384932518005, + 0.6723594665527344, + 0.9180838465690613, + 1.0132331848144531, + 1.0487200021743774, + 1.0617786645889282, + 1.0665606260299683, + 1.0683088302612305 + ] + ], + "sin": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.899797260761261, + 0.6075667142868042, + 0.38186508417129517, + 0.23405882716178894, + 0.1421731561422348, + 0.08607665449380875, + 0.05205157399177551, + 0.031462475657463074, + 0.019014401361346245, + 0.011490718461573124, + 0.006943884771317244, + 0.0041961828246712685, + 0.002535742474719882, + 0.0015323410043492913, + 0.0009259883081540465, + 0.0005245982320047915, + 0.0002958786499220878, + 0.00016602707910351455, + 9.26119028008543e-05, + 5.130128556629643e-05, + 2.8182896130601875e-05, + 1.5327737855841406e-05, + 8.233329936047085e-06, + 4.975372121407418e-06, + 3.0065993996686302e-06, + 1.8168771021009888e-06, + 1.097932226912235e-06, + 6.634764986301889e-07, + 4.0093647157846135e-07, + 2.422844715965766e-07, + 1.4641162238149263e-07, + 8.847601407069305e-08 + ], + [ + -0.635859489440918, + -0.3936627209186554, + 0.3718767762184143, + -0.8379216194152832, + -0.44258883595466614, + -0.2184189260005951, + -1.0688577890396118, + 0.9775938391685486, + -0.5875248312950134, + 0.03596566617488861, + 1.0634406805038452, + -0.38220784068107605, + -0.30410149693489075, + -0.42973271012306213, + -0.4217204451560974, + 0.9680681824684143, + 0.9686289429664612, + 0.6351240277290344, + 0.3714318573474884, + 0.20878027379512787, + 0.1152130514383316, + 0.06274635344743729, + 0.033718131482601166, + 0.02037789113819599, + 0.012314759194850922, + 0.0074418680742383, + 0.004497116897255182, + 0.002717596711590886, + 0.0016422352055087686, + 0.000992397079244256, + 0.0005997019470669329, + 0.00036239775363355875 + ], + [ + 0.8480159640312195, + 0.41102248430252075, + -0.3906678557395935, + -1.030014991760254, + -0.7894954681396484, + 0.5302888751029968, + -1.0048320293426514, + -1.0689263343811035, + -0.5015896558761597, + 0.8994117379188538, + -0.4502561688423157, + -1.0534002780914307, + -0.4127710163593292, + -1.040193796157837, + 0.7758270502090454, + 0.21222993731498718, + -0.29361870884895325, + 0.14825202524662018, + -0.6992049217224121, + 0.010867959819734097, + 0.6264026761054993, + -0.6178314685821533, + 0.963970959186554, + 1.0040879249572754, + 0.7187086343765259, + 0.4606889486312866, + 0.2843526303768158, + 0.17315985262393951, + 0.10493354499340057, + 0.0634758397936821, + 0.03837253898382187, + 0.023191550746560097 + ], + [ + -0.08993688225746155, + 0.902049720287323, + -0.7219651341438293, + -0.9431368112564087, + -0.878045916557312, + 0.602867603302002, + -1.0214844942092896, + -1.0693117380142212, + -0.4849127233028412, + 0.8931471705436707, + -0.44397181272506714, + -1.0541102886199951, + -0.410421758890152, + -1.039837121963501, + 0.7764667868614197, + 0.21171817183494568, + -0.29390108585357666, + 0.14808638393878937, + -0.6992743611335754, + 0.010918946005403996, + 0.6264254450798035, + -0.6178439855575562, + 0.9639674425125122, + 1.004089593887329, + 0.7187108397483826, + 0.46069058775901794, + 0.28435367345809937, + 0.17316049337387085, + 0.10493393987417221, + 0.0634760782122612, + 0.03837268799543381, + 0.02319163829088211 + ], + [ + 0.19015751779079437, + 0.7437304854393005, + -0.8066569566726685, + -0.7816249132156372, + -0.9491527676582336, + -0.988567054271698, + 0.9188557863235474, + -1.0692315101623535, + 0.6808658242225647, + 0.8479061126708984, + -1.0665291547775269, + 1.053857445716858, + -1.0321731567382812, + 0.23671789467334747, + -0.5658369064331055, + 0.2668529450893402, + 0.12756243348121643, + 0.8424839973449707, + -0.6706900596618652, + -0.9737538695335388, + 0.6140174865722656, + 0.8268125057220459, + -0.6955736875534058, + 0.7782869338989258, + 1.0548015832901, + 0.803039014339447, + 0.5251676440238953, + 0.3264423906803131, + 0.1992960274219513, + 0.1208832636475563, + 0.07314864546060562, + 0.044225383549928665 + ], + [ + -0.7902251482009888, + 1.0562087297439575, + 0.9638862609863281, + -0.7387320399284363, + 1.042797565460205, + 0.9605727791786194, + 0.646519124507904, + 0.026310738176107407, + -0.8753045797348022, + -0.9776279926300049, + -0.8123929500579834, + 0.35819175839424133, + -0.759721577167511, + -0.4836031496524811, + 1.0677722692489624, + -0.4155347943305969, + 0.5649150013923645, + -0.29347580671310425, + 1.0580458641052246, + 0.02178577519953251, + 1.0153534412384033, + 1.0085417032241821, + -0.8344391584396362, + 0.6906352639198303, + 1.0643237829208374, + 0.8314846754074097, + 0.548229992389679, + 0.3417493999004364, + 0.208854541182518, + 0.12672804296016693, + 0.07669580727815628, + 0.04637227579951286 + ] + ] + }, + { + "rot": 128, + "theta": 10000000.0, + "factor": 2.0, + "original": 262144, + "magnitude": 1.0693147180559945, + "inv_freq": [ + 1.0, + 0.7773650288581848, + 0.6042963862419128, + 0.46975886821746826, + 0.36517414450645447, + 0.283873587846756, + 0.22067339718341827, + 0.17154379189014435, + 0.1333521455526352, + 0.10366329550743103, + 0.08058421313762665, + 0.06264335662126541, + 0.04869675263762474, + 0.037855152040719986, + 0.02942727319896221, + 0.02287573181092739, + 0.017782794311642647, + 0.01382372248917818, + 0.010746078565716743, + 0.008353625424206257, + 0.006493816617876291, + 0.005048065911978483, + 0.003924189601093531, + 0.0030505280010402203, + 0.0023713738191872835, + 0.0018434228841215372, + 0.0014330126577988267, + 0.0011139739071950316, + 0.0008659643353894353, + 0.0006507313228212297, + 0.0004884125082753599, + 0.00036611498217098415, + 0.00027406407753005624, + 0.00020485366985667497, + 0.0001528762368252501, + 0.00011388894927222282, + 8.468401210848242e-05, + 6.283809489104897e-05, + 4.6522036427631974e-05, + 3.4356373362243176e-05, + 2.530179153836798e-05, + 1.857602001109626e-05, + 1.3590914932137821e-05, + 9.904783837555442e-06, + 7.699632078583818e-06, + 5.98542510488187e-06, + 4.6528602979378775e-06, + 3.616970843722811e-06, + 2.81170673588349e-06, + 2.1857224510313245e-06, + 1.6991041320579825e-06, + 1.3208241398388054e-06, + 1.0267624475090997e-06, + 7.981692533576279e-07, + 6.204688816069392e-07, + 4.823307904189278e-07, + 3.7494712046282075e-07, + 2.9147076929803006e-07, + 2.2657918918866926e-07, + 1.761347334650054e-07, + 1.3692098832507327e-07, + 1.0643758230344247e-07, + 8.274085416815069e-08, + 6.43198490024588e-08 + ], + "cos": [ + [ + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646 + ], + [ + 0.5777531862258911, + 0.7621692419052124, + 0.8799412846565247, + 0.9534838795661926, + 0.9988058805465698, + 1.0265183448791504, + 1.0433841943740845, + 1.0536197423934937, + 1.0598211288452148, + 1.0635744333267212, + 1.0658446550369263, + 1.067217230796814, + 1.068047046661377, + 1.068548560142517, + 1.0688518285751343, + 1.0690349340438843, + 1.069145679473877, + 1.069212555885315, + 1.0692529678344727, + 1.0692774057388306, + 1.0692921876907349, + 1.0693011283874512, + 1.069306492805481, + 1.0693097114562988, + 1.0693117380142212, + 1.0693129301071167, + 1.069313645362854, + 1.0693141222000122, + 1.0693143606185913, + 1.0693144798278809, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.0693145990371704, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.0693145990371704, + 1.0693145990371704, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646 + ], + [ + 0.8597189784049988, + 0.08865529298782349, + 0.9942150712013245, + 0.09949047118425369, + 1.0025675296783447, + 1.0019184350967407, + 0.6643202304840088, + 0.5102278590202332, + 0.9734213352203369, + -0.9435669183731079, + -1.0467698574066162, + 0.5565336346626282, + -0.03125664219260216, + -0.46909114718437195, + 0.4332946836948395, + 0.9122970700263977, + -0.8934475779533386, + 1.0664433240890503, + 1.0687097311019897, + -1.0077195167541504, + 0.11192795634269714, + -0.27130818367004395, + -0.9986746907234192, + 1.066589593887329, + -1.0251615047454834, + 0.31939542293548584, + 0.9791648387908936, + -0.15932254493236542, + -0.9826422333717346, + -0.9503476619720459, + -0.44551464915275574, + 0.07605954259634018, + 0.4634099006652832, + 0.7144595980644226, + 0.8664352297782898, + 0.9550614953041077, + 1.0056294202804565, + 1.0340903997421265, + 1.0499595403671265, + 1.0587443113327026, + 1.06357741355896, + 1.066220998764038, + 1.0676583051681519, + 1.0684348344802856, + 1.0687830448150635, + 1.068993330001831, + 1.0691205263137817, + 1.069197416305542, + 1.0692437887191772, + 1.0692718029022217, + 1.0692888498306274, + 1.0692991018295288, + 1.069305181503296, + 1.0693089962005615, + 1.0693113803863525, + 1.0693126916885376, + 1.0693135261535645, + 1.0693140029907227, + 1.0693142414093018, + 1.0693143606185913, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704, + 1.06931471824646 + ], + [ + -0.6513853669166565, + -0.19290786981582642, + 0.9871648550033569, + 1.0574928522109985, + -0.9953957200050354, + -0.8994616866111755, + 0.2872334420681, + 1.0369493961334229, + -0.7212009429931641, + 1.054075002670288, + 0.9285621643066406, + -0.9795029759407043, + -0.36571380496025085, + -0.7229933738708496, + -0.02881699800491333, + -0.8900305032730103, + 0.9443736672401428, + -0.037561286240816116, + -0.5783533453941345, + -1.056593656539917, + 0.9698985815048218, + -0.8146253228187561, + -0.18379777669906616, + -0.14840036630630493, + 0.986435055732727, + 0.9032163023948669, + 0.2478526532649994, + -1.057676911354065, + 0.7358847260475159, + 0.6318320631980896, + -0.7666455507278442, + -0.16603565216064453, + -0.9795569181442261, + -1.023470401763916, + -0.7711856961250305, + 0.010757197625935078, + -1.046228289604187, + -0.7716785073280334, + 0.9965856671333313, + -0.9770345091819763, + 1.0046674013137817, + 0.16738855838775635, + -0.9758684039115906, + -0.9143319725990295, + -0.4628109335899353, + 0.0018809328321367502, + 0.3677518665790558, + 0.623598575592041, + 0.791765034198761, + 0.8985382914543152, + 0.9649869203567505, + 1.005854845046997, + 1.0308140516281128, + 1.0459932088851929, + 1.0552012920379639, + 1.0607784986495972, + 1.0641536712646484, + 1.0661948919296265, + 1.0674290657043457, + 1.0681750774383545, + 1.068626046180725, + 1.0688984394073486, + 1.0690631866455078, + 1.0691627264022827 + ], + [ + -1.0655258893966675, + 0.6036512851715088, + 0.5742302536964417, + 1.0150601863861084, + -0.7887967228889465, + -0.7036169171333313, + 0.5039116740226746, + 0.9770159721374512, + -0.6103026866912842, + 1.0670206546783447, + 0.8831673860549927, + -0.9507979154586792, + -0.316233366727829, + -0.7524679899215698, + 0.0025070905685424805, + -0.9033966660499573, + 0.9530443549156189, + -0.022686710581183434, + -0.5879814028739929, + -1.055192232131958, + 0.972791314125061, + -0.8111482262611389, + -0.17968153953552246, + -0.15163138508796692, + 0.9874148368835449, + 0.9042628407478333, + 0.2493443638086319, + -1.0578539371490479, + 0.7352097034454346, + 0.6312658786773682, + -0.767009437084198, + -0.16642247140407562, + -0.9796746969223022, + -1.0234065055847168, + -0.7712987065315247, + 0.01087956503033638, + -1.046209692955017, + -0.7716318368911743, + 0.996603786945343, + -0.9770494103431702, + 1.0046582221984863, + 0.16740818321704865, + -0.975862443447113, + -0.9143375158309937, + -0.46281829476356506, + 0.0018745592096820474, + 0.3677472174167633, + 0.6235953569412231, + 0.7917630076408386, + 0.8985369801521301, + 0.9649860858917236, + 1.0058544874191284, + 1.0308138132095337, + 1.0459930896759033, + 1.0552011728286743, + 1.0607783794403076, + 1.0641536712646484, + 1.0661948919296265, + 1.0674290657043457, + 1.0681750774383545, + 1.0686259269714355, + 1.0688985586166382, + 1.0690631866455078, + 1.0691627264022827 + ], + [ + -1.0522708892822266, + -0.05930701270699501, + -0.7683091163635254, + 0.17716597020626068, + -0.7019533514976501, + 1.0010639429092407, + -0.7297235727310181, + 1.0594686269760132, + 0.49248647689819336, + -0.08763059973716736, + -0.4076384902000427, + 1.0693141222000122, + 0.5469351410865784, + -0.9282023310661316, + -0.013338646851480007, + -0.8363955616950989, + 0.8245336413383484, + 1.0017105340957642, + 0.6515282988548279, + 0.06952807307243347, + 0.07713282108306885, + -0.250789612531662, + -0.1811583787202835, + 0.022245237603783607, + -0.279379278421402, + -0.3626629710197449, + 1.0427840948104858, + -0.6435174345970154, + 0.9073381423950195, + 0.22376880049705505, + 0.7153396606445312, + 0.7096406817436218, + 0.3894338309764862, + -0.3415154218673706, + 0.5414062738418579, + 0.986642062664032, + -0.07425130158662796, + 1.0693094730377197, + -0.31695008277893066, + -0.10736316442489624, + 1.0654970407485962, + -1.0593292713165283, + 0.9320500493049622, + 0.2541821599006653, + -0.8121644854545593, + -1.0574856996536255, + -0.7332826256752014, + -0.2517779469490051, + 0.17557725310325623, + 0.49182772636413574, + 0.706089437007904, + 0.844480037689209, + 0.93146812915802, + 0.9852848649024963, + 1.0182678699493408, + 1.038369059562683, + 1.0505784749984741, + 1.0579793453216553, + 1.062459945678711, + 1.0651706457138062, + 1.0668097734451294, + 1.067800760269165, + 1.0683997869491577, + 1.0687618255615234 + ], + [ + 0.7204014658927917, + -0.9770510196685791, + 0.16690370440483093, + 1.0537045001983643, + 0.46298733353614807, + 0.1564042568206787, + -0.7731164693832397, + 0.8413293361663818, + -0.23665851354599, + 1.0395491123199463, + 0.4698231816291809, + 0.6746538877487183, + -0.8517317771911621, + -0.049967240542173386, + -1.06899094581604, + 0.4353052079677582, + 0.6142278909683228, + -1.0676320791244507, + -0.4332176446914673, + 1.016000509262085, + 0.6953068971633911, + 0.16672539710998535, + -1.0075379610061646, + -1.027222752571106, + 0.7525005340576172, + 0.45829126238822937, + -0.9537095427513123, + 1.0233770608901978, + -0.05741226673126221, + -0.32333067059516907, + 0.030500834807753563, + -1.0176328420639038, + 0.7255676984786987, + 0.8897460699081421, + 0.043200526386499405, + -1.0690957307815552, + 0.9779296517372131, + 0.044390320777893066, + 0.7883260846138, + 0.716148316860199, + 0.8185253143310547, + -1.0169029235839844, + 0.7118510603904724, + 0.4943186342716217, + -0.6686892509460449, + -1.0693081617355347, + -0.8163681030273438, + -0.3419831693172455, + 0.10319384932518005, + 0.4407549202442169, + 0.6723594665527344, + 0.8230066299438477, + 0.9180838465690613, + 0.9770455360412598, + 1.0132331848144531, + 1.0353062152862549, + 1.0487200021743774, + 1.0568535327911377, + 1.0617786645889282, + 1.0647586584091187, + 1.0665606260299683, + 1.0676501989364624, + 1.0683088302612305, + 1.068706750869751 + ] + ], + "sin": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.899797260761261, + 0.7500213384628296, + 0.6075667142868042, + 0.484048068523407, + 0.38186508417129517, + 0.29948970675468445, + 0.23405882716178894, + 0.18253596127033234, + 0.1421731561422348, + 0.11065026372671127, + 0.08607665449380875, + 0.06694166362285614, + 0.05205157399177551, + 0.04046940430998802, + 0.031462475657463074, + 0.024459224194288254, + 0.019014401361346245, + 0.014781438745558262, + 0.011490718461573124, + 0.008932551369071007, + 0.006943884771317244, + 0.005397948436439037, + 0.0041961828246712685, + 0.0032619694247841835, + 0.002535742474719882, + 0.0019711980130523443, + 0.0015323410043492913, + 0.001191188464872539, + 0.0009259883081540465, + 0.0006958364974707365, + 0.0005222666659392416, + 0.000391492125345394, + 0.0002930607588496059, + 0.0002190530503867194, + 0.00016347281052730978, + 0.00012178313045296818, + 9.055386180989444e-05, + 6.719370139762759e-05, + 4.9746697186492383e-05, + 3.6737776099471375e-05, + 2.705557744775433e-05, + 1.9863611669279635e-05, + 1.4532964996760711e-05, + 1.0591331374598667e-05, + 8.233329936047085e-06, + 6.400302936526714e-06, + 4.975372121407418e-06, + 3.867680334224133e-06, + 3.0065993996686302e-06, + 2.337225168957957e-06, + 1.8168771021009888e-06, + 1.4123767186902114e-06, + 1.097932226912235e-06, + 8.534941571269883e-07, + 6.634764986301889e-07, + 5.157634177521686e-07, + 4.0093647157846135e-07, + 3.1167397196441016e-07, + 2.422844715965766e-07, + 1.8834346349194675e-07, + 1.4641162238149263e-07, + 1.1381527542653203e-07, + 8.847601407069305e-08, + 6.877816360884026e-08 + ], + [ + -0.635859489440918, + -1.0656331777572632, + -0.3936627209186554, + 1.064676284790039, + 0.3718767762184143, + 0.3736218810081482, + -0.8379216194152832, + -0.9397348165512085, + -0.44258883595466614, + -0.5031058192253113, + -0.2184189260005951, + -0.9130740761756897, + -1.0688577890396118, + -0.9609305262565613, + 0.9775938391685486, + -0.5578064918518066, + -0.5875248312950134, + 0.07831012457609177, + 0.03596566617488861, + 0.3576805591583252, + 1.0634406805038452, + 1.0343239307403564, + -0.38220784068107605, + -0.07629266381263733, + -0.30410149693489075, + 1.0205000638961792, + -0.42973271012306213, + -1.0573790073394775, + -0.4217204451560974, + 0.490176796913147, + 0.97208571434021, + 1.0666062831878662, + 0.9636831879615784, + 0.7956013083457947, + 0.6266769170761108, + 0.48092788457870483, + 0.36351555585861206, + 0.2721966505050659, + 0.2025315761566162, + 0.14998175203800201, + 0.110621377825737, + 0.08128286898136139, + 0.05949628725647926, + 0.04337019473314285, + 0.033718131482601166, + 0.026213016360998154, + 0.02037789113819599, + 0.015841437503695488, + 0.012314759194850922, + 0.00957314670085907, + 0.0074418680742383, + 0.00578506663441658, + 0.004497116897255182, + 0.0034959057811647654, + 0.002717596711590886, + 0.0021125655621290207, + 0.0016422352055087686, + 0.0012766163563355803, + 0.000992397079244256, + 0.000771454768255353, + 0.0005997019470669329, + 0.0004661873681470752, + 0.00036239775363355875, + 0.0002817153581418097 + ], + [ + 0.8480159640312195, + -1.0517702102661133, + 0.41102248430252075, + -0.158564954996109, + -0.3906678557395935, + -0.5782755613327026, + -1.030014991760254, + 0.2610936164855957, + -0.7894954681396484, + -0.17988857626914978, + 0.5302888751029968, + -0.4289613664150238, + -1.0048320293426514, + 0.7878543734550476, + -1.0689263343811035, + 0.5926885008811951, + -0.5015896558761597, + -1.0686548948287964, + 0.8994117379188538, + -0.1644500195980072, + -0.4502561688423157, + -0.6926901340484619, + -1.0534002780914307, + 1.058967113494873, + -0.4127710163593292, + -0.5723935961723328, + -1.040193796157837, + 0.15733245015144348, + 0.7758270502090454, + 0.862683117389679, + 0.745445191860199, + 1.0563455820083618, + 0.4288382828235626, + -0.3097456097602844, + 0.740747332572937, + -1.069260597229004, + -0.22099833190441132, + -0.7402340173721313, + -0.38762226700782776, + 0.43455445766448975, + 0.3661656677722931, + -1.0561320781707764, + -0.43716686964035034, + 0.55446457862854, + 0.963970959186554, + 1.0693130493164062, + 1.0040879249572754, + 0.8686534762382507, + 0.7187086343765259, + 0.5797093510627747, + 0.4606889486312866, + 0.3628910481929779, + 0.2843526303768158, + 0.22210857272148132, + 0.17315985262393951, + 0.13484381139278412, + 0.10493354499340057, + 0.08162368088960648, + 0.0634758397936821, + 0.04935538396239281, + 0.03837253898382187, + 0.029832005500793457, + 0.023191550746560097, + 0.018028859049081802 + ], + [ + -0.08993688225746155, + -0.8826319575309753, + 0.902049720287323, + 0.33628395199775696, + -0.7219651341438293, + -0.805206298828125, + -0.9431368112564087, + 0.43459609150886536, + -0.878045916557312, + -0.07000716775655746, + 0.602867603302002, + -0.4893029034137726, + -1.0214844942092896, + 0.7597538232803345, + -1.0693117380142212, + 0.5721087455749512, + -0.4849127233028412, + -1.069074034690857, + 0.8931471705436707, + -0.17321480810642242, + -0.44397181272506714, + -0.696758508682251, + -1.0541102886199951, + 1.0585092306137085, + -0.410421758890152, + -0.5707387328147888, + -1.039837121963501, + 0.156138077378273, + 0.7764667868614197, + 0.8630974888801575, + 0.74507075548172, + 1.056284785270691, + 0.4285692274570465, + -0.30995646119117737, + 0.7406296133995056, + -1.0692594051361084, + -0.22108612954616547, + -0.7402825951576233, + -0.3875757157802582, + 0.4345209002494812, + 0.3661910593509674, + -1.056128978729248, + -0.43718013167381287, + 0.5544553995132446, + 0.9639674425125122, + 1.0693130493164062, + 1.004089593887329, + 0.8686556816101074, + 0.7187108397483826, + 0.5797113180160522, + 0.46069058775901794, + 0.36289238929748535, + 0.28435367345809937, + 0.22210940718650818, + 0.17316049337387085, + 0.1348443180322647, + 0.10493393987417221, + 0.08162398636341095, + 0.0634760782122612, + 0.04935557022690773, + 0.03837268799543381, + 0.02983211912214756, + 0.02319163829088211, + 0.018028927966952324 + ], + [ + 0.19015751779079437, + -1.0676687955856323, + 0.7437304854393005, + 1.054535984992981, + -0.8066569566726685, + -0.37590548396110535, + -0.7816249132156372, + 0.14477676153182983, + -0.9491527676582336, + 1.0657179355621338, + -0.988567054271698, + -0.0010927487164735794, + 0.9188557863235474, + 0.5309184789657593, + -1.0692315101623535, + 0.6662405133247375, + 0.6808658242225647, + 0.3741791248321533, + 0.8479061126708984, + -1.067051887512207, + -1.0665291547775269, + -1.039489507675171, + 1.053857445716858, + -1.069083333015442, + -1.0321731567382812, + -1.0059372186660767, + 0.23671789467334747, + -0.8540019392967224, + -0.5658369064331055, + -1.0456392765045166, + -0.7948101162910461, + 0.7999024987220764, + -0.9958791732788086, + 1.0133119821548462, + 0.9221243858337402, + 0.41227594017982483, + -1.066733717918396, + 0.003338152775540948, + -1.021262288093567, + -1.0639111995697021, + 0.09027673304080963, + 0.14579284191131592, + 0.5241341590881348, + -1.0386651754379272, + -0.6955737471580505, + 0.15861226618289948, + 0.7782869338989258, + 1.0392506122589111, + 1.0548015832901, + 0.9494943022727966, + 0.803039014339447, + 0.6559629440307617, + 0.5251676440238953, + 0.41550904512405396, + 0.3264423906803131, + 0.25538918375968933, + 0.1992960274219513, + 0.15528593957424164, + 0.1208832636475563, + 0.09405004978179932, + 0.07314864546060562, + 0.05688077583909035, + 0.044225383549928665, + 0.034383151680231094 + ], + [ + -0.7902251482009888, + -0.4345173239707947, + 1.0562087297439575, + 0.18204641342163086, + 0.9638862609863281, + 1.057814598083496, + -0.7387320399284363, + 0.6599991917610168, + 1.042797565460205, + -0.25054293870925903, + 0.9605727791786194, + 0.8296240568161011, + 0.646519124507904, + -1.0681465864181519, + 0.026310738176107407, + -0.9767002463340759, + -0.8753045797348022, + 0.05996488779783249, + -0.9776279926300049, + 0.33343228697776794, + -0.8123929500579834, + 1.056236982345581, + 0.35819175839424133, + -0.2970648407936096, + -0.759721577167511, + -0.966127872467041, + -0.4836031496524811, + -0.3100537061691284, + 1.0677722692489624, + 1.0192601680755615, + -1.0688796043395996, + -0.32841649651527405, + -0.785484254360199, + 0.5931153297424316, + -1.06844162940979, + -0.02163565531373024, + 0.4325360655784607, + 1.0683929920196533, + -0.722478985786438, + -0.7940815687179565, + 0.6880772709846497, + -0.3306693434715271, + 0.7979361414909363, + -0.9481998682022095, + -0.8344391584396362, + 0.003755486337468028, + 0.6906352639198303, + 1.013154149055481, + 1.0643237829208374, + 0.9742530584335327, + 0.8314846754074097, + 0.6827107667922974, + 0.548229992389679, + 0.4345296621322632, + 0.3417493999004364, + 0.2675352394580841, + 0.208854541182518, + 0.16277137398719788, + 0.12672804296016693, + 0.09860574454069138, + 0.07669580727815628, + 0.059640903025865555, + 0.04637227579951286, + 0.03605266287922859 + ] + ] + }, + { + "rot": 256, + "theta": 10000000.0, + "factor": 2.0, + "original": 262144, + "magnitude": 1.0693147180559945, + "inv_freq": [ + 1.0, + 0.8816831111907959, + 0.7773650288581848, + 0.6853895783424377, + 0.6042963862419128, + 0.5327978730201721, + 0.46975886821746826, + 0.4141784608364105, + 0.36517414450645447, + 0.32196784019470215, + 0.283873587846756, + 0.2502865493297577, + 0.22067339718341827, + 0.19456401467323303, + 0.17154379189014435, + 0.15124726295471191, + 0.1333521455526352, + 0.11757431924343109, + 0.10366329550743103, + 0.09139817208051682, + 0.08058421313762665, + 0.07104974240064621, + 0.06264335662126541, + 0.05523158237338066, + 0.04869675263762474, + 0.04293510317802429, + 0.037855152040719986, + 0.03337624669075012, + 0.02942727319896221, + 0.025945525616407394, + 0.02287573181092739, + 0.020169146358966827, + 0.017782794311642647, + 0.01567878946661949, + 0.01382372248917818, + 0.012188142165541649, + 0.010746078565716743, + 0.009474635124206543, + 0.008353625424206257, + 0.007365249563008547, + 0.006493816617876291, + 0.0057254876010119915, + 0.005048065911978483, + 0.004450793843716383, + 0.003924189601093531, + 0.003459891537204385, + 0.0030505280010402203, + 0.0026895988266915083, + 0.0023713738191872835, + 0.0020908000878989697, + 0.0018434228841215372, + 0.0016253149369731545, + 0.0014330126577988267, + 0.0012634629383683205, + 0.0011139739071950316, + 0.000982171855866909, + 0.0008659643353894353, + 0.0007503421511501074, + 0.0006499576265923679, + 0.0005628234939649701, + 0.0004872095014434308, + 0.00042160949669778347, + 0.00036471226485446095, + 0.0003153767320327461, + 0.00027261016657575965, + 0.00023554862127639353, + 0.00020344088261481375, + 0.00017563349683769047, + 0.00015155834262259305, + 0.000130721484310925, + 0.00011269371316302568, + 9.710194717627019e-05, + 8.362214430235326e-05, + 7.197279774118215e-05, + 6.190945714479312e-05, + 5.3219908295432106e-05, + 4.571993486024439e-05, + 3.924968768842518e-05, + 3.3670494303805754e-05, + 2.8862075851066038e-05, + 2.472014239174314e-05, + 2.1154290152480826e-05, + 1.80861861736048e-05, + 1.5447960322489962e-05, + 1.318084559898125e-05, + 1.123395031754626e-05, + 9.904783837555442e-06, + 8.732879905437585e-06, + 7.699632078583818e-06, + 6.788635801058263e-06, + 5.98542510488187e-06, + 5.277247964841081e-06, + 4.6528602979378775e-06, + 4.102348157175584e-06, + 3.616970843722811e-06, + 3.189021754224086e-06, + 2.81170673588349e-06, + 2.479034037605743e-06, + 2.1857224510313245e-06, + 1.9271144537924556e-06, + 1.6991041320579825e-06, + 1.4980713558543357e-06, + 1.3208241398388054e-06, + 1.1645482800304308e-06, + 1.0267624475090997e-06, + 9.052791938302107e-07, + 7.981692533576279e-07, + 7.037323257463868e-07, + 6.204688816069392e-07, + 5.470569135468395e-07, + 4.823307904189278e-07, + 4.252629253187479e-07, + 3.7494712046282075e-07, + 3.3058452686418605e-07, + 2.9147076929803006e-07, + 2.569848618350079e-07, + 2.2657918918866926e-07, + 1.9977102283519343e-07, + 1.761347334650054e-07, + 1.552950124050767e-07, + 1.3692098832507327e-07, + 1.20720912377692e-07, + 1.0643758230344247e-07, + 9.384421417735211e-08, + 8.274085416815069e-08, + 7.295120951766876e-08, + 6.43198490024588e-08, + 5.6709719586933716e-08 + ], + "cos": [ + [ + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646 + ], + [ + 0.5777531862258911, + 0.6799269914627075, + 0.7621692419052124, + 0.8278340101242065, + 0.8799412846565247, + 0.9210963249206543, + 0.9534838795661926, + 0.978901207447052, + 0.9988058805465698, + 1.0143675804138184, + 1.0265183448791504, + 1.035996437072754, + 1.0433841943740845, + 1.0491390228271484, + 1.0536197423934937, + 1.0571073293685913, + 1.0598211288452148, + 1.0619323253631592, + 1.0635744333267212, + 1.0648515224456787, + 1.0658446550369263, + 1.0666167736053467, + 1.067217230796814, + 1.0676840543746948, + 1.068047046661377, + 1.0683292150497437, + 1.068548560142517, + 1.0687191486358643, + 1.0688518285751343, + 1.0689548254013062, + 1.0690349340438843, + 1.0690972805023193, + 1.069145679473877, + 1.069183349609375, + 1.069212555885315, + 1.0692353248596191, + 1.0692529678344727, + 1.069266676902771, + 1.0692774057388306, + 1.0692857503890991, + 1.0692921876907349, + 1.069297194480896, + 1.0693011283874512, + 1.06930410861969, + 1.069306492805481, + 1.0693084001541138, + 1.0693097114562988, + 1.0693109035491943, + 1.0693117380142212, + 1.0693124532699585, + 1.0693129301071167, + 1.0693132877349854, + 1.069313645362854, + 1.069313883781433, + 1.0693141222000122, + 1.0693142414093018, + 1.0693143606185913, + 1.0693143606185913, + 1.0693144798278809, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704, + 1.06931471824646, + 1.0693145990371704, + 1.0693145990371704, + 1.06931471824646, + 1.0693145990371704, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.0693145990371704, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.0693145990371704, + 1.06931471824646, + 1.0693145990371704, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646 + ], + [ + 0.8597189784049988, + 0.12086046487092972, + 0.08865529298782349, + 0.3592999577522278, + 0.9942150712013245, + -0.5163969397544861, + 0.09949047118425369, + 1.0691953897476196, + 1.0025675296783447, + 0.8256288766860962, + 1.0019184350967407, + 0.5646449327468872, + 0.6643202304840088, + 0.550200879573822, + 0.5102278590202332, + -0.8733654618263245, + 0.9734213352203369, + -0.6471863985061646, + -0.9435669183731079, + -0.9293569326400757, + -1.0467698574066162, + -0.4383901357650757, + 0.5565336346626282, + 1.0687007904052734, + -0.03125664219260216, + 1.0669151544570923, + -0.46909114718437195, + 0.05325764790177345, + 0.4332946836948395, + 0.9164575934410095, + 0.9122970700263977, + 0.6380595564842224, + -0.8934475779533386, + 0.19388730823993683, + 1.0664433240890503, + 1.007080316543579, + 1.0687097311019897, + 0.4764467477798462, + -1.0077195167541504, + 0.339345246553421, + 0.11192795634269714, + -0.11775708943605423, + -0.27130818367004395, + 0.8708483576774597, + -0.9986746907234192, + -0.036936186254024506, + 1.066589593887329, + 0.022478019818663597, + -1.0251615047454834, + -0.6969631910324097, + 0.31939542293548584, + 0.9953558444976807, + 0.9791648387908936, + 0.4773583710193634, + -0.15932254493236542, + -0.6801744699478149, + -0.9826422333717346, + -1.0668294429779053, + -0.9487895369529724, + -0.7166948318481445, + -0.4407193064689636, + -0.16626004874706268, + 0.08218647539615631, + 0.29449692368507385, + 0.4691406190395355, + 0.6090553402900696, + 0.7190515995025635, + 0.8043435215950012, + 0.8698054552078247, + 0.9196605682373047, + 0.9574045538902283, + 0.985846996307373, + 1.0072009563446045, + 1.0231846570968628, + 1.0351183414459229, + 1.044008731842041, + 1.0506192445755005, + 1.055525779724121, + 1.0591614246368408, + 1.0618512630462646, + 1.0638378858566284, + 1.065303087234497, + 1.066381812095642, + 1.0671747922897339, + 1.0677566528320312, + 1.0681829452514648, + 1.0684348344802856, + 1.0686306953430176, + 1.0687830448150635, + 1.0689013004302979, + 1.068993330001831, + 1.069064974784851, + 1.0691205263137817, + 1.0691637992858887, + 1.069197416305542, + 1.0692235231399536, + 1.0692437887191772, + 1.0692596435546875, + 1.0692718029022217, + 1.0692813396453857, + 1.0692888498306274, + 1.0692945718765259, + 1.0692991018295288, + 1.0693025588989258, + 1.069305181503296, + 1.0693074464797974, + 1.0693089962005615, + 1.0693103075027466, + 1.0693113803863525, + 1.0693119764328003, + 1.0693126916885376, + 1.0693131685256958, + 1.0693135261535645, + 1.069313645362854, + 1.0693140029907227, + 1.0693141222000122, + 1.0693142414093018, + 1.0693143606185913, + 1.0693143606185913, + 1.0693144798278809, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704, + 1.06931471824646, + 1.0693145990371704 + ], + [ + -0.6513853669166565, + 1.0648926496505737, + -0.19290786981582642, + -0.7843515872955322, + 0.9871648550033569, + 1.0189357995986938, + 1.0574928522109985, + 0.915911853313446, + -0.9953957200050354, + 0.9802453517913818, + -0.8994616866111755, + -0.2907947599887848, + 0.2872334420681, + -1.055144190788269, + 1.0369493961334229, + 0.06404394656419754, + -0.7212009429931641, + -0.6810116171836853, + 1.054075002670288, + -0.036619432270526886, + 0.9285621643066406, + -0.27625617384910583, + -0.9795029759407043, + -0.5520841479301453, + -0.36571380496025085, + -0.3976605534553528, + -0.7229933738708496, + -1.0692088603973389, + -0.02881699800491333, + -1.062839388847351, + -0.8900305032730103, + -1.063999056816101, + 0.9443736672401428, + 0.6798552870750427, + -0.037561286240816116, + -1.0686062574386597, + -0.5783533453941345, + -0.295753538608551, + -1.056593656539917, + -0.2541494071483612, + 0.9698985815048218, + 0.7565687894821167, + -0.8146253228187561, + -0.37385234236717224, + -0.18379777669906616, + -0.6358828544616699, + -0.14840036630630493, + 0.24174010753631592, + 0.986435055732727, + 0.12726156413555145, + 0.9032163023948669, + 0.39577341079711914, + 0.2478526532649994, + -0.24382933974266052, + -1.057676911354065, + 1.058685541152954, + 0.7358847260475159, + -0.36405718326568604, + 0.7926532030105591, + -1.0622985363006592, + -0.4976309835910797, + -0.9024218916893005, + 0.22480200231075287, + 0.584578275680542, + -0.7497508525848389, + 0.49981385469436646, + -1.0661896467208862, + -0.5013577342033386, + -0.47476762533187866, + -1.0247266292572021, + -0.3193347752094269, + 1.0144059658050537, + -1.0666817426681519, + 1.0691490173339844, + -0.9273503422737122, + 0.1976853907108307, + 0.8937321901321411, + -0.6942081451416016, + -0.8835727572441101, + 0.30371344089508057, + 1.0486266613006592, + 0.7912856340408325, + 0.030768586322665215, + -0.657989501953125, + -1.0171390771865845, + -1.0486968755722046, + -0.9143319725990295, + -0.7038564085960388, + -0.4628109335899353, + -0.22165097296237946, + 0.0018809328321367502, + 0.19922155141830444, + 0.3677518665790558, + 0.508329451084137, + 0.623598575592041, + 0.7169232368469238, + 0.791765034198761, + 0.8513538241386414, + 0.8985382914543152, + 0.9357439875602722, + 0.9649869203567505, + 0.9879140257835388, + 1.005854845046997, + 1.0198732614517212, + 1.0308140516281128, + 1.039345383644104, + 1.0459932088851929, + 1.0511707067489624, + 1.0552012920379639, + 1.058337926864624, + 1.0607784986495972, + 1.062677025794983, + 1.0641536712646484, + 1.0653018951416016, + 1.0661948919296265, + 1.0668891668319702, + 1.0674290657043457, + 1.0678486824035645, + 1.0681750774383545, + 1.0684287548065186, + 1.068626046180725, + 1.0687793493270874, + 1.0688984394073486, + 1.0689911842346191, + 1.0690631866455078, + 1.0691192150115967, + 1.0691627264022827, + 1.0691965818405151 + ], + [ + -1.0655258893966675, + 0.6080281734466553, + 0.6036512851715088, + -1.067401647567749, + 0.5742302536964417, + 0.7141802310943604, + 1.0150601863861084, + 0.616484522819519, + -0.7887967228889465, + 1.0649163722991943, + -0.7036169171333313, + -0.53633713722229, + 0.5039116740226746, + -1.068755865097046, + 0.9770159721374512, + -0.0986805111169815, + -0.6103026866912842, + -0.7727307677268982, + 1.0670206546783447, + -0.1344297081232071, + 0.8831673860549927, + -0.3481474816799164, + -0.9507979154586792, + -0.6021782755851746, + -0.316233366727829, + -0.4399321377277374, + -0.7524679899215698, + -1.0681201219558716, + 0.0025070905685424805, + -1.0655239820480347, + -0.9033966660499573, + -1.0659174919128418, + 0.9530443549156189, + 0.6668764352798462, + -0.022686710581183434, + -1.0680515766143799, + -0.5879814028739929, + -0.3055242598056793, + -1.055192232131958, + -0.2617500126361847, + 0.972791314125061, + 0.7608917951583862, + -0.8111482262611389, + -0.36944615840911865, + -0.17968153953552246, + -0.6388699412345886, + -0.15163138508796692, + 0.23894187808036804, + 0.9874148368835449, + 0.12505802512168884, + 0.9042628407478333, + 0.39737963676452637, + 0.2493443638086319, + -0.24252645671367645, + -1.0578539371490479, + 1.058831810951233, + 0.7352097034454346, + -0.3648087978363037, + 0.7921820878982544, + -1.0623674392700195, + -0.4980930685997009, + -0.902181088924408, + 0.22441914677619934, + 0.5842981934547424, + -0.7499602437019348, + 0.5000373721122742, + -1.0662062168121338, + -0.501523494720459, + -0.4749138057231903, + -1.024766206741333, + -0.3192199170589447, + 1.0143730640411377, + -1.066688060760498, + 1.0691475868225098, + -0.9273179173469543, + 0.19762927293777466, + 0.8937591314315796, + -0.6941763162612915, + -0.8835928440093994, + 0.3036836087703705, + 1.048621416091919, + 0.7913007140159607, + 0.03078795224428177, + -0.6579766869544983, + -1.017134666442871, + -1.048699140548706, + -0.9143375158309937, + -0.7038635611534119, + -0.46281829476356506, + -0.22165808081626892, + 0.0018745592096820474, + 0.19921603798866272, + 0.3677472174167633, + 0.5083256363868713, + 0.6235953569412231, + 0.7169206738471985, + 0.7917630076408386, + 0.8513522148132324, + 0.8985369801521301, + 0.9357430338859558, + 0.9649860858917236, + 0.9879133701324463, + 1.0058544874191284, + 1.019872784614563, + 1.0308138132095337, + 1.039345145225525, + 1.0459930896759033, + 1.0511704683303833, + 1.0552011728286743, + 1.058337926864624, + 1.0607783794403076, + 1.062677025794983, + 1.0641536712646484, + 1.0653018951416016, + 1.0661948919296265, + 1.0668891668319702, + 1.0674290657043457, + 1.067848801612854, + 1.0681750774383545, + 1.0684287548065186, + 1.0686259269714355, + 1.0687793493270874, + 1.0688985586166382, + 1.0689911842346191, + 1.0690631866455078, + 1.0691192150115967, + 1.0691627264022827, + 1.0691965818405151 + ], + [ + -1.0522708892822266, + 0.8074479699134827, + -0.05930701270699501, + -0.9720513820648193, + -0.7683091163635254, + -0.28062352538108826, + 0.17716597020626068, + -0.1693471074104309, + -0.7019533514976501, + -0.810597836971283, + 1.0010639429092407, + 0.511832594871521, + -0.7297235727310181, + 0.9114500880241394, + 1.0594686269760132, + 0.7560088634490967, + 0.49248647689819336, + -0.11486396938562393, + -0.08763059973716736, + 0.09781012684106827, + -0.4076384902000427, + 1.0337498188018799, + 1.0693141222000122, + 0.39584189653396606, + 0.5469351410865784, + -0.5337479710578918, + -0.9282023310661316, + 1.0691578388214111, + -0.013338646851480007, + -0.45949146151542664, + -0.8363955616950989, + 1.0673373937606812, + 0.8245336413383484, + -0.4650532007217407, + 1.0017105340957642, + 0.871248722076416, + 0.6515282988548279, + 1.0470679998397827, + 0.06952807307243347, + 0.8327017426490784, + 0.07713282108306885, + -0.7802234888076782, + -0.250789612531662, + 0.43741264939308167, + -0.1811583787202835, + -0.5117603540420532, + 0.022245237603783607, + 1.048467993736267, + -0.279379278421402, + -0.7821656465530396, + -0.3626629710197449, + -0.5641676187515259, + 1.0427840948104858, + -1.0301964282989502, + -0.6435174345970154, + 0.5800156593322754, + 0.9073381423950195, + -0.26376578211784363, + -0.18724913895130157, + 0.25334858894348145, + 0.14002013206481934, + -1.0156885385513306, + 1.0582853555679321, + 0.8772346377372742, + -0.3708774447441101, + -0.03786427900195122, + 0.39793872833251953, + 1.0576493740081787, + 0.9926570653915405, + -0.8748014569282532, + 1.0476127862930298, + -0.15314719080924988, + -0.6041578054428101, + -0.15124283730983734, + 0.9575930237770081, + 0.09992338716983795, + -0.6904867887496948, + 0.7637256383895874, + -0.45885878801345825, + -0.30973705649375916, + 1.0466406345367432, + -0.43449050188064575, + -0.9923649430274963, + 0.1386214792728424, + 1.0192415714263916, + 0.8406626582145691, + 0.2541821599006653, + -0.3625936806201935, + -0.8121644854545593, + -1.0353474617004395, + -1.0574856996536255, + -0.9368858933448792, + -0.7332826256752014, + -0.49414563179016113, + -0.2517779469490051, + -0.025355977937579155, + 0.17557725310325623, + 0.3477979004383087, + 0.49182772636413574, + 0.6101534366607666, + 0.706089437007904, + 0.7831081748008728, + 0.844480037689209, + 0.8931068181991577, + 0.93146812915802, + 0.9616302847862244, + 0.9852848649024963, + 1.0037990808486938, + 1.0182678699493408, + 1.0295616388320923, + 1.038369059562683, + 1.0452326536178589, + 1.0505784749984741, + 1.054740309715271, + 1.0579793453216553, + 1.0604995489120483, + 1.062459945678711, + 1.0639848709106445, + 1.0651706457138062, + 1.066092848777771, + 1.0668097734451294, + 1.0673673152923584, + 1.067800760269165, + 1.068137764930725, + 1.0683997869491577, + 1.068603515625, + 1.0687618255615234, + 1.0688848495483398 + ], + [ + 0.7204014658927917, + 0.525600016117096, + -0.9770510196685791, + 0.7394928932189941, + 0.16690370440483093, + 0.4391297399997711, + 1.0537045001983643, + 0.08546723425388336, + 0.46298733353614807, + 0.9334536194801331, + 0.1564042568206787, + -0.7443639039993286, + -0.7731164693832397, + 1.0602015256881714, + 0.8413293361663818, + -1.0686066150665283, + -0.23665851354599, + -0.07772661000490189, + 1.0395491123199463, + -1.0552698373794556, + 0.4698231816291809, + -0.8867855668067932, + 0.6746538877487183, + -0.4449033737182617, + -0.8517317771911621, + -0.7411206960678101, + -0.049967240542173386, + 1.0673035383224487, + -1.06899094581604, + 1.0490853786468506, + 0.4353052079677582, + 1.0520436763763428, + 0.6142278909683228, + -0.22120295464992523, + -1.0676320791244507, + 1.0654528141021729, + -0.4332176446914673, + -0.9001201391220093, + 1.016000509262085, + -0.9448631405830383, + 0.6953068971633911, + 0.0075360615737736225, + 0.16672539710998535, + -0.8109739422798157, + -1.0075379610061646, + -0.30941998958587646, + -1.027222752571106, + -0.9612756371498108, + 0.7525005340576172, + -1.0395455360412598, + 0.45829126238822937, + -0.775180459022522, + -0.9537095427513123, + -0.9586957693099976, + 1.0233770608901978, + 1.027299404144287, + -0.05741226673126221, + -0.820920467376709, + 0.10511433333158493, + 1.0414828062057495, + -0.6057157516479492, + 0.4534398913383484, + -0.9749553799629211, + -0.4304531514644623, + -0.017644371837377548, + -0.6018646955490112, + 1.0568652153015137, + -0.5990272164344788, + -0.6475985646247864, + 0.8947566151618958, + -0.8786530494689941, + 0.8552548885345459, + 1.0588085651397705, + 1.0686489343643188, + 0.5390958786010742, + -0.9962427616119385, + 0.4246912896633148, + -0.16798348724842072, + 0.3909064531326294, + -0.8968067765235901, + 0.9873525500297546, + 0.1017996296286583, + -1.0675429105758667, + -0.2595592439174652, + 0.8656955361366272, + 0.9876425862312317, + 0.4943186342716217, + -0.14270439743995667, + -0.6686892509460449, + -0.9774226546287537, + -1.0693081617355347, + -0.995083749294281, + -0.8163681030273438, + -0.5860204100608826, + -0.3419831693172455, + -0.10799416899681091, + 0.10319384932518005, + 0.2863234579563141, + 0.4407549202442169, + 0.5683994293212891, + 0.6723594665527344, + 0.7561036944389343, + 0.8230066299438477, + 0.8761200904846191, + 0.9180838465690613, + 0.9511165618896484, + 0.9770455360412598, + 0.9973538517951965, + 1.0132331848144531, + 1.0256330966949463, + 1.0353062152862549, + 1.0428462028503418, + 1.0487200021743774, + 1.0532935857772827, + 1.0568535327911377, + 1.0596235990524292, + 1.0617786645889282, + 1.0634549856185913, + 1.0647586584091187, + 1.0657724142074585, + 1.0665606260299683, + 1.0671736001968384, + 1.0676501989364624, + 1.0680205821990967, + 1.0683088302612305, + 1.0685327053070068, + 1.068706750869751, + 1.0688421726226807 + ] + ], + "sin": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.899797260761261, + 0.8253079652786255, + 0.7500213384628296, + 0.6768491268157959, + 0.6075667142868042, + 0.5431534647941589, + 0.484048068523407, + 0.43033286929130554, + 0.38186508417129517, + 0.33836743235588074, + 0.29948970675468445, + 0.26484957337379456, + 0.23405882716178894, + 0.20674002170562744, + 0.18253596127033234, + 0.16111500561237335, + 0.1421731561422348, + 0.1254344880580902, + 0.11065026372671127, + 0.0975973978638649, + 0.08607665449380875, + 0.07591063529253006, + 0.06694166362285614, + 0.059029921889305115, + 0.05205157399177551, + 0.04589703306555748, + 0.04046940430998802, + 0.03568308800458908, + 0.031462475657463074, + 0.02774081937968731, + 0.024459224194288254, + 0.02156570367515087, + 0.019014401361346245, + 0.016764873638749123, + 0.014781438745558262, + 0.013032637536525726, + 0.011490718461573124, + 0.010131215676665306, + 0.008932551369071007, + 0.007875698618590832, + 0.006943884771317244, + 0.006122314836829901, + 0.005397948436439037, + 0.004759283270686865, + 0.0041961828246712685, + 0.003699705470353365, + 0.0032619694247841835, + 0.002876024227589369, + 0.002535742474719882, + 0.0022357215639203787, + 0.0019711980130523443, + 0.0017379724886268377, + 0.0015323410043492913, + 0.001351039158180356, + 0.001191188464872539, + 0.0010502507211640477, + 0.0009259883081540465, + 0.0008023518603295088, + 0.0006950091919861734, + 0.0006018353742547333, + 0.000520980276633054, + 0.0004508332349359989, + 0.00038999220123514533, + 0.00033723696833476424, + 0.00029150606133043766, + 0.00025187560822814703, + 0.00021754232875537127, + 0.0001878074835985899, + 0.00016206355940084904, + 0.00013978240895085037, + 0.00012050504301441833, + 0.00010383254266344011, + 8.94183904165402e-05, + 7.696157263126224e-05, + 6.620069325435907e-05, + 5.6908829719759524e-05, + 4.888900002697483e-05, + 4.1970270103774965e-05, + 3.600435593398288e-05, + 3.0862644052831456e-05, + 2.64336122199893e-05, + 2.2620593881583773e-05, + 1.9339824575581588e-05, + 1.6518732081749476e-05, + 1.4094472135184333e-05, + 1.201262875838438e-05, + 1.0591331374598667e-05, + 9.338196832686663e-06, + 8.233329936047085e-06, + 7.259188350872137e-06, + 6.400302936526714e-06, + 5.6430390031891875e-06, + 4.975372121407418e-06, + 4.386701220937539e-06, + 3.867680334224133e-06, + 3.4100678476534085e-06, + 3.0065993996686302e-06, + 2.6508676000958076e-06, + 2.337225168957957e-06, + 2.0606919406418456e-06, + 1.8168771021009888e-06, + 1.6019097301978036e-06, + 1.4123767186902114e-06, + 1.2452686632968835e-06, + 1.097932226912235e-06, + 9.680284165369812e-07, + 8.534941571269883e-07, + 7.525113119299931e-07, + 6.634764986301889e-07, + 5.849760214005073e-07, + 5.157634177521686e-07, + 4.5473990439859335e-07, + 4.0093647157846135e-07, + 3.534989048148418e-07, + 3.1167397196441016e-07, + 2.747976850514533e-07, + 2.422844715965766e-07, + 2.1361809388054098e-07, + 1.8834346349194675e-07, + 1.660592374719272e-07, + 1.4641162238149263e-07, + 1.2908864732708025e-07, + 1.1381527542653203e-07, + 1.0034899844413303e-07, + 8.847601407069305e-08, + 7.800780110756023e-08, + 6.877816360884026e-08, + 6.064053792442792e-08 + ], + [ + -0.635859489440918, + -1.062462568283081, + -1.0656331777572632, + -1.0071431398391724, + -0.3936627209186554, + 0.9363590478897095, + 1.064676284790039, + 0.015977798029780388, + 0.3718767762184143, + -0.6795372366905212, + 0.3736218810081482, + 0.9080803990364075, + -0.8379216194152832, + -0.9169039130210876, + -0.9397348165512085, + -0.6169819235801697, + -0.44258883595466614, + -0.8512248992919922, + -0.5031058192253113, + -0.5288947224617004, + -0.2184189260005951, + 0.975319504737854, + -0.9130740761756897, + 0.03623250871896744, + -1.0688577890396118, + -0.07159688323736191, + -0.9609305262565613, + -1.0679876804351807, + 0.9775938391685486, + -0.5509442090988159, + -0.5578064918518066, + 0.8580873608589172, + -0.5875248312950134, + 1.051590085029602, + 0.07831012457609177, + -0.3594764471054077, + 0.03596566617488861, + 0.957304835319519, + 0.3576805591583252, + -1.0140408277511597, + 1.0634406805038452, + -1.0628108978271484, + 1.0343239307403564, + -0.6205296516418457, + -0.38220784068107605, + 1.0686765909194946, + -0.07629266381263733, + -1.0690784454345703, + -0.30410149693489075, + 0.8109724521636963, + 1.0205000638961792, + 0.3907696306705475, + -0.42973271012306213, + -0.9568504691123962, + -1.0573790073394775, + -0.8251040577888489, + -0.4217204451560974, + 0.07286135107278824, + 0.4931860566139221, + 0.7935883402824402, + 0.9742691516876221, + 1.0563104152679443, + 1.0661516189575195, + 1.0279618501663208, + 0.9609063863754272, + 0.8789116144180298, + 0.7914536595344543, + 0.7046030759811401, + 0.6219906806945801, + 0.5455808639526367, + 0.4762464165687561, + 0.41417354345321655, + 0.35913822054862976, + 0.3106883764266968, + 0.26826128363609314, + 0.2312568575143814, + 0.1990809440612793, + 0.17117063701152802, + 0.1470067799091339, + 0.12611913681030273, + 0.10808715969324112, + 0.09253805875778198, + 0.07914348691701889, + 0.0676155835390091, + 0.057702917605638504, + 0.04918636754155159, + 0.04337019473314285, + 0.03824109956622124, + 0.033718131482601166, + 0.029729802161455154, + 0.026213016360998154, + 0.023112086579203606, + 0.02037789113819599, + 0.01796708256006241, + 0.015841437503695488, + 0.013967241160571575, + 0.012314759194850922, + 0.010857767425477505, + 0.00957314670085907, + 0.008440505713224411, + 0.0074418680742383, + 0.006561380811035633, + 0.00578506663441658, + 0.005100600887089968, + 0.004497116897255182, + 0.003965035080909729, + 0.0034959057811647654, + 0.003082282142713666, + 0.002717596711590886, + 0.002396059688180685, + 0.0021125655621290207, + 0.001862613600678742, + 0.0016422352055087686, + 0.0014479310484603047, + 0.0012766163563355803, + 0.001125571085140109, + 0.000992397079244256, + 0.000874979596119374, + 0.000771454768255353, + 0.0006801785784773529, + 0.0005997019470669329, + 0.0005287470994517207, + 0.0004661873681470752, + 0.0004110294976271689, + 0.00036239775363355875, + 0.0003195199533365667, + 0.0002817153581418097, + 0.00024838364333845675 + ], + [ + 0.8480159640312195, + 0.09714719653129578, + -1.0517702102661133, + 0.7267919182777405, + 0.41102248430252075, + 0.3243515193462372, + -0.158564954996109, + 0.5518509149551392, + -0.3906678557395935, + -0.4272622764110565, + -0.5782755613327026, + 1.029015302658081, + -1.030014991760254, + 0.17350749671459198, + 0.2610936164855957, + 1.0673950910568237, + -0.7894954681396484, + 0.8244131803512573, + -0.17988857626914978, + 1.0686874389648438, + 0.5302888751029968, + 1.0330133438110352, + -0.4289613664150238, + 0.9157713651657104, + -1.0048320293426514, + 0.9926228523254395, + 0.7878543734550476, + -0.015043829567730427, + -1.0689263343811035, + 0.11750099062919617, + 0.5926885008811951, + 0.10648989677429199, + -0.5015896558761597, + 0.8253670334815979, + -1.0686548948287964, + -0.038918860256671906, + 0.8994117379188538, + 1.0276010036468506, + -0.1644500195980072, + 1.0386731624603271, + -0.4502561688423157, + -0.7556703090667725, + -0.6926901340484619, + -1.0018326044082642, + -1.0534002780914307, + 0.8597016334533691, + 1.058967113494873, + 1.0416312217712402, + -0.4127710163593292, + 1.0617148876190186, + -0.5723935961723328, + -0.9933766722679138, + -1.040193796157837, + -1.0411441326141357, + 0.15733245015144348, + -0.1503962129354477, + 0.7758270502090454, + 1.005433440208435, + 0.7177289128303528, + 0.12229378521442413, + 0.946465790271759, + -0.5736451148986816, + 1.0454176664352417, + 0.8953782916069031, + 0.7624354362487793, + -0.9453148245811462, + 0.0816914290189743, + 0.9444968700408936, + 0.958138644695282, + 0.3055640161037445, + -1.0205191373825073, + 0.3382522761821747, + 0.07499263435602188, + 0.01882825791835785, + -0.5324051976203918, + 1.0508826971054077, + -0.5870917439460754, + -0.8133320212364197, + 0.6022734045982361, + 1.0252766609191895, + 0.20932331681251526, + -0.719236433506012, + -1.0688719749450684, + -0.8429020047187805, + -0.3299427032470703, + 0.20897124707698822, + 0.55446457862854, + 0.804996907711029, + 0.963970959186554, + 1.0460902452468872, + 1.0693130493164062, + 1.0505926609039307, + 1.0040879249572754, + 0.9407630562782288, + 0.8686534762382507, + 0.7933820486068726, + 0.7187086343765259, + 0.6470167636871338, + 0.5797093510627747, + 0.5175104737281799, + 0.4606889486312866, + 0.4092187285423279, + 0.3628910481929779, + 0.32139164209365845, + 0.2843526303768158, + 0.25138670206069946, + 0.22210857272148132, + 0.1961485892534256, + 0.17315985262393951, + 0.15282228589057922, + 0.13484381139278412, + 0.11896012723445892, + 0.10493354499340057, + 0.0925513207912445, + 0.08162368088960648, + 0.07198182493448257, + 0.0634758397936821, + 0.05597289279103279, + 0.04935538396239281, + 0.043519243597984314, + 0.03837253898382187, + 0.03383404016494751, + 0.029832005500793457, + 0.026303134858608246, + 0.023191550746560097, + 0.020447952672839165, + 0.018028859049081802, + 0.01589590683579445 + ], + [ + -0.08993688225746155, + 0.8796225190162659, + -0.8826319575309753, + 0.06393515318632126, + 0.902049720287323, + 0.7958520650863647, + 0.33628395199775696, + 0.8737166523933411, + -0.7219651341438293, + -0.09688730537891388, + -0.805206298828125, + 0.9250819087028503, + -0.9431368112564087, + -0.034566495567560196, + 0.43459609150886536, + 1.0647516250610352, + -0.878045916557312, + 0.7391353249549866, + -0.07000716775655746, + 1.060831069946289, + 0.602867603302002, + 1.0110526084899902, + -0.4893029034137726, + 0.883637547492981, + -1.0214844942092896, + 0.9746248722076416, + 0.7597538232803345, + -0.0505300909280777, + -1.0693117380142212, + 0.08995960652828217, + 0.5721087455749512, + 0.085169218480587, + -0.4849127233028412, + 0.8358886241912842, + -1.069074034690857, + -0.051960140466690063, + 0.8931471705436707, + 1.0247384309768677, + -0.17321480810642242, + 1.0367839336395264, + -0.44397181272506714, + -0.7513172030448914, + -0.696758508682251, + -1.0034657716751099, + -1.0541102886199951, + 0.8574842810630798, + 1.0585092306137085, + 1.0422767400741577, + -0.410421758890152, + 1.061976671218872, + -0.5707387328147888, + -0.9927352666854858, + -1.039837121963501, + -1.0414484739303589, + 0.156138077378273, + -0.14936228096485138, + 0.7764667868614197, + 1.0051610469818115, + 0.7182489037513733, + 0.12169402092695236, + 0.9462226629257202, + -0.5740237236022949, + 1.0454998016357422, + 0.8955610394477844, + 0.7622294425964355, + -0.9451965093612671, + 0.08147586137056351, + 0.9444089531898499, + 0.9580661654472351, + 0.3054310977458954, + -1.0205551385879517, + 0.33835095167160034, + 0.07490310817956924, + 0.018905749544501305, + -0.5324617624282837, + 1.0508933067321777, + -0.5870507955551147, + -0.8133592009544373, + 0.6022439002990723, + 1.0252854824066162, + 0.20934931933879852, + -0.7192198038101196, + -1.0688713788986206, + -0.8429120182991028, + -0.3299560546875, + 0.20895949006080627, + 0.5544553995132446, + 0.8049907088279724, + 0.9639674425125122, + 1.0460888147354126, + 1.0693130493164062, + 1.050593614578247, + 1.004089593887329, + 0.9407651424407959, + 0.8686556816101074, + 0.793384313583374, + 0.7187108397483826, + 0.6470188498497009, + 0.5797113180160522, + 0.5175122618675232, + 0.46069058775901794, + 0.40922024846076965, + 0.36289238929748535, + 0.32139280438423157, + 0.28435367345809937, + 0.2513876259326935, + 0.22210940718650818, + 0.1961493194103241, + 0.17316049337387085, + 0.15282288193702698, + 0.1348443180322647, + 0.11896057426929474, + 0.10493393987417221, + 0.09255167096853256, + 0.08162398636341095, + 0.07198208570480347, + 0.0634760782122612, + 0.0559731088578701, + 0.04935557022690773, + 0.043519411236047745, + 0.03837268799543381, + 0.03383416682481766, + 0.02983211912214756, + 0.026303235441446304, + 0.02319163829088211, + 0.020448030903935432, + 0.018028927966952324, + 0.015895968303084373 + ], + [ + 0.19015751779079437, + 0.7010433077812195, + -1.0676687955856323, + -0.4455896317958832, + 0.7437304854393005, + -1.0318354368209839, + 1.054535984992981, + 1.0558197498321533, + -0.8066569566726685, + 0.697398841381073, + -0.37590548396110535, + 0.9388617277145386, + -0.7816249132156372, + -0.5591893196105957, + 0.14477676153182983, + -0.7562305331230164, + -0.9491527676582336, + 1.0631276369094849, + 1.0657179355621338, + 1.0648319721221924, + -0.988567054271698, + -0.2734871804714203, + -0.0010927487164735794, + 0.9933494329452515, + 0.9188557267189026, + -0.926578164100647, + 0.5309184789657593, + -0.018315389752388, + -1.0692315101623535, + -0.9655576348304749, + 0.6662404537200928, + 0.06500007212162018, + 0.6808658242225647, + -0.9628912210464478, + 0.3741791248321533, + -0.619967520236969, + 0.8479061126708984, + -0.2169850766658783, + -1.067051887512207, + 0.670851469039917, + -1.0665291547775269, + -0.7312217354774475, + -1.039489507675171, + 0.9757582545280457, + 1.053857445716858, + 0.9389011263847351, + -1.069083333015442, + 0.21011583507061005, + -1.0321731567382812, + 0.7291439175605774, + -1.0059372186660767, + 0.9083770513534546, + 0.23671789467334747, + -0.28658193349838257, + -0.8540019392967224, + 0.8983405232429504, + -0.5658369064331055, + -1.0362728834152222, + -1.0527923107147217, + -1.0388689041137695, + -1.060107707977295, + -0.3343813121318817, + 0.15318618714809418, + 0.6114681959152222, + -1.0029376745224, + -1.0686441659927368, + 0.9925113916397095, + -0.15751725435256958, + 0.3975750207901001, + 0.6149442195892334, + -0.21433930099010468, + -1.0582910776138306, + -0.8822853565216064, + -1.0585649013519287, + -0.47586727142333984, + 1.0646357536315918, + -0.8164936304092407, + 0.748436450958252, + -0.965858519077301, + 1.0234729051589966, + -0.21903759241104126, + -0.9770629405975342, + 0.3983036279678345, + 1.0602915287017822, + 0.32338908314704895, + -0.6608481407165527, + -1.0386651754379272, + -1.0059621334075928, + -0.6955737471580505, + -0.26737523078918457, + 0.15861226618289948, + 0.5154403448104858, + 0.7782869338989258, + 0.9482901096343994, + 1.0392506122589111, + 1.069014072418213, + 1.0548015832901, + 1.011172890663147, + 0.9494943022727966, + 0.8781496286392212, + 0.803039014339447, + 0.7281314730644226, + 0.6559629440307617, + 0.5880426168441772, + 0.5251676440238953, + 0.4676550030708313, + 0.41550904512405396, + 0.36853957176208496, + 0.3264423906803131, + 0.2888544201850891, + 0.25538918375968933, + 0.225660502910614, + 0.1992960274219513, + 0.1759456992149353, + 0.15528593957424164, + 0.13702107965946198, + 0.1208832636475563, + 0.10663152486085892, + 0.09405004978179932, + 0.08294621855020523, + 0.07314864546060562, + 0.06450513750314713, + 0.05688077583909035, + 0.050156090408563614, + 0.044225383549928665, + 0.038995254784822464, + 0.034383151680231094, + 0.030316205695271492 + ], + [ + -0.7902251482009888, + 0.9312242269515991, + -0.4345173239707947, + -0.7723886370658875, + 1.0562087297439575, + 0.9749866724014282, + 0.18204641342163086, + 1.0658936500549316, + 0.9638862609863281, + -0.5216302871704102, + 1.057814598083496, + -0.767695426940918, + -0.7387320399284363, + -0.1393083930015564, + 0.6599991917610168, + -0.038907237350940704, + 1.042797565460205, + -1.0664860010147095, + -0.25054293870925903, + -0.17274115979671478, + 0.9605727791786194, + -0.5975326895713806, + 0.8296240568161011, + -0.9723656177520752, + 0.646519124507904, + -0.7708269357681274, + -1.0681465864181519, + 0.06555211544036865, + 0.026310738176107407, + -0.20701156556606293, + -0.9767002463340759, + -0.1914111226797104, + -0.8753045797348022, + 1.04618501663208, + 0.05996488779783249, + 0.09079860150814056, + -0.9776279926300049, + -0.5772501826286316, + 0.33343228697776794, + -0.500667154788971, + -0.8123929500579834, + -1.0692881345748901, + 1.056236982345581, + 0.6969614624977112, + 0.35819175839424133, + -1.023568868637085, + -0.2970648407936096, + 0.4683835506439209, + -0.759721577167511, + 0.25055745244026184, + -0.966127872467041, + -0.7365657687187195, + -0.4836031496524811, + 0.47364166378974915, + -0.3100537061691284, + -0.2967993915081024, + 1.0677722692489624, + -0.6852179169654846, + 1.0641357898712158, + -0.24237889051437378, + -0.8812164068222046, + 0.968414306640625, + 0.4391992390155792, + 0.9788482785224915, + -1.0691691637039185, + -0.8838511109352112, + -0.1626957207918167, + -0.8857767581939697, + -0.8509113788604736, + -0.5855292677879333, + 0.6094281077384949, + 0.6418512463569641, + -0.14952710270881653, + 0.03772813826799393, + 0.9234769344329834, + 0.38850247859954834, + -0.9813619256019592, + 1.0560375452041626, + -0.9953020215034485, + 0.5823843479156494, + 0.41057151556015015, + -1.0644580125808716, + -0.061531033366918564, + 1.0373345613479614, + 0.6276984214782715, + -0.4098731279373169, + -0.9481998682022095, + -1.059749722480774, + -0.8344391584396362, + -0.43368062376976013, + 0.003755486337468028, + 0.39146173000335693, + 0.6906352639198303, + 0.8944350481033325, + 1.013154149055481, + 1.063847303390503, + 1.0643237829208374, + 1.0302683115005493, + 0.9742530584335327, + 0.9057350754737854, + 0.8314846754074097, + 0.7561357021331787, + 0.6827107667922974, + 0.6130641102790833, + 0.548229992389679, + 0.48868316411972046, + 0.4345296621322632, + 0.3856413662433624, + 0.3417493999004364, + 0.3025076389312744, + 0.2675352394580841, + 0.23644381761550903, + 0.208854541182518, + 0.18440836668014526, + 0.16277137398719788, + 0.14363735914230347, + 0.12672804296016693, + 0.11179253458976746, + 0.09860574454069138, + 0.08696653693914413, + 0.07669580727815628, + 0.06763432174921036, + 0.059640903025865555, + 0.05259045213460922, + 0.04637227579951286, + 0.040888503193855286, + 0.03605266287922859, + 0.031788360327482224 + ] + ] + } + ] +} diff --git a/tests/data/yarn_reference_rocm.json b/tests/data/yarn_reference_rocm.json new file mode 100644 index 00000000..2d824eb2 --- /dev/null +++ b/tests/data/yarn_reference_rocm.json @@ -0,0 +1,3497 @@ +{ + "reference": "vLLM YaRNScalingRotaryEmbedding; torch cuda FP32; static factor=2", + "positions": [ + 0, + 1, + 4096, + 262143, + 262144, + 500000, + 524287 + ], + "cases": [ + { + "rot": 64, + "theta": 10000000.0, + "factor": 2.0, + "original": 262144, + "magnitude": 1.0693147180559945, + "inv_freq": [ + 1.0, + 0.6042963862419128, + 0.36517414450645447, + 0.22067342698574066, + 0.1333521455526352, + 0.08058421313762665, + 0.04869674891233444, + 0.02942727319896221, + 0.017782794311642647, + 0.010746078565716743, + 0.006493816152215004, + 0.003924190066754818, + 0.0023713738191872835, + 0.0014330126577988267, + 0.0008659643353894353, + 0.0004905929090455174, + 0.0002766992838587612, + 0.0001552649337099865, + 8.660864841658622e-05, + 4.797585279447958e-05, + 2.635603232192807e-05, + 1.4334171282825992e-05, + 7.699632078583818e-06, + 4.6528602979378775e-06, + 2.81170673588349e-06, + 1.6991041320579825e-06, + 1.0267624475090997e-06, + 6.204688816069392e-07, + 3.7494712046282075e-07, + 2.2657918918866926e-07, + 1.3692098832507327e-07, + 8.274085416815069e-08 + ], + "cos": [ + [ + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646 + ], + [ + 0.5777531862258911, + 0.8799412846565247, + 0.998805820941925, + 1.043384075164795, + 1.0598211288452148, + 1.0658446550369263, + 1.068047046661377, + 1.0688517093658447, + 1.069145679473877, + 1.0692529678344727, + 1.0692921876907349, + 1.069306492805481, + 1.0693117380142212, + 1.069313645362854, + 1.0693143606185913, + 1.0693145990371704, + 1.0693145990371704, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646 + ], + [ + 0.8597189784049988, + 0.9942150712013245, + 1.0025675296783447, + 0.6644225120544434, + 0.9734212756156921, + -1.0467698574066162, + -0.031272951513528824, + 0.4332946836948395, + -0.8934475779533386, + 1.0687097311019897, + 0.11192997545003891, + -0.9986739158630371, + -1.025161623954773, + 0.9791648387908936, + -0.9826422333717346, + -0.4541783630847931, + 0.4529813230037689, + 0.860262393951416, + 1.002732515335083, + 1.0487347841262817, + 1.0630898475646973, + 1.067472219467163, + 1.068782925605774, + 1.0691205263137817, + 1.0692437887191772, + 1.0692888498306274, + 1.0693053007125854, + 1.069311261177063, + 1.069313406944275, + 1.0693142414093018, + 1.0693144798278809, + 1.0693145990371704 + ], + [ + -0.6513853669166565, + 0.9871648550033569, + -0.9953956604003906, + 0.2952715754508972, + -0.7212009429931641, + 0.9285621643066406, + -0.36669492721557617, + -0.02881699800491333, + 0.9443737268447876, + -0.5783533453941345, + 0.9698436856269836, + -0.18366917967796326, + 0.9864349961280823, + 0.2478526532649994, + 0.7358847260475159, + -1.0480421781539917, + -1.0282152891159058, + -1.0589878559112549, + -0.8090404868125916, + 1.0692594051361084, + 0.8666337728500366, + -0.8727642893791199, + -0.4628109037876129, + 0.3677518963813782, + 0.791765034198761, + 0.9649868607521057, + 1.0308140516281128, + 1.0552012920379639, + 1.0641536712646484, + 1.0674290657043457, + 1.0686259269714355, + 1.0690631866455078 + ], + [ + -1.0655258893966675, + 0.5742302536964417, + -0.7887967228889465, + 0.511264443397522, + -0.6103026866912842, + 0.8831673860549927, + -0.317230761051178, + 0.0025070905685424805, + 0.9530444145202637, + -0.5879814028739929, + 0.9727371335029602, + -0.1795528680086136, + 0.9874147772789001, + 0.2493443638086319, + 0.7352097034454346, + -1.0481456518173218, + -1.0281345844268799, + -1.0590109825134277, + -0.8089804649353027, + 1.0692589282989502, + 0.8666173219680786, + -0.8727554678916931, + -0.4628182649612427, + 0.3677472472190857, + 0.7917630076408386, + 0.9649860858917236, + 1.0308136940002441, + 1.0552011728286743, + 1.0641535520553589, + 1.0674290657043457, + 1.0686259269714355, + 1.0690631866455078 + ], + [ + -1.0522708892822266, + -0.7683091163635254, + -0.7019533514976501, + -0.7174220681190491, + 0.49248647689819336, + -0.4076384902000427, + 0.5487287640571594, + -0.013338646851480007, + 0.8245336413383484, + 0.6515282988548279, + 0.07687243074178696, + -0.18141566216945648, + -0.279379278421402, + 1.0427840948104858, + 0.9073381423950195, + 1.0354822874069214, + 1.0616806745529175, + -0.6585246324539185, + 0.832831859588623, + 0.44185671210289, + 0.8754527568817139, + 0.6780954003334045, + -0.8121644854545593, + -0.7332826256752014, + 0.17557725310325623, + 0.706089437007904, + 0.93146812915802, + 1.0182678699493408, + 1.0505784749984741, + 1.062459945678711, + 1.0668097734451294, + 1.0683997869491577 + ], + [ + 0.7204014658927917, + 0.16690370440483093, + 0.46298733353614807, + -0.7614797949790955, + -0.23665851354599, + 0.4698231816291809, + -0.8504674434661865, + -1.06899094581604, + 0.614227831363678, + -0.4332176446914673, + 0.6951085329055786, + -1.0076253414154053, + 0.7525005340576172, + -0.9537095427513123, + -0.05741226673126221, + 0.9852739572525024, + 0.9079210758209229, + 1.0282537937164307, + 0.15483182668685913, + 1.0690927505493164, + 0.33539828658103943, + 0.35535430908203125, + -0.6686892509460449, + -0.8163681030273438, + 0.10319384932518005, + 0.6723594665527344, + 0.9180837869644165, + 1.0132330656051636, + 1.0487200021743774, + 1.0617786645889282, + 1.0665606260299683, + 1.0683088302612305 + ] + ], + "sin": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.899797260761261, + 0.6075666546821594, + 0.38186508417129517, + 0.23405885696411133, + 0.1421731561422348, + 0.08607665449380875, + 0.052051570266485214, + 0.031462475657463074, + 0.019014401361346245, + 0.011490718461573124, + 0.006943884305655956, + 0.004196183290332556, + 0.002535742474719882, + 0.0015323410043492913, + 0.0009259883081540465, + 0.0005245982320047915, + 0.00029587862081825733, + 0.00016602707910351455, + 9.26119028008543e-05, + 5.130128556629643e-05, + 2.818289249262307e-05, + 1.532773967483081e-05, + 8.233329936047085e-06, + 4.975372121407418e-06, + 3.0065993996686302e-06, + 1.8168771021009888e-06, + 1.097932226912235e-06, + 6.634764986301889e-07, + 4.0093647157846135e-07, + 2.422844715965766e-07, + 1.4641162238149263e-07, + 8.847601407069305e-08 + ], + [ + -0.6358594298362732, + -0.3936627209186554, + 0.3718767762184143, + -0.8378404974937439, + -0.44258883595466614, + -0.2184189260005951, + -1.0688573122024536, + 0.9775937795639038, + -0.5875248312950134, + 0.03596566617488861, + 1.0634404420852661, + -0.38220974802970886, + -0.30410149693489075, + -0.42973271012306213, + -0.4217204451560974, + 0.9680681824684143, + 0.9686288237571716, + 0.6351240277290344, + 0.3714318573474884, + 0.20878027379512787, + 0.11521304398775101, + 0.06274636089801788, + 0.033718131482601166, + 0.02037789113819599, + 0.012314759194850922, + 0.0074418680742383, + 0.004497116897255182, + 0.002717596711590886, + 0.0016422352055087686, + 0.000992397079244256, + 0.0005997019470669329, + 0.00036239775363355875 + ], + [ + 0.8480159640312195, + 0.41102248430252075, + -0.3906678557395935, + -1.0277395248413086, + -0.7894955277442932, + 0.5302888751029968, + -1.004474401473999, + -1.0689263343811035, + -0.5015896558761597, + 0.899411678314209, + -0.4503745436668396, + -1.0534228086471558, + -0.4127710163593292, + -1.040193796157837, + 0.7758269906044006, + 0.21222993731498718, + -0.2936108708381653, + 0.14825202524662018, + -0.6992049217224121, + 0.010867959819734097, + 0.6264023184776306, + -0.6178320646286011, + 0.963970959186554, + 1.0040879249572754, + 0.7187086343765259, + 0.4606889486312866, + 0.2843526303768158, + 0.17315985262393951, + 0.10493354499340057, + 0.0634758397936821, + 0.03837253898382187, + 0.023191550746560097 + ], + [ + -0.08993688225746155, + 0.9020496606826782, + -0.7219651341438293, + -0.9391712546348572, + -0.8780458569526672, + 0.602867603302002, + -1.0211750268936157, + -1.0693117380142212, + -0.4849127233028412, + 0.8931471109390259, + -0.4440905451774597, + -1.0541322231292725, + -0.410421758890152, + -1.039837121963501, + 0.7764667868614197, + 0.21171817183494568, + -0.2938932478427887, + 0.14808638393878937, + -0.6992743611335754, + 0.010918946005403996, + 0.62642502784729, + -0.6178445219993591, + 0.9639674425125122, + 1.004089593887329, + 0.7187108397483826, + 0.46069058775901794, + 0.28435367345809937, + 0.17316049337387085, + 0.10493393987417221, + 0.0634760782122612, + 0.03837268799543381, + 0.02319163829088211 + ], + [ + 0.19015751779079437, + 0.7437305450439453, + -0.8066569566726685, + -0.7929309606552124, + -0.9491528272628784, + -0.988567054271698, + 0.9177857637405396, + -1.0692315101623535, + 0.6808658242225647, + 0.8479061126708984, + -1.0665479898452759, + 1.0538132190704346, + -1.0321730375289917, + 0.23671789467334747, + -0.5658369660377502, + 0.2668529450893402, + 0.12754622101783752, + 0.8424839973449707, + -0.6706900596618652, + -0.9737538695335388, + 0.6140166521072388, + 0.8268135786056519, + -0.6955736875534058, + 0.7782869338989258, + 1.0548017024993896, + 0.803039014339447, + 0.5251676440238953, + 0.3264423906803131, + 0.1992960274219513, + 0.1208832636475563, + 0.07314864546060562, + 0.044225383549928665 + ], + [ + -0.7902251482009888, + 1.056208848953247, + 0.9638862609863281, + -0.750721275806427, + 1.042797565460205, + 0.9605727791786194, + 0.6481813788414001, + 0.026310738176107407, + -0.8753045797348022, + -0.9776279330253601, + -0.8125626444816589, + 0.3579457700252533, + -0.759721577167511, + -0.4836031496524811, + 1.067772388458252, + -0.4155347943305969, + 0.5649010539054871, + -0.29347580671310425, + 1.0580458641052246, + 0.02178577519953251, + 1.0153530836105347, + 1.0085421800613403, + -0.8344391584396362, + 0.6906352639198303, + 1.0643237829208374, + 0.8314846754074097, + 0.548229992389679, + 0.3417493999004364, + 0.208854541182518, + 0.12672804296016693, + 0.07669580727815628, + 0.04637227579951286 + ] + ] + }, + { + "rot": 128, + "theta": 10000000.0, + "factor": 2.0, + "original": 262144, + "magnitude": 1.0693147180559945, + "inv_freq": [ + 1.0, + 0.7773650288581848, + 0.6042963862419128, + 0.46975892782211304, + 0.36517414450645447, + 0.283873587846756, + 0.22067342698574066, + 0.17154379189014435, + 0.1333521455526352, + 0.10366329550743103, + 0.08058421313762665, + 0.06264335662126541, + 0.04869674891233444, + 0.037855152040719986, + 0.02942727319896221, + 0.02287573181092739, + 0.017782794311642647, + 0.01382372248917818, + 0.010746078565716743, + 0.008353625424206257, + 0.006493816152215004, + 0.005048065446317196, + 0.003924190066754818, + 0.0030505280010402203, + 0.0023713738191872835, + 0.0018434228841215372, + 0.0014330126577988267, + 0.0011139739071950316, + 0.0008659643353894353, + 0.0006507313228212297, + 0.0004884125082753599, + 0.0003661149530671537, + 0.0002740640484262258, + 0.00020485366985667497, + 0.0001528762368252501, + 0.00011388894927222282, + 8.468401210848242e-05, + 6.283809489104897e-05, + 4.6522036427631974e-05, + 3.4356373362243176e-05, + 2.5301789719378576e-05, + 1.8576018192106858e-05, + 1.3590916751127224e-05, + 9.904783837555442e-06, + 7.699632078583818e-06, + 5.98542510488187e-06, + 4.6528602979378775e-06, + 3.6169706163491355e-06, + 2.81170673588349e-06, + 2.1857224510313245e-06, + 1.6991041320579825e-06, + 1.3208241398388054e-06, + 1.0267624475090997e-06, + 7.981693102010468e-07, + 6.204688816069392e-07, + 4.823307904189278e-07, + 3.7494712046282075e-07, + 2.9147076929803006e-07, + 2.2657918918866926e-07, + 1.761347334650054e-07, + 1.3692098832507327e-07, + 1.0643758230344247e-07, + 8.274085416815069e-08, + 6.43198490024588e-08 + ], + "cos": [ + [ + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646 + ], + [ + 0.5777531862258911, + 0.7621692419052124, + 0.8799412846565247, + 0.9534838199615479, + 0.998805820941925, + 1.0265183448791504, + 1.043384075164795, + 1.0536197423934937, + 1.0598211288452148, + 1.0635744333267212, + 1.0658446550369263, + 1.067217230796814, + 1.068047046661377, + 1.068548560142517, + 1.0688517093658447, + 1.0690349340438843, + 1.069145679473877, + 1.069212555885315, + 1.0692529678344727, + 1.0692774057388306, + 1.0692921876907349, + 1.0693011283874512, + 1.069306492805481, + 1.0693097114562988, + 1.0693117380142212, + 1.0693128108978271, + 1.069313645362854, + 1.0693141222000122, + 1.0693143606185913, + 1.0693144798278809, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646 + ], + [ + 0.8597189784049988, + 0.08865529298782349, + 0.9942150712013245, + 0.09923054277896881, + 1.0025675296783447, + 1.0019184350967407, + 0.6644225120544434, + 0.5102278590202332, + 0.9734212756156921, + -0.9435669183731079, + -1.0467698574066162, + 0.5565336346626282, + -0.031272951513528824, + -0.46909114718437195, + 0.4332946836948395, + 0.9122970104217529, + -0.8934475779533386, + 1.0664434432983398, + 1.0687097311019897, + -1.0077195167541504, + 0.11192997545003891, + -0.2713061571121216, + -0.9986739158630371, + 1.066589593887329, + -1.025161623954773, + 0.3193954527378082, + 0.9791648387908936, + -0.15932254493236542, + -0.9826422333717346, + -0.9503476619720459, + -0.44551461935043335, + 0.07605966925621033, + 0.46341004967689514, + 0.7144595980644226, + 0.8664352297782898, + 0.9550614356994629, + 1.005629301071167, + 1.0340903997421265, + 1.049959421157837, + 1.0587443113327026, + 1.06357741355896, + 1.0662208795547485, + 1.0676583051681519, + 1.0684348344802856, + 1.068782925605774, + 1.068993330001831, + 1.0691205263137817, + 1.069197416305542, + 1.0692437887191772, + 1.0692719221115112, + 1.0692888498306274, + 1.0692989826202393, + 1.0693053007125854, + 1.0693089962005615, + 1.069311261177063, + 1.069312572479248, + 1.069313406944275, + 1.0693140029907227, + 1.0693142414093018, + 1.0693144798278809, + 1.0693144798278809, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704 + ], + [ + -0.6513853669166565, + -0.19290786981582642, + 0.9871648550033569, + 1.059841275215149, + -0.9953956604003906, + -0.8994616866111755, + 0.2952715754508972, + 1.0369493961334229, + -0.7212009429931641, + 1.054075002670288, + 0.9285621643066406, + -0.9795029759407043, + -0.36669492721557617, + -0.7229933142662048, + -0.02881699800491333, + -0.8900305032730103, + 0.9443737268447876, + -0.03756128251552582, + -0.5783533453941345, + -1.056593656539917, + 0.9698436856269836, + -0.8147097826004028, + -0.18366917967796326, + -0.14840036630630493, + 0.9864349961280823, + 0.9032161831855774, + 0.2478526532649994, + -1.057676911354065, + 0.7358847260475159, + 0.6318320631980896, + -0.7666455507278442, + -0.16602759063243866, + -0.9795535802841187, + -1.023470401763916, + -0.7711856365203857, + 0.010757197625935078, + -1.046228289604187, + -0.7716785073280334, + 0.9965856075286865, + -0.9770345091819763, + 1.0046676397323608, + 0.16738805174827576, + -0.9758681058883667, + -0.9143319725990295, + -0.4628109037876129, + 0.0018809328321367502, + 0.3677518963813782, + 0.623598575592041, + 0.791765034198761, + 0.8985382914543152, + 0.9649868607521057, + 1.005854845046997, + 1.0308140516281128, + 1.0459932088851929, + 1.0552012920379639, + 1.0607784986495972, + 1.0641536712646484, + 1.0661948919296265, + 1.0674290657043457, + 1.0681750774383545, + 1.0686259269714355, + 1.0688985586166382, + 1.0690631866455078, + 1.0691627264022827 + ], + [ + -1.0655258893966675, + 0.6036512851715088, + 0.5742302536964417, + 1.0096819400787354, + -0.7887967228889465, + -0.7036169171333313, + 0.511264443397522, + 0.9770159721374512, + -0.6103026866912842, + 1.0670206546783447, + 0.8831673860549927, + -0.9507979154586792, + -0.317230761051178, + -0.7524679899215698, + 0.0025070905685424805, + -0.9033966660499573, + 0.9530444145202637, + -0.022686710581183434, + -0.5879814028739929, + -1.055192232131958, + 0.9727371335029602, + -0.8112333416938782, + -0.1795528680086136, + -0.15163138508796692, + 0.9874147772789001, + 0.9042627811431885, + 0.2493443638086319, + -1.0578539371490479, + 0.7352097034454346, + 0.6312658786773682, + -0.767009437084198, + -0.16641440987586975, + -0.97967129945755, + -1.0234065055847168, + -0.7712987065315247, + 0.01087956503033638, + -1.046209692955017, + -0.7716318964958191, + 0.9966037273406982, + -0.9770494103431702, + 1.0046583414077759, + 0.16740769147872925, + -0.9758622050285339, + -0.9143375158309937, + -0.4628182649612427, + 0.0018745592096820474, + 0.3677472472190857, + 0.6235954761505127, + 0.7917630076408386, + 0.8985370397567749, + 0.9649860858917236, + 1.0058543682098389, + 1.0308136940002441, + 1.0459929704666138, + 1.0552011728286743, + 1.0607784986495972, + 1.0641535520553589, + 1.0661948919296265, + 1.0674290657043457, + 1.0681750774383545, + 1.0686259269714355, + 1.0688985586166382, + 1.0690631866455078, + 1.0691627264022827 + ], + [ + -1.0522708892822266, + -0.05930701270699501, + -0.7683091163635254, + 0.14413057267665863, + -0.7019533514976501, + 1.0010639429092407, + -0.7174220681190491, + 1.0594686269760132, + 0.49248647689819336, + -0.08763059973716736, + -0.4076384902000427, + 1.0693141222000122, + 0.5487287640571594, + -0.9282023310661316, + -0.013338646851480007, + -0.8363955616950989, + 0.8245336413383484, + 1.0017105340957642, + 0.6515282988548279, + 0.06952807307243347, + 0.07687243074178696, + -0.2510434091091156, + -0.18141566216945648, + 0.022245239466428757, + -0.279379278421402, + -0.3626629710197449, + 1.0427840948104858, + -0.6435174345970154, + 0.9073381423950195, + 0.22376880049705505, + 0.7153396606445312, + 0.709652841091156, + 0.3894186317920685, + -0.3415154218673706, + 0.5414062738418579, + 0.9866420030593872, + -0.07425130903720856, + 1.0693094730377197, + -0.31695008277893066, + -0.10736316442489624, + 1.0654971599578857, + -1.0593290328979492, + 0.9320496320724487, + 0.2541821599006653, + -0.8121644854545593, + -1.0574856996536255, + -0.7332826256752014, + -0.2517778277397156, + 0.17557725310325623, + 0.49182775616645813, + 0.706089437007904, + 0.844480037689209, + 0.93146812915802, + 0.9852848052978516, + 1.0182678699493408, + 1.038369059562683, + 1.0505784749984741, + 1.0579793453216553, + 1.062459945678711, + 1.0651706457138062, + 1.0668097734451294, + 1.067800760269165, + 1.0683997869491577, + 1.0687618255615234 + ], + [ + 0.7204014658927917, + -0.9770510196685791, + 0.16690370440483093, + 1.047502040863037, + 0.46298733353614807, + 0.1564042568206787, + -0.7614797949790955, + 0.8413293957710266, + -0.23665851354599, + 1.0395491123199463, + 0.4698231816291809, + 0.6746538877487183, + -0.8504674434661865, + -0.049967240542173386, + -1.06899094581604, + 0.4353052079677582, + 0.614227831363678, + -1.0676320791244507, + -0.4332176446914673, + 1.0160003900527954, + 0.6951085329055786, + 0.16698326170444489, + -1.0076253414154053, + -1.0272226333618164, + 0.7525005340576172, + 0.45829126238822937, + -0.9537095427513123, + 1.0233770608901978, + -0.05741226673126221, + -0.3233306407928467, + 0.030500834807753563, + -1.017637848854065, + 0.7255557179450989, + 0.8897461295127869, + 0.043200526386499405, + -1.0690957307815552, + 0.9779296517372131, + 0.044390324503183365, + 0.7883260846138, + 0.716148316860199, + 0.8185259699821472, + -1.016903281211853, + 0.7118502855300903, + 0.4943186342716217, + -0.6686892509460449, + -1.0693081617355347, + -0.8163681030273438, + -0.34198302030563354, + 0.10319384932518005, + 0.4407549500465393, + 0.6723594665527344, + 0.8230066299438477, + 0.9180837869644165, + 0.9770455360412598, + 1.0132330656051636, + 1.0353060960769653, + 1.0487200021743774, + 1.0568535327911377, + 1.0617786645889282, + 1.0647586584091187, + 1.0665606260299683, + 1.0676501989364624, + 1.0683088302612305, + 1.068706750869751 + ] + ], + "sin": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.899797260761261, + 0.7500213384628296, + 0.6075666546821594, + 0.48404812812805176, + 0.38186508417129517, + 0.29948970675468445, + 0.23405885696411133, + 0.18253596127033234, + 0.1421731561422348, + 0.11065026372671127, + 0.08607665449380875, + 0.06694166362285614, + 0.052051570266485214, + 0.04046940430998802, + 0.031462475657463074, + 0.024459224194288254, + 0.019014401361346245, + 0.014781438745558262, + 0.011490718461573124, + 0.008932551369071007, + 0.006943884305655956, + 0.00539794797077775, + 0.004196183290332556, + 0.0032619694247841835, + 0.002535742474719882, + 0.0019711980130523443, + 0.0015323410043492913, + 0.001191188464872539, + 0.0009259883081540465, + 0.0006958364974707365, + 0.0005222666659392416, + 0.00039149209624156356, + 0.00029306072974577546, + 0.0002190530503867194, + 0.00016347281052730978, + 0.00012178313045296818, + 9.055386180989444e-05, + 6.719370139762759e-05, + 4.9746697186492383e-05, + 3.6737776099471375e-05, + 2.7055575628764927e-05, + 1.986360985029023e-05, + 1.4532967725244816e-05, + 1.0591331374598667e-05, + 8.233329936047085e-06, + 6.400302936526714e-06, + 4.975372121407418e-06, + 3.867679879476782e-06, + 3.0065993996686302e-06, + 2.337225168957957e-06, + 1.8168771021009888e-06, + 1.4123767186902114e-06, + 1.097932226912235e-06, + 8.534942139704071e-07, + 6.634764986301889e-07, + 5.157634177521686e-07, + 4.0093647157846135e-07, + 3.1167397196441016e-07, + 2.422844715965766e-07, + 1.8834346349194675e-07, + 1.4641162238149263e-07, + 1.1381527542653203e-07, + 8.847601407069305e-08, + 6.877816360884026e-08 + ], + [ + -0.6358594298362732, + -1.0656332969665527, + -0.3936627209186554, + 1.0647004842758179, + 0.3718767762184143, + 0.3736218810081482, + -0.8378404974937439, + -0.9397347569465637, + -0.44258883595466614, + -0.5031058192253113, + -0.2184189260005951, + -0.9130740761756897, + -1.0688573122024536, + -0.9609304666519165, + 0.9775937795639038, + -0.5578064918518066, + -0.5875248312950134, + 0.07831012457609177, + 0.03596566617488861, + 0.3576805591583252, + 1.0634404420852661, + 1.0343244075775146, + -0.38220974802970886, + -0.07629266381263733, + -0.30410149693489075, + 1.0205000638961792, + -0.42973271012306213, + -1.0573790073394775, + -0.4217204451560974, + 0.490176796913147, + 0.97208571434021, + 1.0666062831878662, + 0.9636830687522888, + 0.7956013083457947, + 0.6266769170761108, + 0.48092782497406006, + 0.36351555585861206, + 0.2721966505050659, + 0.2025315761566162, + 0.14998175203800201, + 0.1106213703751564, + 0.08128286153078079, + 0.05949629470705986, + 0.04337019473314285, + 0.033718131482601166, + 0.026213016360998154, + 0.02037789113819599, + 0.015841437503695488, + 0.012314759194850922, + 0.00957314670085907, + 0.0074418680742383, + 0.00578506663441658, + 0.004497116897255182, + 0.003495906013995409, + 0.002717596711590886, + 0.0021125655621290207, + 0.0016422352055087686, + 0.0012766163563355803, + 0.000992397079244256, + 0.000771454768255353, + 0.0005997019470669329, + 0.0004661873681470752, + 0.00036239775363355875, + 0.0002817153581418097 + ], + [ + 0.8480159640312195, + -1.0517702102661133, + 0.41102248430252075, + -0.14202295243740082, + -0.3906678557395935, + -0.5782755017280579, + -1.0277395248413086, + 0.2610936164855957, + -0.7894955277442932, + -0.17988857626914978, + 0.5302888751029968, + -0.4289613664150238, + -1.004474401473999, + 0.7878543734550476, + -1.0689263343811035, + 0.5926885008811951, + -0.5015896558761597, + -1.0686547756195068, + 0.899411678314209, + -0.1644500195980072, + -0.4503745436668396, + -0.6925907135009766, + -1.0534228086471558, + 1.058967113494873, + -0.4127710163593292, + -0.5723935961723328, + -1.040193796157837, + 0.1573324352502823, + 0.7758269906044006, + 0.8626831769943237, + 0.745445191860199, + 1.0563468933105469, + 0.42884573340415955, + -0.3097456097602844, + 0.740747332572937, + -1.069260597229004, + -0.22099833190441132, + -0.7402339577674866, + -0.38762226700782776, + 0.43455445766448975, + 0.3661651909351349, + -1.056132197380066, + -0.43716734647750854, + 0.55446457862854, + 0.963970959186554, + 1.0693130493164062, + 1.0040879249572754, + 0.868653416633606, + 0.7187086343765259, + 0.5797093510627747, + 0.4606889486312866, + 0.3628910481929779, + 0.2843526303768158, + 0.22210858762264252, + 0.17315985262393951, + 0.13484381139278412, + 0.10493354499340057, + 0.08162368088960648, + 0.0634758397936821, + 0.04935538396239281, + 0.03837253898382187, + 0.029832005500793457, + 0.023191550746560097, + 0.018028859049081802 + ], + [ + -0.08993688225746155, + -0.8826319575309753, + 0.9020496606826782, + 0.3521025776863098, + -0.7219651341438293, + -0.805206298828125, + -0.9391712546348572, + 0.43459609150886536, + -0.8780458569526672, + -0.07000717520713806, + 0.602867603302002, + -0.4893029034137726, + -1.0211750268936157, + 0.7597538232803345, + -1.0693117380142212, + 0.5721087455749512, + -0.4849127233028412, + -1.069074034690857, + 0.8931471109390259, + -0.17321480810642242, + -0.4440905451774597, + -0.6966595649719238, + -1.0541322231292725, + 1.0585092306137085, + -0.410421758890152, + -0.5707387328147888, + -1.039837121963501, + 0.15613806247711182, + 0.7764667868614197, + 0.8630974888801575, + 0.74507075548172, + 1.0562859773635864, + 0.42857667803764343, + -0.30995646119117737, + 0.7406296730041504, + -1.0692594051361084, + -0.22108612954616547, + -0.7402825355529785, + -0.3875757157802582, + 0.4345209002494812, + 0.3661905825138092, + -1.0561290979385376, + -0.43718060851097107, + 0.5544554591178894, + 0.9639674425125122, + 1.0693130493164062, + 1.004089593887329, + 0.8686556816101074, + 0.7187108397483826, + 0.5797113180160522, + 0.46069058775901794, + 0.36289238929748535, + 0.28435367345809937, + 0.22210942208766937, + 0.17316049337387085, + 0.1348443180322647, + 0.10493393987417221, + 0.08162398636341095, + 0.0634760782122612, + 0.04935557022690773, + 0.03837268799543381, + 0.02983211912214756, + 0.02319163829088211, + 0.018028927966952324 + ], + [ + 0.19015751779079437, + -1.0676687955856323, + 0.7437305450439453, + 1.0595566034317017, + -0.8066569566726685, + -0.37590548396110535, + -0.7929309606552124, + 0.14477676153182983, + -0.9491528272628784, + 1.0657180547714233, + -0.988567054271698, + -0.0010927487164735794, + 0.9177857637405396, + 0.5309184193611145, + -1.0692315101623535, + 0.6662405133247375, + 0.6808658242225647, + 0.3741791546344757, + 0.8479061126708984, + -1.067051887512207, + -1.0665479898452759, + -1.0394282341003418, + 1.0538132190704346, + -1.069083333015442, + -1.0321730375289917, + -1.005937099456787, + 0.23671789467334747, + -0.8540018796920776, + -0.5658369660377502, + -1.0456392765045166, + -0.7948101162910461, + 0.7998917102813721, + -0.9958850741386414, + 1.0133119821548462, + 0.9221243262290955, + 0.41227594017982483, + -1.066733717918396, + 0.003338152775540948, + -1.021262288093567, + -1.0639111995697021, + 0.09027571231126785, + 0.1457938700914383, + 0.5241350531578064, + -1.0386651754379272, + -0.6955736875534058, + 0.15861226618289948, + 0.7782869338989258, + 1.0392506122589111, + 1.0548017024993896, + 0.9494943022727966, + 0.803039014339447, + 0.6559628844261169, + 0.5251676440238953, + 0.41550907492637634, + 0.3264423906803131, + 0.2553892135620117, + 0.1992960274219513, + 0.15528593957424164, + 0.1208832636475563, + 0.09405004978179932, + 0.07314864546060562, + 0.05688077583909035, + 0.044225383549928665, + 0.034383151680231094 + ], + [ + -0.7902251482009888, + -0.4345173239707947, + 1.056208848953247, + 0.21488043665885925, + 0.9638862609863281, + 1.057814598083496, + -0.750721275806427, + 0.6599991917610168, + 1.042797565460205, + -0.25054293870925903, + 0.9605727791786194, + 0.8296240568161011, + 0.6481813788414001, + -1.0681465864181519, + 0.026310738176107407, + -0.9767001867294312, + -0.8753045797348022, + 0.05996488779783249, + -0.9776279330253601, + 0.33343228697776794, + -0.8125626444816589, + 1.0561962127685547, + 0.3579457700252533, + -0.2970648407936096, + -0.759721577167511, + -0.966127872467041, + -0.4836031496524811, + -0.31005367636680603, + 1.067772388458252, + 1.0192601680755615, + -1.0688796043395996, + -0.32840093970298767, + -0.7854953408241272, + 0.5931153297424316, + -1.0684417486190796, + -0.02163565531373024, + 0.4325360655784607, + 1.0683929920196533, + -0.722478985786438, + -0.7940815687179565, + 0.6880764365196228, + -0.3306683599948883, + 0.797936737537384, + -0.9481998682022095, + -0.8344391584396362, + 0.003755486337468028, + 0.6906352639198303, + 1.0131542682647705, + 1.0643237829208374, + 0.9742530584335327, + 0.8314846754074097, + 0.6827107667922974, + 0.548229992389679, + 0.43452969193458557, + 0.3417493999004364, + 0.2675352394580841, + 0.208854541182518, + 0.16277137398719788, + 0.12672804296016693, + 0.09860574454069138, + 0.07669580727815628, + 0.059640903025865555, + 0.04637227579951286, + 0.03605266287922859 + ] + ] + }, + { + "rot": 256, + "theta": 10000000.0, + "factor": 2.0, + "original": 262144, + "magnitude": 1.0693147180559945, + "inv_freq": [ + 1.0, + 0.8816831111907959, + 0.7773650288581848, + 0.6853895783424377, + 0.6042963862419128, + 0.5327979326248169, + 0.46975892782211304, + 0.4141784608364105, + 0.36517414450645447, + 0.32196786999702454, + 0.283873587846756, + 0.2502865493297577, + 0.22067342698574066, + 0.19456399977207184, + 0.17154379189014435, + 0.15124724805355072, + 0.1333521455526352, + 0.11757431924343109, + 0.10366329550743103, + 0.09139817208051682, + 0.08058421313762665, + 0.07104974240064621, + 0.06264335662126541, + 0.05523158237338066, + 0.04869674891233444, + 0.04293510317802429, + 0.037855152040719986, + 0.03337624669075012, + 0.02942727319896221, + 0.025945525616407394, + 0.02287573181092739, + 0.020169146358966827, + 0.017782794311642647, + 0.01567878946661949, + 0.01382372248917818, + 0.012188142165541649, + 0.010746078565716743, + 0.009474635124206543, + 0.008353625424206257, + 0.0073652504943311214, + 0.006493816152215004, + 0.0057254876010119915, + 0.005048065446317196, + 0.004450793843716383, + 0.003924190066754818, + 0.003459891537204385, + 0.0030505280010402203, + 0.0026895988266915083, + 0.0023713738191872835, + 0.0020908000878989697, + 0.0018434228841215372, + 0.0016253149369731545, + 0.0014330126577988267, + 0.0012634629383683205, + 0.0011139739071950316, + 0.000982171855866909, + 0.0008659643353894353, + 0.0007503421511501074, + 0.0006499576265923679, + 0.0005628234939649701, + 0.0004872095014434308, + 0.00042160949669778347, + 0.00036471226485446095, + 0.0003153767320327461, + 0.0002726101374719292, + 0.00023554862127639353, + 0.00020344088261481375, + 0.00017563349683769047, + 0.00015155834262259305, + 0.000130721484310925, + 0.00011269371316302568, + 9.710196172818542e-05, + 8.362214430235326e-05, + 7.197279774118215e-05, + 6.190945714479312e-05, + 5.32199046574533e-05, + 4.571993486024439e-05, + 3.924968768842518e-05, + 3.3670494303805754e-05, + 2.8862075851066038e-05, + 2.472013875376433e-05, + 2.1154290152480826e-05, + 1.80861861736048e-05, + 1.5447960322489962e-05, + 1.3180847417970654e-05, + 1.123395031754626e-05, + 9.904783837555442e-06, + 8.732880814932287e-06, + 7.699632078583818e-06, + 6.788635801058263e-06, + 5.98542510488187e-06, + 5.277247964841081e-06, + 4.6528602979378775e-06, + 4.102348157175584e-06, + 3.6169706163491355e-06, + 3.189021754224086e-06, + 2.81170673588349e-06, + 2.479034037605743e-06, + 2.1857224510313245e-06, + 1.9271144537924556e-06, + 1.6991041320579825e-06, + 1.4980713558543357e-06, + 1.3208241398388054e-06, + 1.1645482800304308e-06, + 1.0267624475090997e-06, + 9.052791938302107e-07, + 7.981693102010468e-07, + 7.037323825898056e-07, + 6.204688816069392e-07, + 5.470569135468395e-07, + 4.823307904189278e-07, + 4.252629253187479e-07, + 3.7494712046282075e-07, + 3.3058452686418605e-07, + 2.9147076929803006e-07, + 2.569848618350079e-07, + 2.2657918918866926e-07, + 1.9977102283519343e-07, + 1.761347334650054e-07, + 1.552950124050767e-07, + 1.3692098832507327e-07, + 1.20720912377692e-07, + 1.0643758230344247e-07, + 9.384421417735211e-08, + 8.274085416815069e-08, + 7.295121662309612e-08, + 6.43198490024588e-08, + 5.6709719586933716e-08 + ], + "cos": [ + [ + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646 + ], + [ + 0.5777531862258911, + 0.6799269914627075, + 0.7621692419052124, + 0.8278340101242065, + 0.8799412846565247, + 0.92109614610672, + 0.9534838199615479, + 0.978901207447052, + 0.998805820941925, + 1.0143674612045288, + 1.0265183448791504, + 1.035996437072754, + 1.043384075164795, + 1.0491389036178589, + 1.0536197423934937, + 1.0571073293685913, + 1.0598211288452148, + 1.0619323253631592, + 1.0635744333267212, + 1.0648515224456787, + 1.0658446550369263, + 1.0666168928146362, + 1.067217230796814, + 1.0676841735839844, + 1.068047046661377, + 1.0683293342590332, + 1.068548560142517, + 1.0687191486358643, + 1.0688517093658447, + 1.0689548254013062, + 1.0690349340438843, + 1.0690972805023193, + 1.069145679473877, + 1.069183349609375, + 1.069212555885315, + 1.0692353248596191, + 1.0692529678344727, + 1.069266676902771, + 1.0692774057388306, + 1.0692857503890991, + 1.0692921876907349, + 1.069297194480896, + 1.0693011283874512, + 1.06930410861969, + 1.069306492805481, + 1.0693084001541138, + 1.0693097114562988, + 1.0693107843399048, + 1.0693117380142212, + 1.069312334060669, + 1.0693128108978271, + 1.0693132877349854, + 1.069313645362854, + 1.069313883781433, + 1.0693141222000122, + 1.0693142414093018, + 1.0693143606185913, + 1.0693143606185913, + 1.0693144798278809, + 1.0693144798278809, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646, + 1.06931471824646 + ], + [ + 0.8597189784049988, + 0.12086047232151031, + 0.08865529298782349, + 0.3592999577522278, + 0.9942150712013245, + -0.5166255235671997, + 0.09923054277896881, + 1.0691953897476196, + 1.0025675296783447, + 0.8257118463516235, + 1.0019184350967407, + 0.5646449327468872, + 0.6644225120544434, + 0.5501449108123779, + 0.5102278590202332, + -0.8734031319618225, + 0.9734212756156921, + -0.6471863985061646, + -0.9435669183731079, + -0.9293569326400757, + -1.0467698574066162, + -0.4383901357650757, + 0.5565336346626282, + 1.0687006711959839, + -0.031272951513528824, + 1.0669151544570923, + -0.46909114718437195, + 0.05325764790177345, + 0.4332946836948395, + 0.9164575338363647, + 0.9122970104217529, + 0.6380595564842224, + -0.8934475779533386, + 0.19388730823993683, + 1.0664434432983398, + 1.0070801973342896, + 1.0687097311019897, + 0.4764467477798462, + -1.0077195167541504, + 0.3393491506576538, + 0.11192997545003891, + -0.11775708943605423, + -0.2713061571121216, + 0.8708483576774597, + -0.9986739158630371, + -0.036936186254024506, + 1.066589593887329, + 0.022478019818663597, + -1.025161623954773, + -0.6969631910324097, + 0.3193954527378082, + 0.9953557848930359, + 0.9791648387908936, + 0.4773583710193634, + -0.15932254493236542, + -0.6801744103431702, + -0.9826422333717346, + -1.0668295621871948, + -0.9487894773483276, + -0.7166948318481445, + -0.44071927666664124, + -0.16626004874706268, + 0.08218647539615631, + 0.29449695348739624, + 0.4691407382488251, + 0.6090553402900696, + 0.7190515995025635, + 0.8043435215950012, + 0.8698054552078247, + 0.9196605086326599, + 0.9574044942855835, + 0.9858469367027283, + 1.0072009563446045, + 1.0231845378875732, + 1.0351182222366333, + 1.044008731842041, + 1.0506192445755005, + 1.055525779724121, + 1.0591614246368408, + 1.061851143836975, + 1.0638378858566284, + 1.065303087234497, + 1.066381812095642, + 1.0671747922897339, + 1.0677566528320312, + 1.0681829452514648, + 1.0684348344802856, + 1.0686306953430176, + 1.068782925605774, + 1.0689013004302979, + 1.068993330001831, + 1.069064974784851, + 1.0691205263137817, + 1.0691637992858887, + 1.069197416305542, + 1.0692235231399536, + 1.0692437887191772, + 1.0692596435546875, + 1.0692719221115112, + 1.0692813396453857, + 1.0692888498306274, + 1.0692945718765259, + 1.0692989826202393, + 1.0693025588989258, + 1.0693053007125854, + 1.0693074464797974, + 1.0693089962005615, + 1.0693103075027466, + 1.069311261177063, + 1.0693120956420898, + 1.069312572479248, + 1.0693131685256958, + 1.069313406944275, + 1.0693137645721436, + 1.0693140029907227, + 1.0693141222000122, + 1.0693142414093018, + 1.0693143606185913, + 1.0693144798278809, + 1.0693144798278809, + 1.0693144798278809, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704, + 1.0693145990371704, + 1.06931471824646 + ], + [ + -0.6513853669166565, + 1.0648926496505737, + -0.19290786981582642, + -0.7843515872955322, + 0.9871648550033569, + 1.01374351978302, + 1.059841275215149, + 0.9159117937088013, + -0.9953956604003906, + 0.9835533499717712, + -0.8994616866111755, + -0.2907947599887848, + 0.2952715754508972, + -1.0544582605361938, + 1.0369493961334229, + 0.06821295619010925, + -0.7212009429931641, + -0.6810116171836853, + 1.054075002670288, + -0.036619432270526886, + 0.9285621643066406, + -0.27625617384910583, + -0.9795029759407043, + -0.5520840883255005, + -0.36669492721557617, + -0.3976605534553528, + -0.7229933142662048, + -1.0692088603973389, + -0.02881699800491333, + -1.0628392696380615, + -0.8900305032730103, + -1.063999056816101, + 0.9443737268447876, + 0.6798552870750427, + -0.03756128251552582, + -1.0686062574386597, + -0.5783533453941345, + -0.295753538608551, + -1.056593656539917, + -0.2544029951095581, + 0.9698436856269836, + 0.7565687894821167, + -0.8147097826004028, + -0.37385228276252747, + -0.18366917967796326, + -0.6358828544616699, + -0.14840036630630493, + 0.24174010753631592, + 0.9864349961280823, + 0.12726154923439026, + 0.9032161831855774, + 0.39577341079711914, + 0.2478526532649994, + -0.24382933974266052, + -1.057676911354065, + 1.0586854219436646, + 0.7358847260475159, + -0.36405715346336365, + 0.7926532030105591, + -1.0622985363006592, + -0.4976309835910797, + -0.9024218916893005, + 0.22480200231075287, + 0.584578275680542, + -0.7497449517250061, + 0.4998137950897217, + -1.0661896467208862, + -0.5013577342033386, + -0.4747675955295563, + -1.0247266292572021, + -0.3193347454071045, + 1.014404535293579, + -1.0666817426681519, + 1.0691488981246948, + -0.9273504018783569, + 0.19768640398979187, + 0.8937321901321411, + -0.6942081451416016, + -0.8835726976394653, + 0.30371347069740295, + 1.0486267805099487, + 0.7912856340408325, + 0.030768586322665215, + -0.657989501953125, + -1.0171388387680054, + -1.048696756362915, + -0.9143319725990295, + -0.7038566470146179, + -0.4628109037876129, + -0.22165097296237946, + 0.0018809328321367502, + 0.19922155141830444, + 0.3677518963813782, + 0.508329451084137, + 0.623598575592041, + 0.7169232368469238, + 0.791765034198761, + 0.8513538241386414, + 0.8985382914543152, + 0.9357439875602722, + 0.9649868607521057, + 0.9879139065742493, + 1.005854845046997, + 1.0198732614517212, + 1.0308140516281128, + 1.0393452644348145, + 1.0459932088851929, + 1.0511705875396729, + 1.0552012920379639, + 1.0583380460739136, + 1.0607784986495972, + 1.062677025794983, + 1.0641536712646484, + 1.0653020143508911, + 1.0661948919296265, + 1.0668891668319702, + 1.0674290657043457, + 1.067848801612854, + 1.0681750774383545, + 1.0684287548065186, + 1.0686259269714355, + 1.0687793493270874, + 1.0688985586166382, + 1.0689911842346191, + 1.0690631866455078, + 1.0691192150115967, + 1.0691627264022827, + 1.0691965818405151 + ], + [ + -1.0655258893966675, + 0.6080281734466553, + 0.6036512851715088, + -1.067401647567749, + 0.5742302536964417, + 0.7016583681106567, + 1.0096819400787354, + 0.616484522819519, + -0.7887967228889465, + 1.0656408071517944, + -0.7036169171333313, + -0.53633713722229, + 0.511264443397522, + -1.0688828229904175, + 0.9770159721374512, + -0.09452058374881744, + -0.6103026866912842, + -0.772730827331543, + 1.0670206546783447, + -0.1344296932220459, + 0.8831673860549927, + -0.3481474816799164, + -0.9507979154586792, + -0.6021782159805298, + -0.317230761051178, + -0.4399321377277374, + -0.7524679899215698, + -1.0681201219558716, + 0.0025070905685424805, + -1.0655239820480347, + -0.9033966660499573, + -1.0659174919128418, + 0.9530444145202637, + 0.6668764352798462, + -0.022686710581183434, + -1.0680515766143799, + -0.5879814028739929, + -0.3055242598056793, + -1.055192232131958, + -0.2620031237602234, + 0.9727371335029602, + 0.7608917951583862, + -0.8112333416938782, + -0.36944612860679626, + -0.1795528680086136, + -0.6388699412345886, + -0.15163138508796692, + 0.23894187808036804, + 0.9874147772789001, + 0.12505801022052765, + 0.9042627811431885, + 0.39737963676452637, + 0.2493443638086319, + -0.24252645671367645, + -1.0578539371490479, + 1.058831810951233, + 0.7352097034454346, + -0.3648087680339813, + 0.7921821475028992, + -1.0623674392700195, + -0.4980930685997009, + -0.902181088924408, + 0.22441914677619934, + 0.5842981934547424, + -0.749954342842102, + 0.5000373721122742, + -1.0662062168121338, + -0.501523494720459, + -0.4749138057231903, + -1.024766206741333, + -0.3192198872566223, + 1.0143717527389526, + -1.066688060760498, + 1.0691475868225098, + -0.9273179173469543, + 0.19763028621673584, + 0.8937591314315796, + -0.6941763162612915, + -0.8835928440093994, + 0.30368363857269287, + 1.0486215353012085, + 0.7913007140159607, + 0.03078795224428177, + -0.6579766273498535, + -1.0171345472335815, + -1.048699140548706, + -0.9143375158309937, + -0.7038637399673462, + -0.4628182649612427, + -0.22165808081626892, + 0.0018745592096820474, + 0.19921603798866272, + 0.3677472472190857, + 0.5083256363868713, + 0.6235954761505127, + 0.7169206738471985, + 0.7917630076408386, + 0.8513522148132324, + 0.8985370397567749, + 0.9357430338859558, + 0.9649860858917236, + 0.9879133105278015, + 1.0058543682098389, + 1.019872784614563, + 1.0308136940002441, + 1.039345145225525, + 1.0459929704666138, + 1.0511704683303833, + 1.0552011728286743, + 1.058337926864624, + 1.0607784986495972, + 1.062677025794983, + 1.0641535520553589, + 1.0653018951416016, + 1.0661948919296265, + 1.0668891668319702, + 1.0674290657043457, + 1.067848801612854, + 1.0681750774383545, + 1.0684287548065186, + 1.0686259269714355, + 1.0687793493270874, + 1.0688985586166382, + 1.0689911842346191, + 1.0690631866455078, + 1.0691192150115967, + 1.0691627264022827, + 1.0691965818405151 + ], + [ + -1.0522708892822266, + 0.8074479699134827, + -0.05930701270699501, + -0.9720513820648193, + -0.7683091163635254, + -0.2482469081878662, + 0.14413057267665863, + -0.1693471074104309, + -0.7019533514976501, + -0.8213952779769897, + 1.0010639429092407, + 0.511832594871521, + -0.7174220681190491, + 0.9070536494255066, + 1.0594686269760132, + 0.7500777840614319, + 0.49248647689819336, + -0.11486396938562393, + -0.08763059973716736, + 0.09781012684106827, + -0.4076384902000427, + 1.0337498188018799, + 1.0693141222000122, + 0.39584189653396606, + 0.5487287640571594, + -0.5337479710578918, + -0.9282023310661316, + 1.0691578388214111, + -0.013338646851480007, + -0.45949143171310425, + -0.8363955616950989, + 1.0673372745513916, + 0.8245336413383484, + -0.4650532305240631, + 1.0017105340957642, + 0.8712486624717712, + 0.6515282988548279, + 1.0470679998397827, + 0.06952807307243347, + 0.8323741555213928, + 0.07687243074178696, + -0.780223548412323, + -0.2510434091091156, + 0.43741264939308167, + -0.18141566216945648, + -0.5117603540420532, + 0.022245239466428757, + 1.0484681129455566, + -0.279379278421402, + -0.7821656465530396, + -0.3626629710197449, + -0.5641676187515259, + 1.0427840948104858, + -1.0301964282989502, + -0.6435174345970154, + 0.5800156593322754, + 0.9073381423950195, + -0.26376578211784363, + -0.18724913895130157, + 0.25334858894348145, + 0.14002014696598053, + -1.0156885385513306, + 1.0582853555679321, + 0.8772346377372742, + -0.370892733335495, + -0.03786427900195122, + 0.39793872833251953, + 1.0576493740081787, + 0.9926570653915405, + -0.8748014569282532, + 1.0476127862930298, + -0.1531391143798828, + -0.6041576862335205, + -0.15124283730983734, + 0.9575929641723633, + 0.09992540627717972, + -0.6904867887496948, + 0.7637256383895874, + -0.45885878801345825, + -0.30973702669143677, + 1.046640157699585, + -0.43449050188064575, + -0.9923649430274963, + 0.1386214792728424, + 1.019241213798523, + 0.8406627178192139, + 0.2541821599006653, + -0.3625932037830353, + -0.8121644854545593, + -1.0353474617004395, + -1.0574856996536255, + -0.9368858337402344, + -0.7332826256752014, + -0.49414560198783875, + -0.2517778277397156, + -0.025355977937579155, + 0.17557725310325623, + 0.3477979302406311, + 0.49182775616645813, + 0.6101534366607666, + 0.706089437007904, + 0.7831082344055176, + 0.844480037689209, + 0.8931068181991577, + 0.93146812915802, + 0.9616302251815796, + 0.9852848052978516, + 1.0037989616394043, + 1.0182678699493408, + 1.0295616388320923, + 1.038369059562683, + 1.0452326536178589, + 1.0505784749984741, + 1.054740309715271, + 1.0579793453216553, + 1.0604995489120483, + 1.062459945678711, + 1.063984751701355, + 1.0651706457138062, + 1.066092848777771, + 1.0668097734451294, + 1.0673673152923584, + 1.067800760269165, + 1.068137764930725, + 1.0683997869491577, + 1.0686033964157104, + 1.0687618255615234, + 1.0688848495483398 + ], + [ + 0.7204014658927917, + 0.525600016117096, + -0.9770510196685791, + 0.7394928932189941, + 0.16690370440483093, + 0.40845200419425964, + 1.047502040863037, + 0.08546723425388336, + 0.46298733353614807, + 0.9414898753166199, + 0.1564042568206787, + -0.7443639039993286, + -0.7614797949790955, + 1.059080719947815, + 0.8413293957710266, + -1.0688780546188354, + -0.23665851354599, + -0.07772661000490189, + 1.0395491123199463, + -1.0552698373794556, + 0.4698231816291809, + -0.886785626411438, + 0.6746538877487183, + -0.44490334391593933, + -0.8504674434661865, + -0.7411206364631653, + -0.049967240542173386, + 1.0673035383224487, + -1.06899094581604, + 1.0490853786468506, + 0.4353052079677582, + 1.0520436763763428, + 0.614227831363678, + -0.22120295464992523, + -1.0676320791244507, + 1.0654528141021729, + -0.4332176446914673, + -0.9001200795173645, + 1.0160003900527954, + -0.9446185827255249, + 0.6951085329055786, + 0.0075360615737736225, + 0.16698326170444489, + -0.8109739422798157, + -1.0076253414154053, + -0.30941998958587646, + -1.0272226333618164, + -0.9612756371498108, + 0.7525005340576172, + -1.0395455360412598, + 0.45829126238822937, + -0.7751805186271667, + -0.9537095427513123, + -0.9586957693099976, + 1.0233770608901978, + 1.027299404144287, + -0.05741226673126221, + -0.8209205269813538, + 0.10511433333158493, + 1.0414828062057495, + -0.6057157516479492, + 0.4534398913383484, + -0.9749553799629211, + -0.4304531514644623, + -0.017660684883594513, + -0.6018646359443665, + 1.0568652153015137, + -0.5990272164344788, + -0.6475985646247864, + 0.8947566151618958, + -0.8786531090736389, + 0.8552500605583191, + 1.0588085651397705, + 1.0686489343643188, + 0.539095938205719, + -0.996242105960846, + 0.4246912896633148, + -0.16798348724842072, + 0.3909064531326294, + -0.8968067169189453, + 0.9873533248901367, + 0.1017996296286583, + -1.0675429105758667, + -0.2595592439174652, + 0.8656948804855347, + 0.9876425862312317, + 0.4943186342716217, + -0.14270390570163727, + -0.6686892509460449, + -0.9774226546287537, + -1.0693081617355347, + -0.995083749294281, + -0.8163681030273438, + -0.5860204100608826, + -0.34198302030563354, + -0.10799416899681091, + 0.10319384932518005, + 0.2863234877586365, + 0.4407549500465393, + 0.5683994293212891, + 0.6723594665527344, + 0.7561036944389343, + 0.8230066299438477, + 0.8761200904846191, + 0.9180837869644165, + 0.9511165618896484, + 0.9770455360412598, + 0.9973538517951965, + 1.0132330656051636, + 1.0256329774856567, + 1.0353060960769653, + 1.0428462028503418, + 1.0487200021743774, + 1.0532935857772827, + 1.0568535327911377, + 1.0596235990524292, + 1.0617786645889282, + 1.0634549856185913, + 1.0647586584091187, + 1.0657724142074585, + 1.0665606260299683, + 1.0671736001968384, + 1.0676501989364624, + 1.0680207014083862, + 1.0683088302612305, + 1.0685327053070068, + 1.068706750869751, + 1.0688421726226807 + ] + ], + "sin": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 0.899797260761261, + 0.8253079652786255, + 0.7500213384628296, + 0.6768491268157959, + 0.6075666546821594, + 0.5431535243988037, + 0.48404812812805176, + 0.43033286929130554, + 0.38186508417129517, + 0.3383674621582031, + 0.29948970675468445, + 0.26484957337379456, + 0.23405885696411133, + 0.20674000680446625, + 0.18253596127033234, + 0.16111499071121216, + 0.1421731561422348, + 0.1254344880580902, + 0.11065026372671127, + 0.0975973978638649, + 0.08607665449380875, + 0.07591063529253006, + 0.06694166362285614, + 0.059029921889305115, + 0.052051570266485214, + 0.04589703306555748, + 0.04046940430998802, + 0.03568308800458908, + 0.031462475657463074, + 0.02774081937968731, + 0.024459224194288254, + 0.02156570367515087, + 0.019014401361346245, + 0.016764873638749123, + 0.014781438745558262, + 0.013032637536525726, + 0.011490718461573124, + 0.010131215676665306, + 0.008932551369071007, + 0.007875699549913406, + 0.006943884305655956, + 0.006122314836829901, + 0.00539794797077775, + 0.004759283270686865, + 0.004196183290332556, + 0.003699705470353365, + 0.0032619694247841835, + 0.002876024227589369, + 0.002535742474719882, + 0.0022357215639203787, + 0.0019711980130523443, + 0.0017379724886268377, + 0.0015323410043492913, + 0.001351039158180356, + 0.001191188464872539, + 0.0010502507211640477, + 0.0009259883081540465, + 0.0008023518603295088, + 0.0006950091919861734, + 0.0006018353742547333, + 0.000520980276633054, + 0.0004508332349359989, + 0.00038999220123514533, + 0.00033723696833476424, + 0.0002915060322266072, + 0.00025187560822814703, + 0.00021754232875537127, + 0.0001878074835985899, + 0.00016206355940084904, + 0.00013978240895085037, + 0.00012050504301441833, + 0.00010383255721535534, + 8.94183904165402e-05, + 7.696157263126224e-05, + 6.620069325435907e-05, + 5.690882608178072e-05, + 4.888900002697483e-05, + 4.1970270103774965e-05, + 3.600435593398288e-05, + 3.0862644052831456e-05, + 2.6433608582010493e-05, + 2.2620593881583773e-05, + 1.9339824575581588e-05, + 1.6518732081749476e-05, + 1.4094473954173736e-05, + 1.201262875838438e-05, + 1.0591331374598667e-05, + 9.338197742181364e-06, + 8.233329936047085e-06, + 7.259188350872137e-06, + 6.400302936526714e-06, + 5.6430390031891875e-06, + 4.975372121407418e-06, + 4.386701220937539e-06, + 3.867679879476782e-06, + 3.4100678476534085e-06, + 3.0065993996686302e-06, + 2.6508676000958076e-06, + 2.337225168957957e-06, + 2.0606919406418456e-06, + 1.8168771021009888e-06, + 1.6019097301978036e-06, + 1.4123767186902114e-06, + 1.2452686632968835e-06, + 1.097932226912235e-06, + 9.680284165369812e-07, + 8.534942139704071e-07, + 7.52511368773412e-07, + 6.634764986301889e-07, + 5.849760214005073e-07, + 5.157634177521686e-07, + 4.5473990439859335e-07, + 4.0093647157846135e-07, + 3.534989048148418e-07, + 3.1167397196441016e-07, + 2.747976850514533e-07, + 2.422844715965766e-07, + 2.1361809388054098e-07, + 1.8834346349194675e-07, + 1.660592374719272e-07, + 1.4641162238149263e-07, + 1.2908864732708025e-07, + 1.1381527542653203e-07, + 1.0034899844413303e-07, + 8.847601407069305e-08, + 7.800780821298758e-08, + 6.877816360884026e-08, + 6.064053792442792e-08 + ], + [ + -0.6358594298362732, + -1.062462568283081, + -1.0656332969665527, + -1.007143259048462, + -0.3936627209186554, + 0.93623286485672, + 1.0647004842758179, + 0.015977798029780388, + 0.3718767762184143, + -0.679436445236206, + 0.3736218810081482, + 0.9080803990364075, + -0.8378404974937439, + -0.9169375896453857, + -0.9397347569465637, + -0.6169286370277405, + -0.44258883595466614, + -0.8512247800827026, + -0.5031058192253113, + -0.5288947224617004, + -0.2184189260005951, + 0.975319504737854, + -0.9130740761756897, + 0.03623250871896744, + -1.0688573122024536, + -0.07159688323736191, + -0.9609304666519165, + -1.0679875612258911, + 0.9775937795639038, + -0.5509442090988159, + -0.5578064918518066, + 0.858087420463562, + -0.5875248312950134, + 1.051590085029602, + 0.07831012457609177, + -0.3594764471054077, + 0.03596566617488861, + 0.9573047757148743, + 0.3576805591583252, + -1.0140395164489746, + 1.0634404420852661, + -1.062811017036438, + 1.0343244075775146, + -0.6205296516418457, + -0.38220974802970886, + 1.0686765909194946, + -0.07629266381263733, + -1.0690784454345703, + -0.30410149693489075, + 0.8109724521636963, + 1.0205000638961792, + 0.3907695710659027, + -0.42973271012306213, + -0.956850528717041, + -1.0573790073394775, + -0.8251040577888489, + -0.4217204451560974, + 0.07286135107278824, + 0.4931860566139221, + 0.793588399887085, + 0.9742691516876221, + 1.0563102960586548, + 1.0661516189575195, + 1.0279618501663208, + 0.9609062671661377, + 0.8789116144180298, + 0.7914536595344543, + 0.7046030759811401, + 0.6219906806945801, + 0.5455808639526367, + 0.4762464165687561, + 0.41417360305786133, + 0.35913822054862976, + 0.3106883764266968, + 0.26826128363609314, + 0.23125684261322021, + 0.1990809440612793, + 0.17117063701152802, + 0.1470067799091339, + 0.12611913681030273, + 0.10808714479207993, + 0.09253805875778198, + 0.07914348691701889, + 0.0676155835390091, + 0.0577029250562191, + 0.04918636754155159, + 0.04337019473314285, + 0.038241103291511536, + 0.033718131482601166, + 0.029729802161455154, + 0.026213016360998154, + 0.023112086579203606, + 0.02037789113819599, + 0.01796708256006241, + 0.015841437503695488, + 0.013967241160571575, + 0.012314759194850922, + 0.010857767425477505, + 0.00957314670085907, + 0.008440505713224411, + 0.0074418680742383, + 0.006561380811035633, + 0.00578506663441658, + 0.005100600887089968, + 0.004497116897255182, + 0.003965035080909729, + 0.003495906013995409, + 0.0030822823755443096, + 0.002717596711590886, + 0.002396059688180685, + 0.0021125655621290207, + 0.001862613600678742, + 0.0016422352055087686, + 0.0014479310484603047, + 0.0012766163563355803, + 0.001125571085140109, + 0.000992397079244256, + 0.000874979596119374, + 0.000771454768255353, + 0.0006801785784773529, + 0.0005997019470669329, + 0.0005287470994517207, + 0.0004661873681470752, + 0.0004110294976271689, + 0.00036239775363355875, + 0.00031951998244039714, + 0.0002817153581418097, + 0.00024838364333845675 + ], + [ + 0.8480159640312195, + 0.09714719653129578, + -1.0517702102661133, + 0.7267919182777405, + 0.41102248430252075, + 0.34023213386535645, + -0.14202295243740082, + 0.5518509149551392, + -0.3906678557395935, + -0.41959115862846375, + -0.5782755017280579, + 1.029015302658081, + -1.0277395248413086, + 0.1776278167963028, + 0.2610936164855957, + 1.0671367645263672, + -0.7894955277442932, + 0.8244131803512573, + -0.17988857626914978, + 1.0686874389648438, + 0.5302888751029968, + 1.0330133438110352, + -0.4289613664150238, + 0.9157713651657104, + -1.004474401473999, + 0.9926228523254395, + 0.7878543734550476, + -0.015043829567730427, + -1.0689263343811035, + 0.11750100553035736, + 0.5926885008811951, + 0.10648989677429199, + -0.5015896558761597, + 0.8253670334815979, + -1.0686547756195068, + -0.03891885653138161, + 0.899411678314209, + 1.0276010036468506, + -0.1644500195980072, + 1.0386111736297607, + -0.4503745436668396, + -0.7556703090667725, + -0.6925907135009766, + -1.0018324851989746, + -1.0534228086471558, + 0.8597016334533691, + 1.058967113494873, + 1.0416312217712402, + -0.4127710163593292, + 1.0617148876190186, + -0.5723935961723328, + -0.9933767318725586, + -1.040193796157837, + -1.0411441326141357, + 0.1573324352502823, + -0.1503962129354477, + 0.7758269906044006, + 1.005433440208435, + 0.7177289128303528, + 0.12229378521442413, + 0.9464656710624695, + -0.5736451148986816, + 1.0454176664352417, + 0.8953782916069031, + 0.762441098690033, + -0.9453148245811462, + 0.0816914290189743, + 0.9444968700408936, + 0.958138644695282, + 0.3055640161037445, + -1.0205191373825073, + 0.3382561504840851, + 0.07499263435602188, + 0.01882825791835785, + -0.5324051380157471, + 1.0508824586868286, + -0.5870917439460754, + -0.8133320808410645, + 0.6022734045982361, + 1.0252765417099, + 0.20932230353355408, + -0.719236433506012, + -1.0688719749450684, + -0.8429019451141357, + -0.3299431800842285, + 0.20897124707698822, + 0.55446457862854, + 0.8049967885017395, + 0.963970959186554, + 1.0460902452468872, + 1.0693130493164062, + 1.0505925416946411, + 1.0040879249572754, + 0.9407630562782288, + 0.868653416633606, + 0.7933820486068726, + 0.7187086343765259, + 0.6470167636871338, + 0.5797093510627747, + 0.5175104737281799, + 0.4606889486312866, + 0.40921875834465027, + 0.3628910481929779, + 0.32139164209365845, + 0.2843526303768158, + 0.25138670206069946, + 0.22210858762264252, + 0.1961486041545868, + 0.17315985262393951, + 0.15282228589057922, + 0.13484381139278412, + 0.11896012723445892, + 0.10493354499340057, + 0.0925513207912445, + 0.08162368088960648, + 0.07198182493448257, + 0.0634758397936821, + 0.05597289279103279, + 0.04935538396239281, + 0.043519243597984314, + 0.03837253898382187, + 0.03383404016494751, + 0.029832005500793457, + 0.026303134858608246, + 0.023191550746560097, + 0.020447954535484314, + 0.018028859049081802, + 0.01589590683579445 + ], + [ + -0.08993688225746155, + 0.8796225190162659, + -0.8826319575309753, + 0.06393515318632126, + 0.9020496606826782, + 0.8069136142730713, + 0.3521025776863098, + 0.8737166523933411, + -0.7219651341438293, + -0.08856476843357086, + -0.805206298828125, + 0.9250818490982056, + -0.9391712546348572, + -0.03039141371846199, + 0.43459609150886536, + 1.065129041671753, + -0.8780458569526672, + 0.7391353249549866, + -0.07000717520713806, + 1.060831069946289, + 0.602867603302002, + 1.0110526084899902, + -0.4893029034137726, + 0.883637547492981, + -1.0211750268936157, + 0.9746248722076416, + 0.7597538232803345, + -0.0505300909280777, + -1.0693117380142212, + 0.08995961397886276, + 0.5721087455749512, + 0.085169218480587, + -0.4849127233028412, + 0.8358886241912842, + -1.069074034690857, + -0.051960136741399765, + 0.8931471109390259, + 1.0247384309768677, + -0.17321480810642242, + 1.0367200374603271, + -0.4440905451774597, + -0.7513172626495361, + -0.6966595649719238, + -1.0034657716751099, + -1.0541322231292725, + 0.8574842214584351, + 1.0585092306137085, + 1.0422767400741577, + -0.410421758890152, + 1.061976671218872, + -0.5707387328147888, + -0.9927353262901306, + -1.039837121963501, + -1.0414484739303589, + 0.15613806247711182, + -0.14936228096485138, + 0.7764667868614197, + 1.005160927772522, + 0.7182489037513733, + 0.12169402092695236, + 0.9462226033210754, + -0.5740237236022949, + 1.0454999208450317, + 0.8955610394477844, + 0.762235164642334, + -0.9451965689659119, + 0.08147586137056351, + 0.9444088935852051, + 0.9580661654472351, + 0.3054310977458954, + -1.020555019378662, + 0.33835482597351074, + 0.07490310817956924, + 0.018905749544501305, + -0.5324617624282837, + 1.0508930683135986, + -0.5870507955551147, + -0.8133592009544373, + 0.6022439002990723, + 1.0252853631973267, + 0.20934830605983734, + -0.7192198038101196, + -1.0688713788986206, + -0.8429120182991028, + -0.3299565315246582, + 0.20895950496196747, + 0.5544554591178894, + 0.8049905300140381, + 0.9639674425125122, + 1.0460888147354126, + 1.0693130493164062, + 1.050593614578247, + 1.004089593887329, + 0.9407651424407959, + 0.8686556816101074, + 0.793384313583374, + 0.7187108397483826, + 0.6470188498497009, + 0.5797113180160522, + 0.5175122618675232, + 0.46069058775901794, + 0.40922024846076965, + 0.36289238929748535, + 0.32139280438423157, + 0.28435367345809937, + 0.2513876259326935, + 0.22210942208766937, + 0.1961493343114853, + 0.17316049337387085, + 0.15282288193702698, + 0.1348443180322647, + 0.11896057426929474, + 0.10493393987417221, + 0.09255167096853256, + 0.08162398636341095, + 0.07198208570480347, + 0.0634760782122612, + 0.0559731088578701, + 0.04935557022690773, + 0.043519411236047745, + 0.03837268799543381, + 0.03383416682481766, + 0.02983211912214756, + 0.026303235441446304, + 0.02319163829088211, + 0.02044803276658058, + 0.018028927966952324, + 0.015895968303084373 + ], + [ + 0.19015751779079437, + 0.7010433077812195, + -1.0676687955856323, + -0.4455896317958832, + 0.7437305450439453, + -1.0400997400283813, + 1.0595566034317017, + 1.0558197498321533, + -0.8066569566726685, + 0.6846486926078796, + -0.37590548396110535, + 0.9388617277145386, + -0.7929309606552124, + -0.5662928223609924, + 0.14477676153182983, + -0.7621136903762817, + -0.9491528272628784, + 1.0631276369094849, + 1.0657180547714233, + 1.0648319721221924, + -0.988567054271698, + -0.2734871804714203, + -0.0010927487164735794, + 0.9933494925498962, + 0.9177857637405396, + -0.926578164100647, + 0.5309184193611145, + -0.018315389752388, + -1.0692315101623535, + -0.9655576348304749, + 0.6662405133247375, + 0.06500007212162018, + 0.6808658242225647, + -0.9628912210464478, + 0.3741791546344757, + -0.619967520236969, + 0.8479061126708984, + -0.2169850915670395, + -1.067051887512207, + 0.6712579727172852, + -1.0665479898452759, + -0.7312217354774475, + -1.0394282341003418, + 0.9757582545280457, + 1.0538132190704346, + 0.9389011263847351, + -1.069083333015442, + 0.21011583507061005, + -1.0321730375289917, + 0.7291439175605774, + -1.005937099456787, + 0.9083770513534546, + 0.23671789467334747, + -0.28658196330070496, + -0.8540018796920776, + 0.8983405828475952, + -0.5658369660377502, + -1.0362728834152222, + -1.0527923107147217, + -1.03886878490448, + -1.060107707977295, + -0.3343813121318817, + 0.15318617224693298, + 0.6114681959152222, + -1.0029319524765015, + -1.0686441659927368, + 0.9925112724304199, + -0.15751725435256958, + 0.3975750207901001, + 0.6149442195892334, + -0.21433930099010468, + -1.0582921504974365, + -0.8822853565216064, + -1.0585649013519287, + -0.47586727142333984, + 1.0646355152130127, + -0.8164936900138855, + 0.7484363913536072, + -0.9658584594726562, + 1.0234729051589966, + -0.21903958916664124, + -0.9770629405975342, + 0.3983036279678345, + 1.0602914094924927, + 0.32339009642601013, + -0.660848081111908, + -1.0386651754379272, + -1.0059622526168823, + -0.6955736875534058, + -0.26737523078918457, + 0.15861226618289948, + 0.5154404044151306, + 0.7782869338989258, + 0.9482901096343994, + 1.0392506122589111, + 1.069014072418213, + 1.0548017024993896, + 1.011172890663147, + 0.9494943022727966, + 0.8781496286392212, + 0.803039014339447, + 0.7281314730644226, + 0.6559628844261169, + 0.5880426168441772, + 0.5251676440238953, + 0.4676550030708313, + 0.41550907492637634, + 0.36853960156440735, + 0.3264423906803131, + 0.2888544201850891, + 0.2553892135620117, + 0.225660502910614, + 0.1992960274219513, + 0.1759456992149353, + 0.15528593957424164, + 0.13702107965946198, + 0.1208832636475563, + 0.10663152486085892, + 0.09405004978179932, + 0.08294621855020523, + 0.07314864546060562, + 0.06450513750314713, + 0.05688077583909035, + 0.050156090408563614, + 0.044225383549928665, + 0.03899525851011276, + 0.034383151680231094, + 0.030316205695271492 + ], + [ + -0.7902251482009888, + 0.9312242269515991, + -0.4345173239707947, + -0.7723886370658875, + 1.056208848953247, + 0.9882312417030334, + 0.21488043665885925, + 1.0658936500549316, + 0.9638862609863281, + -0.5069819688796997, + 1.057814598083496, + -0.767695426940918, + -0.750721275806427, + -0.1475868970155716, + 0.6599991917610168, + -0.030557645484805107, + 1.042797565460205, + -1.0664860010147095, + -0.25054293870925903, + -0.17274115979671478, + 0.9605727791786194, + -0.5975326895713806, + 0.8296240568161011, + -0.9723656177520752, + 0.6481813788414001, + -0.7708269357681274, + -1.0681465864181519, + 0.06555211544036865, + 0.026310738176107407, + -0.20701158046722412, + -0.9767001867294312, + -0.19141113758087158, + -0.8753045797348022, + 1.04618501663208, + 0.05996488779783249, + 0.09079859405755997, + -0.9776279330253601, + -0.5772501230239868, + 0.33343228697776794, + -0.5011284351348877, + -0.8125626444816589, + -1.0692881345748901, + 1.0561962127685547, + 0.6969614624977112, + 0.3579457700252533, + -1.023568868637085, + -0.2970648407936096, + 0.4683835506439209, + -0.759721577167511, + 0.25055742263793945, + -0.966127872467041, + -0.7365657687187195, + -0.4836031496524811, + 0.47364166378974915, + -0.31005367636680603, + -0.2967993915081024, + 1.067772388458252, + -0.6852179169654846, + 1.0641357898712158, + -0.24237890541553497, + -0.8812164068222046, + 0.9684142470359802, + 0.4391992390155792, + 0.9788482785224915, + -1.0691689252853394, + -0.8838511109352112, + -0.1626957356929779, + -0.885776698589325, + -0.8509113788604736, + -0.5855292677879333, + 0.6094281077384949, + 0.6418576836585999, + -0.14952710270881653, + 0.03772813826799393, + 0.9234768152236938, + 0.38850441575050354, + -0.9813619256019592, + 1.0560376644134521, + -0.9953019618988037, + 0.5823844075202942, + 0.4105696380138397, + -1.0644580125808716, + -0.061531033366918564, + 1.0373345613479614, + 0.6276991367340088, + -0.4098731577396393, + -0.9481998682022095, + -1.059749722480774, + -0.8344391584396362, + -0.43368062376976013, + 0.003755486337468028, + 0.39146173000335693, + 0.6906352639198303, + 0.8944350481033325, + 1.0131542682647705, + 1.0638474225997925, + 1.0643237829208374, + 1.0302683115005493, + 0.9742530584335327, + 0.9057350754737854, + 0.8314846754074097, + 0.7561357617378235, + 0.6827107667922974, + 0.6130641102790833, + 0.548229992389679, + 0.48868316411972046, + 0.43452969193458557, + 0.3856413960456848, + 0.3417493999004364, + 0.3025076687335968, + 0.2675352394580841, + 0.23644381761550903, + 0.208854541182518, + 0.18440836668014526, + 0.16277137398719788, + 0.14363735914230347, + 0.12672804296016693, + 0.11179253458976746, + 0.09860574454069138, + 0.08696653693914413, + 0.07669580727815628, + 0.06763432174921036, + 0.059640903025865555, + 0.05259045213460922, + 0.04637227579951286, + 0.040888506919145584, + 0.03605266287922859, + 0.031788360327482224 + ] + ] + } + ] +} diff --git a/tests/ref_test.cpp b/tests/ref_test.cpp index 535e5814..1ae9b6f1 100644 --- a/tests/ref_test.cpp +++ b/tests/ref_test.cpp @@ -22,6 +22,8 @@ #include "rad_abi.h" #include "../libref/ref_common.h" #include "rad_sample.h" +#include "../vendor/nlohmann/json.hpp" +#include #include #include @@ -1779,6 +1781,83 @@ TEST(op_rope) { CHECK_EQ(qkv.at(5), 9.0f); } +TEST(yarn_rotary_matches_independent_vllm_vectors) { + const std::string here = __FILE__; + std::ifstream input(here.substr(0, here.find_last_of('/')) + "/data/yarn_reference.json"); + REQUIRE(input.good()); + const auto fixture = nlohmann::json::parse(input); + const auto positions = fixture["positions"].get>(); + for (const auto& c : fixture["cases"]) { + const int rot = c["rot"], half = rot / 2, hd = rot + 16; + const double low = rot == 64 ? 14 : (rot == 128 ? 28 : 56); + const double high = rot == 64 ? 22 : (rot == 128 ? 43 : 85); + T pos(RAD_I32, {(int64_t)positions.size()}); pos.n(positions); + T qkv(RAD_F32, {(int64_t)positions.size(), hd * 3}); + std::vector values(positions.size() * hd * 3, 9.0f); + for (size_t m = 0; m < positions.size(); ++m) + for (int h = 0; h < 2; ++h) + for (int i = 0; i < rot; ++i) values[m * hd * 3 + h * hd + i] = i < half ? 1.0f : 0.0f; + qkv.f(values); + A direct; direct.t(qkv).t(pos).i("M", positions.size()).i("head_dim", hd).i("n_head", 1).i("n_head_kv", 1) + .i("rotary_dim", rot).d("theta", 1e7).d("scale", 1).s("mode", "neox") + .d("yarn_factor", 2).d("yarn_low", low).d("yarn_high", high).d("yarn_magnitude", c["magnitude"]); + CHECK_OK(run("rope", direct)); + /* The table is position-addressed. Allocate its real extent, not a compact stand-in. */ + T table(RAD_F32, {524288, rot}); + A ta; ta.t(pos).t(table).i("M", positions.size()).i("rot", rot).d("theta", 1e7).d("scale", 1).s("dtype", "f32") + .d("yarn_factor", 2).d("yarn_low", low).d("yarn_high", high).d("yarn_magnitude", c["magnitude"]); + CHECK_OK(run("rope_table", ta)); + for (size_t m = 0; m < positions.size(); ++m) { + for (int i = 0; i < half; ++i) { + const float cosine = c["cos"][m][i], sine = c["sin"][m][i]; + /* FP32 libm/pow versus torch; at long positions an inverse-frequency ULP + * is amplified into the phase. Bound the actual absolute cosine error. */ + CHECK_NEAR(qkv.at(m * hd * 3 + i), cosine, 0.004); + CHECK_NEAR(qkv.at(m * hd * 3 + half + i), sine, 0.004); + CHECK_EQ(table.at(positions[m] * rot + i), qkv.at(m * hd * 3 + i)); + CHECK_EQ(table.at(positions[m] * rot + half + i), qkv.at(m * hd * 3 + half + i)); + CHECK_EQ(qkv.at(m * hd * 3 + hd + i), qkv.at(m * hd * 3 + i)); + } + for (int i = rot; i < hd; ++i) CHECK_EQ(qkv.at(m * hd * 3 + i), 9.0f); + for (int i = 0; i < hd; ++i) CHECK_EQ(qkv.at(m * hd * 3 + 2 * hd + i), 9.0f); + } + } +} + +TEST(yarn_multimodal_positions_and_invalid_parameters) { + const int rot = 64, hd = 80; + T positions(RAD_I32, {3, 1}); positions.n({262144, 500000, 524287}); + T mixed(RAD_F32, {1, hd}); + std::vector seed(hd, 9.0f); + for (int i = 0; i < rot; ++i) seed[i] = i < rot/2 ? 1.0f : 0.0f; + mixed.f(seed); + auto params = [&](A& a, const char* mode) -> A& { + return a.i("M", 1).i("head_dim", hd).i("n_head", 1).i("n_head_kv", 0) + .i("rotary_dim", rot).d("theta", 1e7).d("scale", 1).s("mode", mode) + .s("sections", "11 11 10").d("yarn_factor", 2).d("yarn_low", 14) + .d("yarn_high", 22).d("yarn_magnitude", 1.069314718); + }; + A ma; ma.t(mixed).t(positions); params(ma, "imrope"); + CHECK_OK(run("rope", ma)); + for (int component = 0; component < 3; ++component) { + T plain(RAD_F32, {1, hd}); plain.f(seed); + T pos(RAD_I32, {1}); pos.n({positions.iat(component)}); + A a; a.t(plain).t(pos); params(a, "neox"); + CHECK_OK(run("rope", a)); + for (int i = 0; i < 32; ++i) { + const int selected = i % 3 == 1 && i < 33 ? 1 : (i % 3 == 2 && i < 30 ? 2 : 0); + if (selected != component) continue; + CHECK_EQ(mixed.at(i), plain.at(i)); CHECK_EQ(mixed.at(i+32), plain.at(i+32)); + } + } + for (int i = rot; i < hd; ++i) CHECK_EQ(mixed.at(i), 9.0f); + T single(RAD_I32, {1}); single.n({1}); + A invalid; invalid.t(mixed).t(single); params(invalid, "axial"); + CHECK_EQ(run("rope", invalid), RAD_E_UNSUPPORTED); + for (auto& p : invalid.ps) if (!std::strcmp(p.key, "yarn_factor")) p = RAD_F64("yarn_factor", NAN); + CHECK_EQ(run("rope", invalid), RAD_E_INVAL); +} + /* THE EPILOGUE IS THE UNFUSED CHAIN: the biased product, then the activation of it, then the * residual -- each rounded where a separate tensor would be. */ TEST(op_gemm_nt_bias_epilogue) { diff --git a/tests/yarn_test.cpp b/tests/yarn_test.cpp new file mode 100644 index 00000000..56ceeffb --- /dev/null +++ b/tests/yarn_test.cpp @@ -0,0 +1,67 @@ +#include "rad_test.h" +#include "../arch/common/rad_arch.h" + +using rad::arch::Geom; +using rad::arch::yarn_from; + +TEST(yarn_metadata_is_independent_of_deployment_context) { + const char* keys[] = {"rope_parameters.rope_type", "rope_parameters.factor", + "rope_parameters.original_max_position_embeddings", "draft.rope_parameters.rope_type", + "draft.rope_parameters.factor", "draft.rope_parameters.original_max_position_embeddings"}; + const char* vals[] = {"yarn", "2", "262144", "yarn", "2", "262144"}; + RadModelMeta m{}; m.n_kv = 6; m.kv_key = keys; m.kv_val = vals; + Geom target{}, draft{}; target.theta = draft.theta = 1e7f; + target.max_ctx = draft.max_ctx = 524288; + CHECK_OK(yarn_from(target, &m, "", 64)); + CHECK_OK(yarn_from(draft, &m, "draft.", 128)); + CHECK_EQ(target.yarn.low, 14.0f); CHECK_EQ(target.yarn.high, 22.0f); + CHECK_EQ(draft.yarn.low, 28.0f); CHECK_EQ(draft.yarn.high, 43.0f); + CHECK_NEAR(target.yarn.magnitude, 1.069314718, 1e-7); + target.max_ctx = 1048576; + CHECK_OK(yarn_from(target, &m, "", 64)); + CHECK_EQ(target.yarn.low, 14.0f); + vals[4] = "4"; + CHECK_OK(yarn_from(draft, &m, "draft.", 128)); + CHECK_EQ(draft.yarn.factor, 4.0f); CHECK_EQ(target.yarn.factor, 2.0f); +} + +TEST(yarn_metadata_rejects_bad_inputs_and_preserves_default) { + const char* keys[] = {"rope_parameters.rope_type", "rope_parameters.factor", + "rope_parameters.original_max_position_embeddings"}; + const char* vals[] = {"yarn", "2", "262144"}; + RadModelMeta m{}; m.n_kv = 3; m.kv_key = keys; m.kv_val = vals; + Geom g{}; g.theta = 1e7f; + for (const char* bad : {"0", "-1", "nan", "inf", "bogus", "2garbage"}) { + vals[1] = bad; + CHECK(yarn_from(g, &m, "", 64) != RAD_OK); + } + vals[1] = "2"; m.n_kv = 2; + CHECK(yarn_from(g, &m, "", 64) != RAD_OK); + vals[0] = "dynamic"; + CHECK_EQ(yarn_from(g, &m, "", 64), RAD_E_UNSUPPORTED); + vals[0] = "default"; g.rope_scale = 1.0f; + CHECK_OK(yarn_from(g, &m, "", 64)); + CHECK_EQ(g.yarn.factor, 0.0f); CHECK_EQ(g.rope_scale, 1.0f); + vals[0] = "linear"; + CHECK_OK(yarn_from(g, &m, "", 64)); CHECK_EQ(g.rope_scale, 2.0f); +} + +TEST(yarn_legacy_explicit_magnitude_and_fractional_bounds) { + const char* keys[] = {"rope_scaling.type", "rope_scaling.factor", + "rope_scaling.original_max_position_embeddings", "rope_scaling.attention_factor", + "rope_scaling.truncate", "rope_scaling.beta_fast", "rope_scaling.beta_slow"}; + const char* vals[] = {"yarn", "2", "262144", "1.25", "0", "32", "1"}; + RadModelMeta m{}; m.n_kv = 7; m.kv_key = keys; m.kv_val = vals; + Geom g{}; g.theta = 1e7f; + CHECK_OK(yarn_from(g, &m, "", 64)); + CHECK_EQ(g.yarn.magnitude, 1.25f); + CHECK(g.yarn.low > 14.0f && g.yarn.low < 15.0f); + CHECK(g.yarn.high > 21.0f && g.yarn.high < 22.0f); + vals[4] = "2"; CHECK(yarn_from(g, &m, "", 64) != RAD_OK); + vals[4] = "0"; vals[2] = "262144.5"; + CHECK(yarn_from(g, &m, "", 64) != RAD_OK); + vals[2] = "262144"; vals[5] = "0.5"; + CHECK(yarn_from(g, &m, "", 64) != RAD_OK); +} + +RAD_TEST_MAIN()