@@ -49,13 +49,6 @@ typedef struct {
49
49
} block_q4_1;
50
50
static_assert (sizeof (block_q4_1) == sizeof(float ) * 2 + QK4_1 / 2, "wrong q4_1 block size/padding");
51
51
52
- #define QK4_2 16
53
- typedef struct {
54
- half d; // delta
55
- uint8_t qs[QK4_2 / 2 ]; // nibbles / quants
56
- } block_q4_2;
57
- static_assert (sizeof (block_q4_2) == sizeof(ggml_fp16_t ) + QK4_2 / 2, "wrong q4_2 block size/padding");
58
-
59
52
#define QK5_0 32
60
53
typedef struct {
61
54
half d; // delta
@@ -117,29 +110,6 @@ static __global__ void dequantize_block_q4_1(const void * vx, float * y) {
117
110
}
118
111
}
119
112
120
- static __global__ void dequantize_block_q4_2 (const void * vx, float * y) {
121
- const block_q4_2 * x = (const block_q4_2 *) vx;
122
-
123
- const int i = blockIdx .x ;
124
-
125
- const float d = x[i].d ;
126
-
127
- const uint8_t * pp = x[i].qs ;
128
-
129
- for (int l = 0 ; l < QK4_2; l += 2 ) {
130
- const uint8_t vi = pp[l/2 ];
131
-
132
- const int8_t vi0 = vi & 0xf ;
133
- const int8_t vi1 = vi >> 4 ;
134
-
135
- const float v0 = (vi0 - 8 )*d;
136
- const float v1 = (vi1 - 8 )*d;
137
-
138
- y[i*QK4_2 + l + 0 ] = v0;
139
- y[i*QK4_2 + l + 1 ] = v1;
140
- }
141
- }
142
-
143
113
static __global__ void dequantize_block_q5_0 (const void * vx, float * y) {
144
114
static const int qk = QK5_0;
145
115
@@ -215,11 +185,6 @@ static void dequantize_row_q4_1_cuda(const void * vx, float * y, int k, cudaStre
215
185
dequantize_block_q4_1<<<nb, 1 , 0 , stream>>> (vx, y);
216
186
}
217
187
218
- static void dequantize_row_q4_2_cuda (const void * vx, float * y, int k, cudaStream_t stream) {
219
- const int nb = k / QK4_2;
220
- dequantize_block_q4_2<<<nb, 1 , 0 , stream>>> (vx, y);
221
- }
222
-
223
188
static void dequantize_row_q5_0_cuda (const void * vx, float * y, int k, cudaStream_t stream) {
224
189
const int nb = k / QK5_0;
225
190
dequantize_block_q5_0<<<nb, 1 , 0 , stream>>> (vx, y);
@@ -254,8 +219,6 @@ static to_fp32_cuda_t ggml_get_to_fp32_cuda(ggml_type type) {
254
219
return dequantize_row_q4_0_cuda;
255
220
case GGML_TYPE_Q4_1:
256
221
return dequantize_row_q4_1_cuda;
257
- case GGML_TYPE_Q4_2:
258
- return dequantize_row_q4_2_cuda;
259
222
case GGML_TYPE_Q5_0:
260
223
return dequantize_row_q5_0_cuda;
261
224
case GGML_TYPE_Q5_1:
0 commit comments