MCPcopy Create free account
hub / github.com/LMCache/LMCache / decode_one

Function decode_one

lmcache/python_ops_fallback.py:2354–2367  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

2352 out_np = np.zeros(output.shape, dtype=np.uint8)
2353
2354 def decode_one(args):
2355 layer_idx, c = args
2356 curr_len = int(len_np[layer_idx, c])
2357 # For decode_fast_new, each channel has its own contiguous buffer,
2358 # so start_off=0 and end_off=curr_len within channel_bs
2359 channel_bs = bs_np[layer_idx, c] # shape [buffer_size]
2360 _decode_single_channel(
2361 cdf_np[layer_idx, c],
2362 channel_bs,
2363 0,
2364 curr_len,
2365 n_tokens,
2366 out_np[layer_idx, :, c],
2367 )
2368
2369 tasks = [(layer_idx, c) for layer_idx in range(n_layers) for c in range(n_channels)]
2370

Callers

nothing calls this directly

Calls 1

_decode_single_channelFunction · 0.85

Tested by

no test coverage detected