okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
707fd49eb
main
1{ 2"label" :"followup-128000" , 3"attempt" :1 , 4"epoch_start" :1790924028.836615 , 5"epoch_end" :1790924042.0841727 , 6"kind" :"followup" , 7"target" :128000 , 8"run" :1 , 9"expected_prompt_tokens" :128463 , 10"needle" :"lantern-falcon-213" , 11"needle_depth_pct" :40 , 12"max_tokens" :400 , 13"follows" :"fresh-128000-run3" , 14"request_sha256" :"70f0d5bc74fb35148c37f5e2c1ee79b0183ce1c15cd453fa2f6b69a1a9939e4e" , 15"client_ttft_s" :1.8549455599859357 , 16"client_total_s" :13.24583949195221 , 17"finish_reason" :"length" , 18"usage" : { 19"prompt_tokens" :128463 , 20"completion_tokens" :400 , 21"total_tokens" :128863 , 22"prompt_tokens_details" : { 23"cached_tokens" :128400 24 } 25 }, 26"timings" : { 27"cache_n" :128400 , 28"prompt_n" :63 , 29"prompt_ms" :1281.5 , 30"prompt_per_token_ms" :20.341 , 31"prompt_per_second" :49.2 , 32"predicted_n" :400 , 33"predicted_ms" :11428.4 , 34"predicted_per_token_ms" :28.571 , 35"predicted_per_second" :35.0 , 36"draft_n" :351 , 37"draft_n_accepted" :209 38 }, 39"keepalives" :2 , 40"text" :"lantern-falcon-213\n\nThe server described in these files handles long prompts through a sophisticated, chunked processing pipeline designed to manage memory constraints and maximize throughput by overlapping computation with data movement. When a request arrives, the engine does not attempt to process the entire prompt in a single pass, which would require prohibitive amounts of VRAM for intermediate activations and KV cache storage. Instead, it breaks the prompt into manageable chunks, typically up to 8,192 tokens in size, though this can be adjusted via configuration flags like `--prefill`. This chunking strategy allows the engine to reuse buffers and keep the working set within the available GPU memory.\n\nFor each chunk, the engine processes the model layers sequentially. A critical aspect of this process is the management of the Mixture-of-Experts (MoE) weights. Since the full set of expert weights often exceeds VRAM capacity, the engine employs a tiered memory system. The most frequently used experts are cached in VRAM, while others reside in system RAM or on SSD. During prompt processing, the engine streams the necessary expert weights from RAM or SSD into VRAM as they are needed for the current layer. This streaming is optimized using pinned host memory and asynchronous copy operations to overlap data transfer with GPU computation. The documentation highlights that for native packs without a dedicated `experts.bin` file, the engine reads expert data directly from the GGUF shards, using multi-threaded prefetching to keep the SSD queue full and minimize latency.\n\nThe attention mechanism, specifically the QSA (Query-Sparse Attention) or similar variants, is handled with specific kernels that can utilize tensor cores on NVIDIA GPUs or matrix cores on newer AMD RDNA4 architectures. For very long contexts, the KV cache itself may be streamed from RAM to VRAM, with only a resident window kept on the GPU. This is controlled by flags like `--kv-resident`. The engine also supports speculative decoding during the prompt phase in" , 41"status_before" : { 42"busy" :false , 43"queued" :0 , 44"phase" :"answering" , 45"prompt_tokens" :128000 , 46"generated" :400 , 47"max_tokens" :400 48 }, 49"totals_before" :12 , 50"totals_after" :13 , 51"foreign_overlap" :false , 52"engine" : { 53"prompt_tokens" :128463 , 54"reused" :128400 , 55"read" :63 , 56"prompt_ms_log" :1281 , 57"prompt_tok_s_log" :49.2 , 58"generated" :400 , 59"decode_ms_log" :11428 , 60"decode_tok_s_log" :35.0 , 61"drafts_accepted" :209 , 62"drafts_proposed" :351 , 63"checkpoints" :6 , 64"cancelled" :false , 65"line" :"strata serve: prompt 128463 tokens = 128400 reused + 63 read in 1281 ms (49.2 tok/s), 400 generated in 11428 ms (35.0 tok/s), drafts accepted 209 of 351, 6 checkpoints" , 66"hit_rate_pct" :54.2 , 67"hit_line" :"strata serve: decode expert cache hit rate: 54.2% (126441 hits / 233439 lookups)" , 68"kv_vram_pct" :95.86 , 69"kv_block_reads" :7049460 , 70"kv_ram_mib" :1176.7 , 71"kv_line" :"strata serve: KV streaming: 95.86% of 7049460 block reads hit VRAM, 1176.7 MiB read from RAM" , 72"suffix_windows" :6 , 73"suffix_accepted" :6 , 74"suffix_proposed" :12 75 }, 76"metrics_record" : { 77"projection" :null , 78"time" :1790924029.3282752 , 79"duration_s" :12.8 , 80"finish" :"length" , 81"prompt_tokens" :128463 , 82"reused" :128400 , 83"output_tokens" :400 , 84"engine_generated" :400 , 85"prompt_ms" :1281.5 , 86"decode_ms" :11428.4 , 87"decode_tok_s" :35.0 , 88"hit_rate" :0.542 , 89"ram_blobs" :0 , 90"file_blobs" :0 , 91"file_mb" :0.0 92 }, 93"engine_log" : [ 94"strata serve: prompt 128463 tokens = 128400 reused + 63 read in 1281 ms (49.2 tok/s), 400 generated in 11428 ms (35.0 tok/s), drafts accepted 209 of 351, 6 checkpoints" , 95"strata serve: decode expert cache hit rate: 54.2% (126441 hits / 233439 lookups)" , 96"strata serve: KV streaming: 95.86% of 7049460 block reads hit VRAM, 1176.7 MiB read from RAM" , 97"strata serve: suffix drafts: 6 windows, 6 of 12 drafts accepted" 98 ], 99"server_log" : [ 100"[strata] reading the prompt: 128,456 of 128,463 tokens, 1 s so far" , 101"[strata] answering: 24 of max 400 tokens, 30.4 tok/s, 2 s" , 102"[strata] answering: 62 of max 400 tokens, 33.2 tok/s, 3 s" , 103"[strata] answering: 97 of max 400 tokens, 33.7 tok/s, 4 s" , 104"[strata] answering: 135 of max 400 tokens, 34.6 tok/s, 5 s" , 105"[strata] answering: 175 of max 400 tokens, 35.6 tok/s, 6 s" , 106"[strata] answering: 217 of max 400 tokens, 36.4 tok/s, 7 s" , 107"[strata] answering: 252 of max 400 tokens, 36.2 tok/s, 8 s" , 108"[strata] answering: 281 of max 400 tokens, 35.2 tok/s, 9 s" , 109"[strata] answering: 320 of max 400 tokens, 35.3 tok/s, 10 s" , 110"[strata] answering: 358 of max 400 tokens, 35.5 tok/s, 11 s" , 111"[strata] answering: 390 of max 400 tokens, 34.9 tok/s, 13 s" , 112"[strata] done: 400 tokens in 13 s (35.1 tok/s) (length, cancel=False), expert cache 54.2% hit" 113 ], 114"needle_found" :true 115}