Skip to content

Commit

Permalink
tests: Use tiny-rwkv-6v0-3m
Browse files Browse the repository at this point in the history
Signed-off-by: Molly Sophia <[email protected]>
  • Loading branch information
MollySophia committed Jun 25, 2024
1 parent 2c8daac commit 29ca869
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 25 deletions.
10 changes: 5 additions & 5 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ file(COPY tiny-rwkv-5v2-730K-Q5_0.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY tiny-rwkv-5v2-730K-Q5_1.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY expected-logits-5v2-730K.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

file(COPY tiny-rwkv-6v0-1m-FP32.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY tiny-rwkv-6v0-1m-FP16.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY tiny-rwkv-6v0-1m-Q5_0.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY tiny-rwkv-6v0-1m-Q5_1.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY expected-logits-6v0-1m.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY tiny-rwkv-6v0-3m-FP32.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY tiny-rwkv-6v0-3m-FP16.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY tiny-rwkv-6v0-3m-Q5_0.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY tiny-rwkv-6v0-3m-Q5_1.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY expected-logits-6v0-3m.bin DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

rwkv_add_test(test_ggml_basics.c)
rwkv_add_test(test_quantized_matmul_on_gpu.c)
Expand Down
Binary file removed tests/expected-logits-6v0-1m.bin
Binary file not shown.
Binary file added tests/expected-logits-6v0-3m.bin
Binary file not shown.
6 changes: 3 additions & 3 deletions tests/test_quantization_format_compatibility.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ int main(void) {
"4v0-660K",
"5v1-730K",
"5v2-730K",
"6v0-1m"
"6v0-3m"
};

// See the explanation of huge expected differences for v5 models in test_tiny_rwkv.c
Expand All @@ -30,8 +30,8 @@ int main(void) {
+025.273308F,
+048.068733F,
// 6v0
-005.441267F,
-017.046452F
-019.400530F,
+003.576909F
};

for (int i = 0; i < VERSION_COUNT; i++) {
Expand Down
34 changes: 17 additions & 17 deletions tests/test_tiny_rwkv.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ int main(void) {
"4v0-660K",
"5v1-730K",
"5v2-730K",
"6v0-1m"
"6v0-3m"
};

const char * formats[FORMAT_COUNT] = {
Expand All @@ -37,16 +37,16 @@ int main(void) {
const float expected_difference_sum_full[VERSION_COUNT * 2] = {
// 4v0
+0.001000F, // FP32
-0.005320F, // FP16
-0.013652F, // FP16
// 5v1
+0.001000F, // FP32
-0.289921F, // FP16
// 5v2
+0.001000F, // FP32
+0.206919F, // FP16
+0.455912F, // FP16
// 6v0
+0.001000F, // FP32
-0.184410F // FP16
+0.001566F, // FP32
-0.416620F // FP16
};

// *** Why the hell the expected logit difference sum for v4 models is < 1, and for v5 models it can be as high as 160? ***
Expand Down Expand Up @@ -83,20 +83,20 @@ int main(void) {
+048.068733F, // Q5_1
-009.441034F, // Q8_0
// 6v0
+039.715752F, // Q4_0
+049.779972F, // Q4_1
-005.838017F, // Q5_0
-017.046452F, // Q5_1
-000.220227F // Q8_0
-003.824263F, // Q4_0
+021.939022F, // Q4_1
-021.191444F, // Q5_0
+003.576909F, // Q5_1
-009.539596F // Q8_0
};

const float expected_difference_sum_quantized_FP16[VERSION_COUNT * (FORMAT_COUNT - 2)] = {
// 4v0
+000.154614F, // Q4_0
-000.539827F, // Q4_1
-000.170043F, // Q5_0
-000.180142F, // Q5_0
+000.294953F, // Q5_1
+000.070944F, // Q8_0
+000.077226F, // Q8_0
// 5v1
+119.471931F, // Q4_0
-028.245888F, // Q4_1
Expand All @@ -110,11 +110,11 @@ int main(void) {
+029.726818F, // Q5_1
-007.242277F, // Q8_0
// 6v0
+039.676075F, // Q4_0
+049.956646F, // Q4_1
-006.077929F, // Q5_0
-016.773785F, // Q5_1
-000.038582F // Q8_0
-003.487368F, // Q4_0
+021.797060F, // Q4_1
-021.271053F, // Q5_0
+003.405264F, // Q5_1
-009.734720F // Q8_0
};

for (int i_version = 0; i_version < VERSION_COUNT; i_version++) {
Expand Down
Binary file removed tests/tiny-rwkv-6v0-1m-FP16.bin
Binary file not shown.
Binary file removed tests/tiny-rwkv-6v0-1m-FP32.bin
Binary file not shown.
Binary file removed tests/tiny-rwkv-6v0-1m-Q5_0.bin
Binary file not shown.
Binary file removed tests/tiny-rwkv-6v0-1m-Q5_1.bin
Binary file not shown.
Binary file added tests/tiny-rwkv-6v0-3m-FP16.bin
Binary file not shown.
Binary file added tests/tiny-rwkv-6v0-3m-FP32.bin
Binary file not shown.
Binary file added tests/tiny-rwkv-6v0-3m-Q5_0.bin
Binary file not shown.
Binary file added tests/tiny-rwkv-6v0-3m-Q5_1.bin
Binary file not shown.

0 comments on commit 29ca869

Please sign in to comment.