GPT-2 byte-level BPE first maps raw bytes to printable Unicode codepoints * so merges can operate on UTF-8 strings without losing byte identity. */
| 21925 | uint32_t raw_count = hi - lo + 1u; |
| 21926 | if (raw_count > 256u) raw_count = 256u; |
| 21927 | return raw_count; |
| 21928 | } |
| 21929 | |
| 21930 | static bool metal_graph_cuda_splitkv_score_may_engage( |
| 21931 | const ds4_gpu_graph *g, |
| 21932 | uint32_t pos) { |
| 21933 | if (!g) return false; |
| 21934 | |
| 21935 | const uint32_t min_score = metal_graph_cuda_greedy_splitkv_min_score(); |
| 21936 | const uint32_t n_raw = metal_graph_raw_span_for_batch(g, pos, 1); |
| 21937 | for (uint32_t il = 0; il < DS4_N_LAYER; il++) { |
| 21938 | const uint32_t ratio = ds4_layer_compress_ratio(il); |
| 21939 | uint32_t visible_comp = 0; |
| 21940 | const uint32_t n_comp = g->layer_n_comp[il]; |
no test coverage detected