<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sreesanth R on Medium]]></title>
        <description><![CDATA[Stories by Sreesanth R on Medium]]></description>
        <link>https://medium.com/@shreesh.exe22?source=rss-23c0808ced53------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kw2I4mFE_ZOcLivoT-sujA.png</url>
            <title>Stories by Sreesanth R on Medium</title>
            <link>https://medium.com/@shreesh.exe22?source=rss-23c0808ced53------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 11:34:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shreesh.exe22/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How We Made Qwen 3.8 27B Generate 2.4x Faster on llama.cpp — Losslessly]]></title>
            <link>https://medium.com/@shreesh.exe22/how-we-made-qwen-3-8-27b-generate-2-4x-faster-on-llama-cpp-losslessly-5983485c887e?source=rss-23c0808ced53------2</link>
            <guid isPermaLink="false">https://medium.com/p/5983485c887e</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[gpu]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Sreesanth R]]></dc:creator>
            <pubDate>Thu, 08 Oct 2026 18:01:09 GMT</pubDate>
            <atom:updated>2026-10-08T18:02:31.215Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*513mvu9eREesK-j3ELySjA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Q87Cuc7_i7ikTnUwGaVfA.png" /></figure><p><em>Draft-vocabulary trimming cuts the most expensive matmul in speculative decoding by 87%, turning a </em><strong><em>43 tok/s</em></strong><em> baseline into </em><strong><em>105 tok/s</em></strong><em> on a single Blackwell GPU — without changing a single output token.</em></p><p><strong>Sreesanth R, Allen Joseph G </strong>· October 2026 · 12 min read</p><h3>The Problem: Speculative Decoding Is Bottlenecked by the Draft Model’s LM Head</h3><p>Large language models generate tokens one at a time. Each step loads the entire weight matrix from memory, computes a single token, and writes it back. For a 27-billion-parameter model like Qwen 3.8 27B, this means moving ~30 GB of weights through the GPU’s memory bus on every forward pass — and most of the compute cores sit idle waiting for data.</p><p><strong>Speculative decoding</strong> attacks this by running a small, fast <em>draft</em> model ahead of the target. The draft proposes several candidate tokens; the target model verifies them all in one batched forward pass. Accepted tokens are free — they cost no extra memory-bus round trips. The more tokens the draft gets right, the faster the system runs.</p><p>Qwen 3.8’s architecture includes a built-in Multi-Token Prediction (MTP) draft head. It shares the target’s embedding layer and can propose 1–5 tokens per step. But there’s a catch: Qwen 3.8 has a <strong>248,320-token vocabulary</strong>, and the draft model’s final layer — the LM head — must project from a 5120-dimensional hidden state to all 248,320 logits. That’s a [5120 × 248320] matmul on every draft step, and it dominates the draft model&#39;s inference cost.</p><h3>The Insight: Most of Those Vocabulary Slots Are Wasted</h3><p>Analysis of the actual token distribution reveals that the overwhelming majority of real-world text uses a small fraction of the full vocabulary. The top 32,768 tokens cover virtually all English text, code, and common multilingual content. The remaining ~216,000 slots are specialized Unicode blocks, rare script combinations, and tokens the draft model almost never proposes with meaningful probability.</p><blockquote><strong><em>Key insight:</em></strong><em> If a token never gets meaningful draft probability, computing its logit wastes a multiply-accumulate for every row of the LM head, on every draft step, on every token generated.</em></blockquote><h3>The Fix: Draft-to-Target Vocabulary Trimming (d2t)</h3><p>HauhauCS’s <strong>FastMTP</strong> approach trims the draft model’s LM head from [5120 × 248,320] down to [5120 × 32,768] — an <strong>87% reduction</strong> in the single most expensive matrix multiplication. This is achieved through three components:</p><p><strong>1. Vocabulary Analysis &amp; Pruning</strong> The top 32,768 most-used tokens are identified from the training distribution. The draft model’s LM head weight matrix is sliced to keep only these columns, producing a compact [5120 × 32,768] projection.</p><p><strong>2. The d2t Mapping Tensor</strong> A draft-to-target (d2t) lookup table is stored alongside the trimmed draft model. Position <em>i</em> in the 32K draft vocabulary maps back to position <em>j</em> in the full 248K target vocabulary. After the draft head outputs its 32K logits, this tensor translates the top-k draft token IDs back into the target’s ID space before verification.</p><p><strong>3. Infinity Masking</strong> The untrimmed vocabulary positions are filled with -inf before softmax, giving them exactly zero probability. This is the mechanism that makes the optimization mathematically lossless.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RckmoYNVDzHfPCT0XE-88w.png" /><figcaption>Core Architectural Diagram</figcaption></figure><h3>Why It’s Lossless: The Mathematical Proof</h3><p>This is the question I’ve gotten most often, and it deserves a rigorous answer.</p><p>Speculative decoding works through a <strong>verify-then-accept</strong> protocol. The draft model proposes candidate tokens; the target model runs a single forward pass over the entire proposed sequence and produces its own probability distribution at each position. Acceptance follows a specific rule:</p><pre>accept with probability = min(1, P_target(token) / P_draft(token))</pre><p>The critical invariant: <strong>the target model’s distribution is never modified</strong>. The draft model only affects <em>which</em> candidates are proposed and <em>how often</em> they’re accepted. When a draft token is rejected, the system falls back to sampling from a corrected distribution derived from the target model’s output. The final output distribution is provably identical to what the target model would produce autoreggressively.</p><p>Vocabulary trimming changes the draft model, not the target. Specifically:</p><ul><li><strong>Tokens inside the 32K set:</strong> drafted normally, verified against the full target distribution.</li><li><strong>Tokens outside the 32K set:</strong> the draft assigns them zero probability (via -inf logits), so they&#39;re never proposed. When the target model wants such a token, the draft &quot;misses&quot; and the system falls back to target-model generation for that step.</li></ul><p>In both cases, the output comes from the target model’s unmodified distribution. The draft’s vocabulary size affects throughput (acceptance rate), never correctness. Trimming makes the draft less likely to propose rare tokens, so those positions run at baseline autoregressive speed. But they never produce a wrong token — they produce the exact same token the target would have generated.</p><blockquote><strong><em>Formal guarantee:</em></strong><em> Since the target model’s weights, vocabulary, and probability distribution are untouched, and the speculative decoding acceptance criterion preserves the target distribution by construction, the output sequence is statistically identical to pure autoregressive generation — regardless of what the draft model does or how its vocabulary is sized.</em></blockquote><p>You can verify this empirically: run the same prompt with greedy decoding (--temp 0) with and without the draft model, and SHA-256 the output. The hashes match.</p><h3>Benchmark Setup</h3><h3>Hardware</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yLtsaa_4vZeSP8rjLW1RHQ.png" /><figcaption>Hardware Specifications</figcaption></figure><h3>Software</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c_XmUdFUL9UfV8gOVQEwEQ.png" /><figcaption>Software Specifications</figcaption></figure><h3>Methodology</h3><p>Each configuration was tested by launching a fresh llama-server instance, sending a warmup request, then running 5 identical generation requests via the /v1/chat/completions API. The prompt was a 200-word essay request — a representative mixed workload that exercises both common and moderately rare vocabulary. All runs used greedy decoding (temperature=0) to eliminate sampling variance. Timing data comes from the server&#39;s internal timings field, which measures GPU-side evaluation time.</p><h3>Results: Isolated GPU 0, 5 Runs Per Config</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-GFLdt36tH6YDlQLSuCSUA.png" /><figcaption><strong>Bar chart</strong> — “Decode Throughput by MTP Draft Tokens (tok/s)”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LoaaxE4qGzqJgUk1xafoxQ.png" /><figcaption>Table — Decode Throughput by MTP Draft Tokens (tok/s) Comparison</figcaption></figure><h3>Raw Benchmark Data (All 25 Runs)</h3><p><strong>Baseline (no draft model):</strong></p><pre>run 1: pp=370.5 t/s | decode=43.4 t/s | n=128<br>run 2: pp=69.1 t/s  | decode=43.0 t/s | n=128<br>run 3: pp=71.3 t/s  | decode=43.1 t/s | n=128<br>run 4: pp=70.1 t/s  | decode=42.7 t/s | n=128<br>run 5: pp=70.5 t/s  | decode=42.8 t/s | n=128</pre><p><strong>MTP N=1:</strong></p><pre>run 1: pp=325.1 t/s | decode=69.6 t/s | n=128<br>run 2: pp=68.8 t/s  | decode=70.0 t/s | n=128<br>run 3: pp=69.7 t/s  | decode=69.1 t/s | n=128<br>run 4: pp=69.4 t/s  | decode=68.9 t/s | n=128<br>run 5: pp=69.5 t/s  | decode=68.5 t/s | n=128</pre><p><strong>MTP N=2:</strong></p><pre>run 1: pp=325.4 t/s | decode=84.3 t/s | n=128<br>run 2: pp=68.6 t/s  | decode=86.8 t/s | n=128<br>run 3: pp=68.8 t/s  | decode=85.7 t/s | n=128<br>run 4: pp=69.2 t/s  | decode=84.8 t/s | n=128<br>run 5: pp=69.0 t/s  | decode=87.0 t/s | n=128</pre><p><strong>MTP N=3:</strong></p><pre>run 1: pp=319.5 t/s | decode=99.1 t/s | n=128<br>run 2: pp=69.1 t/s  | decode=94.5 t/s | n=128<br>run 3: pp=68.2 t/s  | decode=99.4 t/s | n=128<br>run 4: pp=68.9 t/s  | decode=99.4 t/s | n=128<br>run 5: pp=68.6 t/s  | decode=97.2 t/s | n=128</pre><p><strong>MTP N=5:</strong></p><pre>run 1: pp=315.1 t/s | decode=99.7 t/s  | n=128<br>run 2: pp=69.0 t/s  | decode=104.9 t/s | n=128<br>run 3: pp=67.7 t/s  | decode=106.8 t/s | n=128<br>run 4: pp=68.6 t/s  | decode=104.7 t/s | n=128<br>run 5: pp=69.2 t/s  | decode=106.5 t/s | n=128</pre><h3>Scaling Analysis</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vMXoKwy0bgGBN_KxgMMJKg.png" /><figcaption><strong>Dual-axis line chart</strong> — “Scaling Curve: Draft Tokens vs Decode Speed”</figcaption></figure><p>The scaling curve shows <strong>diminishing returns past N=3</strong>: going from N=3 (97.9 tok/s) to N=5 (104.5 tok/s) gains only 6.7%, because the draft model’s acceptance rate drops with each additional speculative position. Each additional draft token has a compounding probability of being wrong — if the draft misses at position 2, positions 3–5 are wasted work.</p><p>N=3 hits the sweet spot of throughput versus acceptance overhead, which is why the production configuration uses --spec-draft-n-max 3.</p><h3>Run Variance: How Stable Are These Numbers?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NblvdEGRtlNUp2KtZ6MOTg.png" /><figcaption><strong>Scatter plot</strong> — “Decode Speed — All 5 Runs Per Config (tok/s)”</figcaption></figure><p>The variance band tightens as N increases. Baseline varies by only <strong>0.7 tok/s (1.6%)</strong> across 5 runs — the GPU’s memory bandwidth is the bottleneck and it’s rock-solid. MTP N=5 spans <strong>7.1 tok/s (6.8%)</strong>, driven by prompt-dependent acceptance rate variation: some regions of the response have higher draft hit rates than others. This is inherent to speculative decoding — the speedup on any given token depends on how well the draft model predicts the target’s choice.</p><h3>Prompt-Fill (Prefill) Performance</h3><p>Prompt evaluation is compute-bound, not memory-bound, so it behaves differently from decode:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2AGwFU79-KqFGbydNLOumA.png" /><figcaption>Table — Prompt-Fill (Prefill) Performance</figcaption></figure><p>Q4 quantization provides a useful <strong>38% uplift in TG decode</strong> (59.8 vs 43.4 tok/s) by reducing the weight-loading bottleneck, at the cost of some quality. Prompt-fill throughput is nearly <strong>3,000 tok/s</strong> for short prompts on Blackwell — fast enough that prefill is never the bottleneck for interactive workloads.</p><h3>What About Dual GPU?</h3><p>This workstation has two RTX PRO 6000 GPUs connected via PCIe (no NVLink). The dual-GPU results are informative:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6IcNGkLGm9AMDdlpgz_PIA.png" /><figcaption>Dual GPU Comparison</figcaption></figure><p>Dual GPU with N=3 (101.9 tok/s) barely outperforms single GPU with N=5 (104.5 tok/s). The <strong>PCIe P2P communication overhead</strong> eats most of the extra bandwidth from the second GPU. For single-request decode on this workstation, the second GPU isn’t worth the 97 GB of VRAM — you’re better off keeping it free for concurrent requests or a larger model.</p><p><strong>Technical note:</strong> Row-split (-sm row) does not work with the FastMTP d2t patch — the d2t mapping tensor doesn&#39;t support cross-GPU sharding. Layer-split (-sm layer) works correctly.</p><h3>Community Questions — Answered</h3><p>After publishing the initial results on X and LinkedIN, I received several sharp technical questions. Here are the answers, with the data to back them up.</p><h3>“How did you prove it’s lossless?” — Bhavishya Sharma</h3><p>By construction. Speculative decoding’s acceptance criterion is designed so that the output distribution equals the target model’s distribution regardless of the draft model’s quality. The draft only affects speed (acceptance rate), never correctness. Since we modify only the draft model’s vocabulary size — not the target model — the output is mathematically identical.</p><p>You can verify empirically: run the same prompt with greedy decoding (--temp 0) with and without the draft model, and SHA-256 the output. The hashes match. Every single time.</p><h3>“Does the speed hold up at long context lengths, or does attention become a bottleneck?” — Saikarthik Ramakrishnan</h3><p>The speculative decoding speedup applies specifically to the <strong>decode phase</strong> (token generation), which is memory-bandwidth-bound. At long context lengths, the attention computation grows with the KV cache size, and this cost applies equally to both the draft and target models.</p><p>So yes, at very long contexts (&gt;32K tokens), attention starts eating into the MTP gains. The draft model still helps — it still proposes tokens that skip full target forward passes — but the percentage gain shrinks because attention becomes a larger fraction of each step.</p><p><strong>Rule of thumb:</strong></p><ul><li>Under 16K context: speedup holds close to what we measured (2.0–2.4x)</li><li>16K–64K: expect 1.5–2.0x as attention overhead grows</li><li>Past 64K: the multiplier drops further, but MTP still outperforms baseline</li></ul><p>The KV cache overhead is separate from the d2t optimization itself — it’s a property of the attention mechanism.</p><h3>“Does the speedup hold with multiple concurrent requests, or does it drop as the GPU gets saturated?” — BAIPU JAYA SURYA</h3><p>Concurrent requests change the dynamics significantly. Single-request decode is memory-bandwidth-bound — the GPU sits at ~0% SM (compute) utilization, just waiting for data from memory. With multiple concurrent requests, you start filling the compute pipeline and the GPU becomes more utilized.</p><p>MTP still helps under concurrency — fewer forward passes means fewer forward passes regardless of batch size — but the per-request gain diminishes because the GPU is no longer starved for work. In our production config serving 4–8 concurrent requests, we still see meaningful improvement, but the per-request throughput drops from 100+ tok/s to around 80 tok/s aggregate.</p><p>The crossover point depends on your GPU’s memory bandwidth and the model size. On the RTX PRO 6000 Blackwell (97 GB VRAM, high memory bandwidth), the GPU stays bandwidth-bound longer than on consumer cards.</p><h3>“I’d check acceptance rate on code and non-English prompts, where more tokens sit outside the top 32K.” — Hashif Habeeb</h3><p>This is exactly the right tradeoff to watch. Tokens outside the 32K set can’t be drafted, so they fall back to plain target-model generation for that step. Two things worth noting:</p><ol><li><strong>The top-32K covers the overwhelming majority of real code and English tokens.</strong> That’s why FastMTP trains with the pruned vocab. The acceptance dip on typical workloads stays small.</li><li><strong>We measured 82.89% acceptance rate on real agentic coding traffic.</strong> That means ~83% of tokens are “free” (draft hit, no extra forward pass) and ~17% decode at baseline 43 tok/s.</li></ol><p>Since verification always runs against the target model’s full distribution, the output stays mathematically identical. Worst case you get baseline speed for those tokens, never worse quality. The speedup swings by prompt type, but <strong>the floor is autoregressive performance, not below it</strong>.</p><p>For pure English prose, expect acceptance &gt;85%. For multilingual or heavy Unicode, it will drop — but the output quality never changes.</p><h3>“You should try layer-wise inference!” — Raghul Chandramouli</h3><p>Layer-wise (pipeline) inference and speculative decoding are complementary, not competing. Pipeline parallelism helps when you’re splitting a single model across devices to fit in memory; speculative decoding helps when you have enough memory but are bottlenecked on memory bandwidth during generation.</p><p>On this workstation (97 GB per GPU, model is ~30 GB Q8), the model fits entirely on one GPU, so pipeline parallelism adds inter-GPU communication overhead without benefit for decode. Where layer-wise inference shines is with models too large for one GPU — there, combining pipeline parallelism with MTP could be very effective.</p><p>We tested this with dual-GPU layer-split: the 4.1% improvement over single-GPU N=3 doesn’t justify the second GPU for single-request decode over PCIe. NVLink would change this calculus significantly.</p><h3>“What about tokens outside the 32K set?” — Manish Chikoti</h3><p>When the target wants a token outside the draft’s 32K vocabulary, the draft can’t propose it (it gets -inf probability), so that position falls back to standard autoregressive decoding. The system doesn&#39;t slow down below baseline — it simply doesn&#39;t speed up for that particular token.</p><p>Think of it as: every token is either <em>free</em> (draft hit, no extra cost) or <em>baseline</em> (draft miss, normal cost). <strong>There is no penalty state.</strong></p><p>On our production coding workload, about 17% of tokens miss the draft (1 − 82.89% acceptance), and those tokens decode at the normal 43 tok/s. The 83% that hit are what push the average up to 100+ tok/s.</p><p>The math:</p><pre>effective_speed = acceptance_rate × boosted_speed + (1 - acceptance_rate) × baseline_speed</pre><p>At 82.89% acceptance with N=3:</p><pre>effective ≈ 0.83 × ~115 + 0.17 × 43 ≈ 95.5 + 7.3 ≈ 102.8 tok/s</pre><p>Which is consistent with our measured 97.9 tok/s (the real acceptance rate varies per-token).</p><h3>Production Configuration</h3><p>Based on these benchmarks, the production llama-server configuration uses MTP N=3 as the sweet spot:</p><pre>llama-server \<br>  --model Qwen3.8-27B-Q8_K_P.gguf \<br>  --spec-draft-model FastMTP-32K.gguf \<br>  --spec-type draft-mtp \<br>  --spec-draft-n-max 3 \<br>  --spec-draft-n-min 1 \<br>  --flash-attn on \<br>  --no-mmap \<br>  --ctx-size 262144 \<br>  --kv-unified \<br>  --cache-type-k f16 \<br>  --cache-type-v f16 \<br>  --batch-size 2048 \<br>  --ubatch-size 512</pre><p>N=3 was chosen over N=5 because the marginal gain from N=4/5 is small (6.7%), while the KV cache overhead for additional draft positions grows linearly. N=3 gives <strong>97% of N=5&#39;s throughput</strong> at lower memory cost — critical for serving concurrent requests with a 262K context window.</p><h3>Key Takeaways</h3><ol><li><strong>d2t vocabulary trimming is the highest-leverage optimisation for MTP speculative decoding.</strong> An 87% reduction in the draft LM head matmul translates to 2.4x end-to-end decode speedup on a single GPU.</li><li><strong>The optimisation is provably lossless.</strong> Only the draft model is modified; the target model’s weights and output distribution are untouched. Speculative decoding’s acceptance criterion preserves the target distribution by construction.</li><li><strong>N=3 is the production sweet spot.</strong> It captures 94% of N=5’s gain at lower memory overhead. Higher N values hit diminishing returns as acceptance rates drop.</li><li><strong>Memory bandwidth is the bottleneck, not compute.</strong> Isolating the GPU from all other processes changed throughput by less than 1%. The bottleneck is purely memory-bus throughput, which is why speculative decoding (fewer memory round-trips) helps so much.</li><li><strong>Dual GPU with PCIe is not worth it for single-request decode.</strong> The P2P overhead eats the bandwidth gain. Save the second GPU for concurrent requests or larger models.</li><li><strong>Acceptance rate is workload-dependent.</strong> 82.89% on agentic coding traffic, likely higher on English prose, lower on rare-script multilingual. The floor is always baseline autoregressive speed — never worse.</li></ol><p><em>Re-run Benchmarks run on </em><strong><em>October 8, 2026. </em></strong><em><br></em><strong><em>Hardware:</em></strong><em> NVIDIA RTX PRO 6000 Blackwell Max-Q.</em></p><p><em>FastMTP patch on llama.cpp GitHub Repository : </em><a href="https://github.com/ggml-org/llama.cpp/pull/29143"><em>llama.cpp PR #</em>29143</a><br><em>Sreesanth R on GitHub as </em><a href="http://github.com/Shreesh-Sree"><em>@Shreesh_Sree </em></a><em><br>Allen Joseph on GitHub as </em><a href="http://github.com/unknownhackerworld"><em>@unknownhackerworld</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5983485c887e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HackerRank Orchestrate: A Complete Guide From Three Editions of Experience]]></title>
            <link>https://medium.com/@shreesh.exe22/hackerrank-orchestrate-3268f0d710a5?source=rss-23c0808ced53------2</link>
            <guid isPermaLink="false">https://medium.com/p/3268f0d710a5</guid>
            <category><![CDATA[hackerrank]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Sreesanth R]]></dc:creator>
            <pubDate>Wed, 09 Sep 2026 18:35:29 GMT</pubDate>
            <atom:updated>2026-09-09T18:35:29.044Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0v5jQ5WQRWj7kRGTS5gjKQ.png" /></figure><p>I have participated in all three previous editions of HackerRank Orchestrate and have also spent a lot of time helping other builders throughout those editions.</p><p>After seeing different people approach the challenge in completely different ways, one thing became very clear to me:</p><p><strong>Orchestrate is not really about how much code you can produce in 24 hours.</strong></p><p>It is about how well you can think, design, build, work with AI, evaluate what you build, and explain the decisions you made.</p><p>If this is your first time participating in Orchestrate, this is how I would approach it.</p><h3>1. What Exactly Is Orchestrate?</h3><p>HackerRank Orchestrate is a 24-hour hackathon focused on building AI agents.</p><p>You are given a real-world problem and a set of requirements, and you have to build a working agent that solves that problem within the given time.</p><p>But there is an important difference between Orchestrate and a traditional hackathon.</p><p>In a normal hackathon, you might mainly be judged on the final product.</p><p>In Orchestrate, the process matters too.</p><p>HackerRank currently evaluates four major parts of your submission:</p><ol><li>Your code</li><li>The actual output produced by your agent</li><li>Your AI interaction transcript</li><li>Your AI Judge interview</li></ol><p>The exact problem changes between editions, but the underlying idea remains similar: you are given a problem that requires an agent-based solution, and you have to make engineering decisions around architecture, models, prompts, tools, retrieval, validation, and reliability.</p><p>This means there are actually two things you need to accomplish.</p><p>First:</p><p><strong>Build a good system.</strong></p><p>Second:</p><p><strong>Understand the system you built.</strong></p><p>The second part is where many people underestimate Orchestrate.</p><h3>2. What Actually Happens During the 24 Hours?</h3><p>When the challenge begins, you receive the problem statement and the resources associated with it.</p><p>From that point, the clock starts.</p><p>You have to go from:</p><p><strong>Problem → Understanding → Design → Implementation → Testing → Iteration → Submission</strong></p><p>in 24 hours.</p><p>The biggest mistake you can make is thinking that the first thing you should do is open your coding agent and start generating code.</p><p>Don’t.</p><p>The first thing you should do is understand the problem.</p><p>Read the requirements carefully.</p><p>Figure out:</p><ul><li>What is the agent supposed to accomplish?</li><li>What information does it have access to?</li><li>What should the final output look like?</li><li>What decisions does the agent actually need to make?</li><li>What are the possible failure cases?</li><li>What inputs are ambiguous?</li><li>What happens when the available information is insufficient?</li><li>Which parts should be handled by the model?</li><li>Which parts should be enforced by code?</li></ul><p>This initial understanding becomes the foundation for everything else.</p><h3>3. Don’t Build Before You Have a Plan</h3><p>You don’t need a 20-page architecture document.</p><p>You don’t even need a perfect architecture.</p><p>You just need enough clarity to know what you’re building.</p><p>Before writing the first serious implementation prompt, I would answer a few basic questions.</p><h3>What goes in?</h3><p>Understand your inputs.</p><h3>What happens in the middle?</h3><p>Understand the reasoning, retrieval, tools, model calls, transformations, and validation that need to happen.</p><h3>What comes out?</h3><p>Define exactly what your agent is expected to produce.</p><h3>Where can it fail?</h3><p>Think about incorrect inputs, missing information, hallucinations, invalid model outputs, unexpected formats, edge cases, and adversarial inputs.</p><h3>What should the system do when something goes wrong?</h3><p>This is particularly important.</p><p>A reliable agent is not one that assumes everything will work.</p><p>A reliable agent knows what to do when things don’t work.</p><h3>4. The Problem Is Not to Build the Most Complicated Agent</h3><p>One of the easiest traps in an AI hackathon is overengineering.</p><p>You see a problem and immediately start thinking:</p><p>“We need multiple agents.”</p><p>“We need a vector database.”</p><p>“We need five different models.”</p><p>“We need a complex orchestration framework.”</p><p>“We need autonomous planning.”</p><p>Maybe.</p><p>But maybe not.</p><p>The architecture should come from the problem.</p><p>Not from whatever AI framework happens to be popular that week.</p><p>If a relatively simple architecture solves the problem reliably, use it.</p><p>There is no extra prize for having the most complicated architecture if the final system performs worse.</p><p>HackerRank’s recent Orchestrate analysis makes this point indirectly through its evaluation criteria. The code is judged on things such as actual agent architecture, prompt and tool design, robustness, and engineering quality. The important word is <strong>actual</strong>. Claims in a README do not compensate for functionality that isn’t present in the code.</p><h3>5. How I Would Use AI Tools</h3><p>This is probably the most important part of the entire hackathon.</p><p>Orchestrate allows you to use the AI tools you normally work with. HackerRank’s current edition explicitly mentions tools such as Claude Code, Cursor, Codex, and others.</p><p>But having access to AI does not mean you should give the entire problem to one agent and wait.</p><p>I prefer thinking about AI tools as different kinds of collaborators.</p><p>You can use a general-purpose LLM for:</p><ul><li>Understanding the problem</li><li>Challenging your assumptions</li><li>Exploring possible architectures</li><li>Comparing approaches</li><li>Improving requirements</li><li>Reviewing designs</li><li>Debugging ideas</li><li>Thinking about edge cases</li><li>Refining prompts</li></ul><p>Then use your coding agent for the actual implementation.</p><p>The important distinction is:</p><p><strong>Use AI to think with you, not instead of you.</strong></p><p>And then:</p><p><strong>Use your coding agent to execute decisions, not make every decision for you.</strong></p><h3>6. Your Coding Agent Is Not Your Architect</h3><p>This mindset makes a massive difference.</p><p>Think of your coding agent as a very fast engineer working under your direction.</p><p>You decide:</p><ul><li>What needs to be built</li><li>Why it needs to be built</li><li>What constraints exist</li><li>Which approach you want</li><li>What should be tested</li><li>Whether the implementation is correct</li></ul><p>The agent helps you execute that plan.</p><p>This is also exactly what HackerRank’s recent analysis found when studying Orchestrate submissions. Stronger builders treated AI as an engineering partner that needed direction rather than simply as a code generator.</p><h3>7. Don’t Give One Massive Prompt</h3><p>This is another mistake I have seen quite often.</p><p>Someone understands the problem, writes an enormous prompt containing the entire application, every feature, every requirement, every edge case, and every implementation detail, then asks the agent to build everything.</p><p>Sometimes it works.</p><p>Often it doesn’t.</p><p>And when it fails, debugging becomes painful.</p><p>Instead, break the work into logical pieces.</p><p>For example:</p><h3>Step 1</h3><p>Understand the requirements and propose an architecture.</p><h3>Step 2</h3><p>Implement the basic project structure.</p><h3>Step 3</h3><p>Implement the core data flow.</p><h3>Step 4</h3><p>Implement the agent logic.</p><h3>Step 5</h3><p>Add retrieval or external tools if required.</p><h3>Step 6</h3><p>Add validation.</p><h3>Step 7</h3><p>Test the system.</p><h3>Step 8</h3><p>Fix the problems discovered during testing.</p><h3>Step 9</h3><p>Improve the weak parts.</p><p>This gives you much more control.</p><p>More importantly, it gives you checkpoints.</p><p>If something goes wrong, you know where it went wrong.</p><h3>8. Prompting Should Be Specific</h3><p>A good implementation request should give the agent enough context to make a good decision without dumping your entire brain into one message.</p><p>Instead of:</p><blockquote><em>Build the whole system.</em></blockquote><p>Give it something closer to:</p><blockquote><em>Implement the retrieval component. Use the existing document loader. Return the top relevant results with their source identifiers. Keep the retrieval layer independent from the generation layer. Add basic error handling and write a small test for the empty-result case.</em></blockquote><p>Now the agent has:</p><ul><li>A clear task</li><li>Constraints</li><li>Expected behavior</li><li>A boundary</li><li>A testing requirement</li></ul><p>That is much easier to supervise.</p><p>HackerRank’s own guidance around Orchestrate highlights technical specificity in AI interactions, including things such as files, functions, schemas, constraints, thresholds, and implementation requirements.</p><h3>9. Keep Watching What the Agent Does</h3><p>This is something I would strongly recommend.</p><p>Don’t start the agent and disappear for an hour.</p><p>Stay involved.</p><p>Look at the changes it is making.</p><p>Look at the files.</p><p>Look at the implementation.</p><p>Look at the reasoning.</p><p>Look at the errors.</p><p>Ask yourself:</p><p><strong>Does this actually make sense?</strong></p><p>If the agent starts moving in the wrong direction, stop it early.</p><p>The longer it continues down the wrong path, the more expensive it becomes to recover.</p><p>This is basically the same as reviewing another developer’s work.</p><p>You wouldn’t let a developer make hundreds of changes to your codebase without checking anything.</p><p>Treat your AI agent the same way.</p><h3>10. The Transcript Is More Important Than You Might Think</h3><p>One of the unique parts of Orchestrate is the AI interaction transcript.</p><p>This isn’t just a record of you talking to an AI.</p><p>HackerRank uses it to understand how you actually worked with the coding agent.</p><p>Their current evaluation looks at things such as:</p><ul><li>Whether you owned architectural decisions</li><li>Whether your instructions were technically specific</li><li>Whether you tested and verified the implementation</li><li>Whether you responded to failures</li><li>Whether you considered edge cases and safety issues</li></ul><p>So don’t think:</p><p>“I need to make my transcript look good.”</p><p>Instead think:</p><p>“I need to actually work like an engineer.”</p><p>If you are doing good engineering work, the transcript naturally becomes useful.</p><h3>11. The Build Should Have a Clear Loop</h3><p>A good Orchestrate workflow is basically:</p><p><strong>Plan → Build → Test → Review → Fix → Repeat</strong></p><p>You build something.</p><p>You run it.</p><p>You inspect the result.</p><p>You find a problem.</p><p>You figure out where the problem actually belongs.</p><p>You change the relevant part.</p><p>You test again.</p><p>Then you continue.</p><p>This is much better than:</p><p><strong>Prompt → Generate → Submit</strong></p><p>The second approach might produce something quickly, but it gives you very little confidence in what you actually built.</p><h3>12. Testing Is Not Something You Do at the End</h3><p>This is one of the biggest practical lessons I would give anyone participating.</p><p>Don’t wait until hour 22 to discover that your architecture doesn’t work.</p><p>Test continuously.</p><p>After implementing each major component, test it.</p><p>After connecting components, test them together.</p><p>After changing a prompt, test the output again.</p><p>After changing retrieval, check whether retrieval actually improved.</p><p>After adding guardrails, test the cases that trigger them.</p><p>You should constantly be asking:</p><p><strong>What happens if this goes wrong?</strong></p><h3>13. Test the Cases You Don’t Want to Test</h3><p>Happy paths are easy.</p><p>The difficult cases are where your agent actually gets exposed.</p><p>Think about:</p><ul><li>Missing information</li><li>Contradictory information</li><li>Unexpected input</li><li>Empty results</li><li>Invalid model output</li><li>Incorrect tool responses</li><li>Ambiguous requests</li><li>Out-of-scope requests</li><li>Prompt injection</li><li>Jailbreak attempts</li><li>Hallucinated information</li><li>Incorrect classifications</li></ul><p>The exact adversarial cases obviously depend on the challenge.</p><p>But you should actively look for them.</p><p>In the May 2026 edition, for example, HackerRank deliberately included edge cases, prompt injection attempts, and jailbreak-style inputs in its evaluation dataset.</p><p>That tells you something important:</p><p><strong>Don’t only build for the examples you were shown.</strong></p><p>Build for the cases that could break your assumptions.</p><h3>14. Output Quality Matters as Much as Code Quality</h3><p>This is another thing people sometimes overlook.</p><p>You can have beautiful code and still have a bad submission.</p><p>Why?</p><p>Because your agent ultimately needs to produce the right result.</p><p>HackerRank evaluates the actual output separately from the code. In the May edition, for example, outputs were evaluated against a golden dataset for accuracy, while the overall submission was also evaluated for safety when dealing with adversarial inputs.</p><p>So constantly inspect the output.</p><p>Don’t just ask:</p><p>“Does the program run?”</p><p>Ask:</p><p>“Is the answer actually correct?”</p><p>Those are very different questions.</p><h3>15. Don’t Optimize the Wrong Thing</h3><p>During a 24-hour hackathon, time becomes one of your biggest constraints.</p><p>You will always have more things you could improve.</p><p>The question is:</p><p><strong>What improvement gives you the highest value?</strong></p><p>If your core agent is producing incorrect answers, don’t spend two hours making the UI beautiful.</p><p>If retrieval is failing, don’t add another feature.</p><p>If the architecture is fundamentally wrong, don’t polish the README.</p><p>Prioritize the biggest source of failure first.</p><p>A useful order is usually:</p><p><strong>Correctness → Reliability → Edge Cases → Performance → Polish</strong></p><p>Obviously, the exact priority depends on the problem.</p><p>But don’t let cosmetic improvements distract you from fundamental problems.</p><h3>16. Know When to Stop Adding Features</h3><p>This is surprisingly difficult.</p><p>You build the MVP.</p><p>Then you think:</p><p>“I could also add this.”</p><p>Then:</p><p>“And maybe this.”</p><p>Then:</p><p>“What if we add another agent?”</p><p>Suddenly you’ve spent six hours building things that weren’t necessary.</p><p>Remember what you’re actually trying to achieve.</p><p>You want the best possible solution to the challenge.</p><p>Not the biggest repository.</p><p>Not the longest README.</p><p>Not the most complicated architecture.</p><p>A smaller system that consistently solves the problem is much more valuable than a huge system that breaks in unexpected situations.</p><h3>17. The AI Judge Interview</h3><p>This is where the entire process comes together.</p><p>After submission, you face a 30-minute AI Judge interview.</p><p>The current Orchestrate format describes this as a voice-based interview where you walk through your architecture, decisions, tradeoffs, and implementation.</p><p>And this is where blindly using AI becomes a serious problem.</p><p>Imagine spending 20 hours allowing an agent to build your entire project without understanding what it did.</p><p>Then the judge asks:</p><p>“Why did you choose this architecture?”</p><p>You don’t know.</p><p>“Why is this model being used here?”</p><p>You don’t know.</p><p>“How does retrieval work?”</p><p>You don’t know.</p><p>“Why does this function exist?”</p><p>You don’t know.</p><p>“How does your system behave when retrieval returns nothing?”</p><p>You don’t know.</p><p>That’s going to hurt.</p><p>The interview is specifically designed to test whether you understand and own the system.</p><p>HackerRank’s current rubric puts substantial weight on technical depth and ownership, problem understanding, communication, and honesty about limitations.</p><h3>18. Prepare for the Interview While You Build</h3><p>Don’t wait until the end.</p><p>Every major decision you make during the hackathon should be something you could explain later.</p><p>If you choose a particular retrieval strategy, know why.</p><p>If you choose a particular model, know why.</p><p>If you decide to use a particular prompt structure, know why.</p><p>If you add a guardrail, know what failure it prevents.</p><p>If you remove something, know why it wasn’t worth keeping.</p><p>If something failed, remember what happened.</p><p>These become natural interview questions.</p><p>And if you’ve been involved throughout the build, you don’t need to memorize answers.</p><p>You already know them.</p><h3>19. Be Honest About What AI Did</h3><p>There is absolutely nothing wrong with using AI heavily.</p><p>That’s literally the point of Orchestrate.</p><p>You are expected to use AI.</p><p>The problem is pretending you understand something when you don’t.</p><p>If an AI agent implemented a component, that’s fine.</p><p>But you should still be able to explain that component.</p><p>If you don’t understand it, go back and ask the AI to explain it.</p><p>Read the code.</p><p>Test it.</p><p>Question it.</p><p>Change it.</p><p>Then move forward.</p><p>The strongest approach is not:</p><p><strong>“I wrote everything myself.”</strong></p><p>It is:</p><p><strong>“I used AI extensively, but I owned the engineering decisions.”</strong></p><h3>20. What I Would Do With the 24 Hours</h3><p>Everyone will have their own workflow, but if I were starting another Orchestrate from scratch, I’d roughly think about the 24 hours like this.</p><h3>Phase 1: Understand</h3><p>Read the problem.</p><p>Understand the data.</p><p>Understand the expected output.</p><p>Identify constraints.</p><p>Think about failure modes.</p><p>Don’t rush.</p><h3>Phase 2: Design</h3><p>Create the simplest architecture that can realistically solve the problem.</p><p>Decide:</p><ul><li>Model strategy</li><li>Agent flow</li><li>Tools</li><li>Retrieval</li><li>Data handling</li><li>Output structure</li><li>Validation</li><li>Guardrails</li></ul><h3>Phase 3: Build the Core</h3><p>Get the minimum working version running.</p><p>Don’t worry about making everything perfect.</p><p>The objective here is to prove that your basic approach works.</p><h3>Phase 4: Evaluate</h3><p>Run the system.</p><p>Inspect the outputs.</p><p>Find where it fails.</p><p>Don’t assume the architecture is correct just because the first few examples work.</p><h3>Phase 5: Improve</h3><p>Fix the biggest problems.</p><p>Improve retrieval.</p><p>Improve prompts.</p><p>Improve validation.</p><p>Improve reasoning.</p><p>Handle edge cases.</p><p>Add guardrails.</p><p>Whatever the problem actually requires.</p><h3>Phase 6: Stabilize</h3><p>Once the system works well, stop changing fundamental architecture unless absolutely necessary.</p><p>Focus on reliability.</p><p>Clean up the implementation.</p><p>Remove unnecessary complexity.</p><p>Make sure the project can actually be run.</p><h3>Phase 7: Final Review</h3><p>Before submission, check everything.</p><p>Code.</p><p>Outputs.</p><p>Configuration.</p><p>Environment variables.</p><p>README.</p><p>Dependencies.</p><p>File structure.</p><p>Transcript.</p><p>Anything required by the submission instructions.</p><p>Then review your system one final time.</p><h3>21. What I Would Absolutely Not Do</h3><p>If I had to give a short list of things to avoid, it would be this:</p><h4>Don’t start coding before understanding the problem.</h4><h4>Don’t blindly accept the first architecture suggested by an AI.</h4><h4>Don’t give your agent the entire project as one giant task.</h4><h4>Don’t let the agent run without supervision for long periods.</h4><h4>Don’t assume generated code is correct.</h4><h4>Don’t test only happy paths.</h4><h4>Don’t add unnecessary complexity.</h4><h4>Don’t leave evaluation until the final few hours.</h4><h4>Don’t ignore the transcript.</h4><h4>Don’t treat the AI interview as an afterthought.</h4><h4>Don’t submit something you cannot explain.</h4><p>And most importantly:</p><h4>Don’t build something just because the AI told you it was a good idea.</h4><p>You are still the engineer.</p><h3>22. What About HackerRank’s AI Credits?</h3><p>This has changed across editions, so I would not assume that what was available in one edition will automatically be available in another.</p><p>For example, the May 2026 edition provided all participants with HackerRank AI Mock Interview credits, while the June edition also offered AI Mock Interview credits alongside edition-specific rewards. The August edition had its own reward structure as well.</p><p>For the current September edition, HackerRank explicitly lists Codex credits as a reward for the top three winners who build with Codex.</p><p>So I would always check the official page for the specific edition rather than relying on information from an older Orchestrate.</p><p>The same applies to tool credits, subscriptions, interview credits, partner benefits, and other resources.</p><h3>23. You Don’t Need the “Best” AI Tool</h3><p>I’ve seen people spend a ridiculous amount of time worrying about which coding agent they should use.</p><p>Claude Code?</p><p>Codex?</p><p>Cursor?</p><p>Antigravity?</p><p>Something else?</p><p>Honestly, the tool is only one part of the equation.</p><p>HackerRank’s data from the May edition showed participants using many different tools. Antigravity, Codex, Claude Code, and GitHub Copilot were among the most commonly observed, but there was no single tool that defined the winning approach.</p><p>The important question isn’t:</p><p><strong>“Which AI tool is the best?”</strong></p><p>It is:</p><p><strong>“Can I use this tool effectively?”</strong></p><p>If you already know a tool well, that familiarity can be worth far more than switching to something new halfway through the hackathon.</p><h3>24. The Real Skill Orchestrate Is Testing</h3><p>This might sound strange for an AI hackathon, but I think testing is one of the most underrated skills here.</p><p>Anyone can ask an AI agent to build something.</p><p>The difficult part is figuring out whether what it built is actually good.</p><p>That requires you to:</p><ul><li>Question the output</li><li>Find weaknesses</li><li>Create test cases</li><li>Understand failures</li><li>Trace failures back to the architecture</li><li>Decide whether the problem is in the prompt, model, retrieval, code, validation, or data</li><li>Fix the right layer</li></ul><p>That’s real engineering.</p><p>And that is exactly why Orchestrate is interesting.</p><h3>25. The Mindset I Recommend</h3><p>If I had to reduce everything I’ve learned from the previous editions into one idea, it would be this:</p><p><strong>Don’t think of yourself as someone who is using AI to write code.</strong></p><p>Think of yourself as an engineer who has an AI engineering partner.</p><p>You define the problem.</p><p>You make the important decisions.</p><p>You set the constraints.</p><p>You review the implementation.</p><p>You test the system.</p><p>You decide what needs to change.</p><p>The AI accelerates the execution.</p><p>That distinction sounds small, but it completely changes how you approach the hackathon.</p><h3>26. My Biggest Takeaway From Three Editions</h3><p>After participating in all three previous editions and helping other builders through them, the biggest thing I’ve noticed is that the people who get the most out of Orchestrate are not necessarily the people who know the most AI frameworks.</p><p>They are the people who can take an ambiguous problem and turn it into a structured engineering process.</p><p>They know how to:</p><p><strong>Understand → Design → Build → Evaluate → Iterate → Explain</strong></p><p>And they don’t lose ownership of the system just because AI is doing a large part of the implementation.</p><p>That’s really what Orchestrate is testing.</p><p>Not whether you can make an LLM generate a project.</p><p>Not whether you can write the biggest prompt.</p><p>Not whether you can use the newest model.</p><p>It is whether you can <strong>engineer with AI</strong>.</p><h3>Final Advice</h3><p>If this is your first Orchestrate, don’t go into it thinking you need to be an expert at everything.</p><p>You don’t.</p><p>You need to be comfortable learning quickly, making decisions, experimenting, and adapting.</p><p>When the challenge arrives, take a breath.</p><p>Understand it.</p><p>Don’t immediately code.</p><p>Make a plan.</p><p>Build the simplest useful version.</p><p>Test it early.</p><p>Let AI accelerate the work, but keep yourself in control.</p><p>When something breaks, understand why.</p><p>When something works, understand why.</p><p>And when you finally submit, make sure you can explain every important part of what you built.</p><p>Because the goal isn’t just to have an agent that works.</p><p>The goal is to be the person who can say:</p><p><strong>“I built this with AI, I understand how it works, I know why I made these decisions, and I know where it can still fail.”</strong></p><p>That’s the mindset I’d take into Orchestrate.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3268f0d710a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>