Spaces:
Sleeping
Sleeping
ggml : restore ggml_rope_xpos_inplace (ggml/0)
Browse files
ggml.c
CHANGED
|
@@ -6378,6 +6378,16 @@ struct ggml_tensor * ggml_rope_custom_inplace(
|
|
| 6378 |
);
|
| 6379 |
}
|
| 6380 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6381 |
// ggml_rope_back
|
| 6382 |
|
| 6383 |
struct ggml_tensor * ggml_rope_back(
|
|
|
|
| 6378 |
);
|
| 6379 |
}
|
| 6380 |
|
| 6381 |
+
struct ggml_tensor * ggml_rope_xpos_inplace(
|
| 6382 |
+
struct ggml_context * ctx,
|
| 6383 |
+
struct ggml_tensor * a,
|
| 6384 |
+
struct ggml_tensor * b,
|
| 6385 |
+
int n_dims,
|
| 6386 |
+
float base,
|
| 6387 |
+
bool down) {
|
| 6388 |
+
return ggml_rope_impl(ctx, a, b, NULL, n_dims, 0, 0, 0, 10000.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, base, down, true);
|
| 6389 |
+
}
|
| 6390 |
+
|
| 6391 |
// ggml_rope_back
|
| 6392 |
|
| 6393 |
struct ggml_tensor * ggml_rope_back(
|
ggml.h
CHANGED
|
@@ -1547,6 +1547,14 @@ extern "C" {
|
|
| 1547 |
float beta_slow),
|
| 1548 |
"use ggml_rope_ext_inplace instead");
|
| 1549 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1550 |
// compute correction dims for YaRN RoPE scaling
|
| 1551 |
GGML_CALL void ggml_rope_yarn_corr_dims(
|
| 1552 |
int n_dims, int n_orig_ctx, float freq_base, float beta_fast, float beta_slow, float dims[2]);
|
|
|
|
| 1547 |
float beta_slow),
|
| 1548 |
"use ggml_rope_ext_inplace instead");
|
| 1549 |
|
| 1550 |
+
struct ggml_tensor * ggml_rope_xpos_inplace(
|
| 1551 |
+
struct ggml_context * ctx,
|
| 1552 |
+
struct ggml_tensor * a,
|
| 1553 |
+
struct ggml_tensor * b,
|
| 1554 |
+
int n_dims,
|
| 1555 |
+
float base,
|
| 1556 |
+
bool down);
|
| 1557 |
+
|
| 1558 |
// compute correction dims for YaRN RoPE scaling
|
| 1559 |
GGML_CALL void ggml_rope_yarn_corr_dims(
|
| 1560 |
int n_dims, int n_orig_ctx, float freq_base, float beta_fast, float beta_slow, float dims[2]);
|