Skip to content

Commit b016d3c

Browse files
committed
Add tiny-rwkv-7v0 test files
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
1 parent 1b72943 commit b016d3c

7 files changed

+27
-5
lines changed

tests/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ file(COPY tiny-rwkv-6v0-3m-Q5_0.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
4242
file(COPY tiny-rwkv-6v0-3m-Q5_1.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
4343
file(COPY expected-logits-6v0-3m.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
4444

45+
file(COPY tiny-rwkv-7v0-834K-FP32.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
46+
file(COPY tiny-rwkv-7v0-834K-FP16.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
47+
file(COPY tiny-rwkv-7v0-834K-Q5_0.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
48+
file(COPY tiny-rwkv-7v0-834K-Q5_1.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
49+
file(COPY expected-logits-7v0-834K.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
50+
4551
rwkv_add_test(test_ggml_basics.c)
4652
rwkv_add_test(test_quantized_matmul_on_gpu.c)
4753
rwkv_add_test(test_tiny_rwkv.c)

tests/expected-logits-7v0-834K.bin

1 KB
Binary file not shown.

tests/test_tiny_rwkv.c

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include "logit_difference_validator.inc"
88

9-
#define VERSION_COUNT 4
9+
#define VERSION_COUNT 5
1010
#define FORMAT_COUNT 7
1111

1212
int main(void) {
@@ -21,7 +21,8 @@ int main(void) {
2121
"4v0-660K",
2222
"5v1-730K",
2323
"5v2-730K",
24-
"6v0-3m"
24+
"6v0-3m",
25+
"7v0-834K"
2526
};
2627

2728
const char * formats[FORMAT_COUNT] = {
@@ -46,7 +47,10 @@ int main(void) {
4647
+0.455912F, // FP16
4748
// 6v0
4849
+0.001000F, // FP32
49-
-0.416620F // FP16
50+
-0.416620F, // FP16
51+
// 7v0
52+
+0.001000F, // FP32
53+
+0.005766F // FP16
5054
};
5155

5256
// *** Why the hell the expected logit difference sum for v4 models is < 1, and for v5 models it can be as high as 160? ***
@@ -87,7 +91,13 @@ int main(void) {
8791
+021.939022F, // Q4_1
8892
-027.332073F, // Q5_0
8993
+003.576909F, // Q5_1
90-
-009.539596F // Q8_0
94+
-009.539596F, // Q8_0
95+
// 7v0
96+
+000.136785F, // Q4_0
97+
+000.002614F, // Q4_1
98+
-000.063645F, // Q5_0
99+
-000.064663F, // Q5_1
100+
+000.011924F // Q8_0
91101
};
92102

93103
const float expected_difference_sum_quantized_FP16[VERSION_COUNT * (FORMAT_COUNT - 2)] = {
@@ -114,7 +124,13 @@ int main(void) {
114124
+021.797060F, // Q4_1
115125
-027.269241F, // Q5_0
116126
+003.405264F, // Q5_1
117-
-009.734720F // Q8_0
127+
-009.734720F, // Q8_0
128+
// 7v0
129+
+000.136678F, // Q4_0
130+
-000.005140F, // Q4_1
131+
-000.064447F, // Q5_0
132+
-000.063531F, // Q5_1
133+
+000.010921F // Q8_0
118134
};
119135

120136
for (int i_version = 0; i_version < VERSION_COUNT; i_version++) {

tests/tiny-rwkv-7v0-834K-FP16.bin

1.62 MB
Binary file not shown.

tests/tiny-rwkv-7v0-834K-FP32.bin

3.18 MB
Binary file not shown.

tests/tiny-rwkv-7v0-834K-Q5_0.bin

1.32 MB
Binary file not shown.

tests/tiny-rwkv-7v0-834K-Q5_1.bin

1.35 MB
Binary file not shown.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy