STRATA_DF2_NO_BIND
| 478 | |
| 479 | #endif // STRATA_DF2_NO_BIND |
| 480 | void Dflash2Drafter::gemm(std::initializer_list<const char*> names, std::initializer_list<float*> outs, int ncols, cudaStream_t cs, const uint8_t* xq, const float* xd) { |
| 481 | kernels::Df2Mat mats[3]; |
| 482 | int n = 0, n_in = 0; |
| 483 | auto o = outs.begin(); |
| 484 | for (const char* name : names) { |
| 485 | const Tensor& t = find(name); |
| 486 | mats[n] = kernels::Df2Mat{blob_ + t.off, *o++, (int) t.rows, t.dtype == "q4_0"}; |
| 487 | if (n == 0) n_in = (int) t.cols; |
| 488 | ++n; |
| 489 | } |
| 490 | kernels::df2_gemm(mats, n, xq, xd, n_in, ncols, cs); |
| 491 | } |
| 492 | |
| 493 | // The part of a context update after the activations are quantized: per layer the keys and values (projection, k-norm, rope, ring write). Also what a ring |
| 494 | // rebuild runs over logged rows: `xq` / `xd` are then the log's codes and scales, `pos` the rows' positions (device), rt_ctx_ their rope table. |
no test coverage detected