[GH-ISSUE #53] Sampler applies penalties twice, breaking single-pass llama.cpp sampling parity #29

Closed
opened 2026-11-04 01:39:09 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @hendrikp on GitHub (Sep 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/53

AI disclosure

I was testing performance of various llamacpp branches/forks and measuring the parameters, and came across strata and wanted to find out how it will perform and if the quality is the same. After i finished benchmarking i wanted to find out what makes the biggest difference or if there is quality degradation (difficult to judge). Anyways one difference my agent identified.

Difference/bug identifie through codex-cli (gpt-6-astra medium).

Version

Strata v0.1.13,

Verification consisted of tracing the checked-out source, its host parity reference, and the llama.cpp sampler chain used in our comparison, plus executing the numerical example below. This report does not claim a new CUDA runtime reproduction or that later revisions remain affected.

The non-greedy sampler applies repetition, frequency and presence penalties before candidate selection, then applies the same penalties again after temperature scaling:

  1. Penalty implementation, sampler.cu lines 63-69.
  2. First application during candidate selection, lines 225-233.
  3. The already-penalized value is stored in sel_logit, line 251.
  4. Second application in scaled(), lines 286-300.

The file header explicitly describes this two-pass order. The issue is therefore a sampling-semantics/parity error rather than a discrepancy between the implementation and its own comments.

For comparison, the llama.cpp fork used in our benchmark has one PENALTIES entry before TEMPERATURE in its default sampler list. Chain construction iterates that list; the textual order of switch cases does not determine execution order. The saved benchmark response also confirms exactly one penalties stage before temperature. llama.cpp supports configurable sampler chains; this comparison concerns that single-pass chain.

The corresponding llama.cpp arithmetic is in llama_sampler_penalties_apply(), lines 2950-2977: the sign-dependent repetition adjustment is followed by subtraction of count * penalty_freq + (count > 0) * penalty_present. Temperature scaling divides the resulting logit by temperature, line 289. Together with the single penalties stage in the linked chain, this gives (logit - presence_penalty) / temperature when repetition and frequency penalties are neutral. The individual penalty formula in Strata is not the problem; applying it twice is.

Minimal numerical reproduction

Use two tokens A and B with logits [0, 0], history [A], penalty_last_n=1, penalty_repeat=1, penalty_freq=0, penalty_present=1.5, temperature=0.7, top_k=2, top_p=1, and min_p=0. Both candidates survive all filters, isolating penalty application from truncation and RNG differences.

import math

single = (0.0 - 1.5) / 0.7
strata = single - 1.5

def probability_a(logit_a):
    return 1.0 / (1.0 + math.exp(-logit_a))  # B has logit zero

print(f"Single penalty: {probability_a(single):.10f}")
print(f"Strata source:  {probability_a(strata):.10f}")

Executed output:

Single penalty: 0.1050005850
Strata source:  0.0255096664

Expected for single-pass parity: A receives one presence penalty. Actual source behavior: A receives a second penalty after temperature scaling, reducing its probability from approximately 10.50% to 2.55%.

Why the existing parity test does not catch this

The host reference explicitly duplicates both penalty passes, and the sampled-penalties fixture tests against that reference. Agreement with this reference establishes internal consistency, not parity with the single-pass llama.cpp chain.

Scope and suggested correction

This affects non-greedy sampling with history tokens and non-neutral penalties. The greedy path applies penalties once. Neutral penalties make the extra pass inert.

For the single-pass chain described above, retain the first penalty application and make the final scaling stage temperature-only. Update the host reference and add an independently derived distribution fixture such as the example above. Other filter-order differences are outside this report.

The mismatch changes output distributions and prevents interpreting identical penalty settings across engines as equivalent. It does not by itself establish a general quality regression, explain the measured throughput gap, or imply that speculative target verification is skipped.

Originally created by @hendrikp on GitHub (Sep 28, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/53 ## AI disclosure I was testing performance of various llamacpp branches/forks and measuring the parameters, and came across strata and wanted to find out how it will perform and if the quality is the same. After i finished benchmarking i wanted to find out what makes the biggest difference or if there is quality degradation (difficult to judge). Anyways one difference my agent identified. Difference/bug identifie through codex-cli (gpt-6-astra medium). ## Version Strata v0.1.13, Verification consisted of tracing the checked-out source, its host parity reference, and the llama.cpp sampler chain used in our comparison, plus executing the numerical example below. This report does not claim a new CUDA runtime reproduction or that later revisions remain affected. ## Finding and exact source links The non-greedy sampler applies repetition, frequency and presence penalties before candidate selection, then applies the same penalties again after temperature scaling: 1. [Penalty implementation, sampler.cu lines 63-69](https://github.com/Niko1221/Strata/blob/b89c989a7155e984e544ddd90d1038dda7da9e3d/src/kernels/cuda/sampler.cu#L63-L69). 2. [First application during candidate selection, lines 225-233](https://github.com/Niko1221/Strata/blob/b89c989a7155e984e544ddd90d1038dda7da9e3d/src/kernels/cuda/sampler.cu#L225-L233). 3. [The already-penalized value is stored in sel_logit, line 251](https://github.com/Niko1221/Strata/blob/b89c989a7155e984e544ddd90d1038dda7da9e3d/src/kernels/cuda/sampler.cu#L251). 4. [Second application in scaled(), lines 286-300](https://github.com/Niko1221/Strata/blob/b89c989a7155e984e544ddd90d1038dda7da9e3d/src/kernels/cuda/sampler.cu#L286-L300). The file header explicitly describes this two-pass order. The issue is therefore a sampling-semantics/parity error rather than a discrepancy between the implementation and its own comments. For comparison, the llama.cpp fork used in our benchmark has [one PENALTIES entry before TEMPERATURE in its default sampler list](https://github.com/hendrikp/llama.cpp/blob/e24d3538541819ef47dbd13dbcd225d9b3f8450b/common/common.h#L261-L272). [Chain construction iterates that list](https://github.com/hendrikp/llama.cpp/blob/e24d3538541819ef47dbd13dbcd225d9b3f8450b/common/sampling.cpp#L344-L385); the textual order of switch cases does not determine execution order. The saved benchmark response also confirms exactly one penalties stage before temperature. llama.cpp supports configurable sampler chains; this comparison concerns that single-pass chain. The corresponding llama.cpp arithmetic is in [llama_sampler_penalties_apply(), lines 2950-2977](https://github.com/hendrikp/llama.cpp/blob/e24d3538541819ef47dbd13dbcd225d9b3f8450b/src/llama-sampler.cpp#L2950-L2977): the sign-dependent repetition adjustment is followed by subtraction of `count * penalty_freq + (count > 0) * penalty_present`. [Temperature scaling divides the resulting logit by temperature, line 289](https://github.com/hendrikp/llama.cpp/blob/e24d3538541819ef47dbd13dbcd225d9b3f8450b/src/llama-sampler.cpp#L289). Together with the single penalties stage in the linked chain, this gives `(logit - presence_penalty) / temperature` when repetition and frequency penalties are neutral. The individual penalty formula in Strata is not the problem; applying it twice is. ## Minimal numerical reproduction Use two tokens A and B with logits `[0, 0]`, history `[A]`, `penalty_last_n=1`, `penalty_repeat=1`, `penalty_freq=0`, `penalty_present=1.5`, `temperature=0.7`, `top_k=2`, `top_p=1`, and `min_p=0`. Both candidates survive all filters, isolating penalty application from truncation and RNG differences. ```python import math single = (0.0 - 1.5) / 0.7 strata = single - 1.5 def probability_a(logit_a): return 1.0 / (1.0 + math.exp(-logit_a)) # B has logit zero print(f"Single penalty: {probability_a(single):.10f}") print(f"Strata source: {probability_a(strata):.10f}") ``` Executed output: ```text Single penalty: 0.1050005850 Strata source: 0.0255096664 ``` Expected for single-pass parity: A receives one presence penalty. Actual source behavior: A receives a second penalty after temperature scaling, reducing its probability from approximately 10.50% to 2.55%. ## Why the existing parity test does not catch this The [host reference explicitly duplicates both penalty passes](https://github.com/Niko1221/Strata/blob/b89c989a7155e984e544ddd90d1038dda7da9e3d/src/kernels/sampler_parity.cpp#L156-L205), and the [sampled-penalties fixture tests against that reference](https://github.com/Niko1221/Strata/blob/b89c989a7155e984e544ddd90d1038dda7da9e3d/src/kernels/sampler_parity.cpp#L464-L496). Agreement with this reference establishes internal consistency, not parity with the single-pass llama.cpp chain. ## Scope and suggested correction This affects non-greedy sampling with history tokens and non-neutral penalties. The [greedy path applies penalties once](https://github.com/Niko1221/Strata/blob/b89c989a7155e984e544ddd90d1038dda7da9e3d/src/kernels/cuda/sampler.cu#L125-L131). Neutral penalties make the extra pass inert. For the single-pass chain described above, retain the first penalty application and make the final scaling stage temperature-only. Update the host reference and add an independently derived distribution fixture such as the example above. Other filter-order differences are outside this report. The mismatch changes output distributions and prevents interpreting identical penalty settings across engines as equivalent. It does not by itself establish a general quality regression, explain the measured throughput gap, or imply that speculative target verification is skipped.
Author
Owner

@hendrikp commented on GitHub (Sep 28, 2026):

Otherwise great work on the performance on my RTX5080 16b in pciegen3, with the Q2 model i get the following decode t/s:

Image

and thats with a llamacpp fork that has hotexperts, and adaptive kv merged in the original llamacpp was 12 t/s...

<!-- gh-comment-id:5868521557 --> @hendrikp commented on GitHub (Sep 28, 2026): Otherwise great work on the performance on my RTX5080 16b in pciegen3, with the Q2 model i get the following decode t/s: <img width="1353" height="802" alt="Image" src="https://github.com/user-attachments/assets/1600bef9-c91b-404d-b054-e79afeae69f6" /> and thats with a llamacpp fork that has hotexperts, and adaptive kv merged in the original llamacpp was 12 t/s...
Author
Owner

@j-luwierski commented on GitHub (Sep 28, 2026):

Thanks for helping track down this bug! A fix is on the way.

<!-- gh-comment-id:5869716366 --> @j-luwierski commented on GitHub (Sep 28, 2026): Thanks for helping track down this bug! A fix is on the way.
Author
Owner

@Niko1221 commented on GitHub (Sep 28, 2026):

Thank you @hendrikp - you were right, and it was worse than one stage: our notes had transcribed llama.cpp's order from the case labels in common/sampling.cpp rather than from params.samplers, which gave both the second penalties pass after the temperature and min_p before top_p. Fixed in v0.1.17: penalties once, then top_k, top_p, min_p, temperature - llama.cpp's default chain restricted to the samplers Strata has. The parity test's host reference had copied the same order, so it now also checks against an independently computed distribution: your example over 8,000 draws gives token A 0.1040 (expected 0.1050; it was 0.0255), and a second fixture makes top_p-before-min_p observable. Both fail on the old kernel. Greedy decoding was not affected. And thanks for the 5080 numbers! (@j-luwierski - this landed before your fix; if yours covers something else, a PR is still welcome.)

<!-- gh-comment-id:5871076466 --> @Niko1221 commented on GitHub (Sep 28, 2026): Thank you @hendrikp - you were right, and it was worse than one stage: our notes had transcribed llama.cpp's order from the `case` labels in `common/sampling.cpp` rather than from `params.samplers`, which gave both the second penalties pass after the temperature **and** min_p before top_p. Fixed in [v0.1.17](https://github.com/Niko1221/Strata/releases/tag/v0.1.17): penalties once, then top_k, top_p, min_p, temperature - llama.cpp's default chain restricted to the samplers Strata has. The parity test's host reference had copied the same order, so it now also checks against an independently computed distribution: your example over 8,000 draws gives token A **0.1040** (expected 0.1050; it was 0.0255), and a second fixture makes top_p-before-min_p observable. Both fail on the old kernel. Greedy decoding was not affected. And thanks for the 5080 numbers! (@j-luwierski - this landed before your fix; if yours covers something else, a PR is still welcome.)
Author
Owner

@j-luwierski commented on GitHub (Sep 28, 2026):

While re-checking the sampler I did find one small thing though: with penalties off but a stale
history buffer still passed in, both kernels touch the shared bitmap the launch never sized
(shmem is only allocated when penalty_last_n > 0). Not reachable from the server, but easy to
guard - just hlen > 0 in use_bits. I'll rebase and send that as a small standalone PR.

<!-- gh-comment-id:5871335995 --> @j-luwierski commented on GitHub (Sep 28, 2026): While re-checking the sampler I did find one small thing though: with penalties off but a stale history buffer still passed in, both kernels touch the shared bitmap the launch never sized (shmem is only allocated when penalty_last_n > 0). Not reachable from the server, but easy to guard - just hlen > 0 in use_bits. I'll rebase and send that as a small standalone PR.
Author
Owner

@Niko1221 commented on GitHub (Sep 28, 2026):

A follow-up to this one, fixed in v0.1.19: the penalties were applied once after #53, but only to the first token of each speculative batch.

  • A verify window checks several drafted tokens at once. The engine staged the penalty history for the first row only, so the drafted rows were judged against memory that was never written.
  • With ~3 tokens per step, most tokens effectively ignored presence_penalty / repeat_penalty, and penalty_last_n near 4096 could crash the engine.
  • Every row now gets its own history (the tokens before it, including the drafts before it).
  • The test: with a presence penalty of 100 over the last N tokens, no token may repeat within N. On 0.1.18 there were 4-24 repeats in 160 tokens; on 0.1.19 there are none, on Q2_0, IQ2_XS, IQ3_XXS, IQ3_S and the Coder, greedy and sampled.

Requests with penalties are 1-11% slower now, because more draft guesses are rejected; requests without penalties are unchanged. Thanks again for the careful report.

<!-- gh-comment-id:5874936974 --> @Niko1221 commented on GitHub (Sep 28, 2026): A follow-up to this one, fixed in [v0.1.19](https://github.com/Niko1221/Strata/releases/tag/v0.1.19): the penalties were applied once after #53, but only to the first token of each speculative batch. - A verify window checks several drafted tokens at once. The engine staged the penalty history for the first row only, so the drafted rows were judged against memory that was never written. - With ~3 tokens per step, most tokens effectively ignored `presence_penalty` / `repeat_penalty`, and `penalty_last_n` near 4096 could crash the engine. - Every row now gets its own history (the tokens before it, including the drafts before it). - The test: with a presence penalty of 100 over the last N tokens, no token may repeat within N. On 0.1.18 there were 4-24 repeats in 160 tokens; on 0.1.19 there are none, on Q2_0, IQ2_XS, IQ3_XXS, IQ3_S and the Coder, greedy and sampled. Requests with penalties are 1-11% slower now, because more draft guesses are rejected; requests without penalties are unchanged. Thanks again for the careful report.
Author
Owner

@hendrikp commented on GitHub (Sep 28, 2026):

@Niko1221 i still continued on 0.1.13 a small swebench sample today to verify a bit more the quality and it was fine with the code/thinking settings. I think this shows that strata output is good. Feel free to share, Sadly i cant run more extensive verifcations on my local hw.

Setup

  • Hardware: NVIDIA RTX 5080 16 GB, AMD Threadripper 2990WX, 128 GB system RAM, PCIe Gen3 x16; Windows host with Linux Docker task environments.
  • Engine: Strata v0.1.13, b89c989a7155e984e544ddd90d1038dda7da9e3d.
  • Target: Qwen3.8-Flash-Next GSQ-RCO Q2_0, from ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF, with the prepared MTP drafter.
  • Context capacity: 262,144 tokens; INT8 streaming KV; 32,768 resident KV positions.
  • Expert cache and prefill chunk sizing: automatic; CPU expert pool: 12 workers. PLE/n-gram embeddings enabled and held in RAM.
  • MTP: --spec 4 --spec-min-p 0.5, meaning up to three MTP proposals plus the current token per window. Suffix drafting can use a different verification window.
  • Agent: mini-SWE-agent 2.4.6, 04d809ceab9df28f9adaed044884180159172930, using its SWE-bench prompts and tool interface.
  • Grader: official SWE-bench, 02e7a74ffd0b707aab73d203fe87bdc7c76afc8e. The first task's reference patch passed a separate grader smoke test before model evaluation.
  • Dataset: SWE-bench/SWE-bench_Verified at 78f471bf655a3137b2e8a75af1501690ec009ec3, test split.
  • Selection fixed before inference: sort all instance IDs, shuffle using Python random.Random(42), then take the first 30. The table below preserves that order.
  • Limits: 100 agent steps and 7,200 seconds per task, 32,768 output tokens per request, and 1,800 seconds for grading tests. An in-flight request may finish after the agent wall-time limit. Tasks ran sequentially.
  • Normal EOS termination. Experimental speed projection disabled.

Thinking and sampling settings

{
  "temperature": 1.0,
  "top_p": 0.95,
  "top_k": 20,
  "min_p": 0.0,
  "presence_penalty": 0.0,
  "frequency_penalty": 0.0,
  "repetition_penalty": 1.0,
  "seed": 42,
  "chat_template_kwargs": {"enable_thinking": true}
}

The sampling values follow the Qwen thinking recommendations; seed and output limits are evaluation choices. Neutral penalties make the previously identified double-penalty sampler discrepancy inactive in this run, so these results do not validate a fix for that discrepancy.

Configuration change during the pilot

Profile Tasks Prompt checkpoints Checkpoint interval Suffix drafting
A 1-7 0 0 0 (off)
B 8-30 6 16,384 tokens 3 (minimum matching suffix length)
  • Resolved: 29/30.
  • Recorded agent turns: 1,244.
  • Generated tokens across all turns: 501,793.
  • Sum of agent-solving durations: 4h 53m 27s, excluding image downloads, engine startup and grading.
  • Peak sampled total GPU memory usage: 15,423 MiB; peak sampled GPU temperature: 74 C.
  • Unresolved: django__django-15930, which ended with LimitsExceeded at 100 model calls. This does not establish the underlying cause of failure.

Per-task results

One agent turn is one recorded model response, not one individual shell command. All context lengths are tokens. Final input is the full prompt on the last turn, including reused tokens; final total adds that turn's generated tokens. Peak total is the largest input-plus-output context of any recorded turn. Output tokens are cumulative across the task.

Average decode is total generated tokens divided by summed engine decode seconds. Average prefill is newly processed prompt tokens divided by summed engine prompt-processing seconds; reused cached tokens are excluded from its numerator. These are time-weighted averages, not the mean of per-turn rates. Small cached prompt extensions can show lower prefill t/s while completing much faster. All 1,244 recorded response timings matched the engine log in order using prompt and completion token counts; the initial API smoke request was excluded.

# Task Profile Resolved Agent exit Turns Final input Final total Peak total Decode t/s Prefill t/s (new tokens) Agent time Output tokens Peak GPU MiB
1 django__django-14672 A Yes Submitted 19 13,464 13,528 13,528 63.18 1058.83 4m 24s 3,842 15,108
2 sphinx-doc__sphinx-10449 A Yes Submitted 40 36,435 36,539 36,539 60.26 1165.88 18m 48s 12,327 15,111
3 django__django-11299 A Yes Submitted 30 21,189 21,272 21,272 62.17 1105.40 9m 14s 6,062 15,167
4 django__django-14493 A Yes Submitted 26 16,883 17,009 17,009 61.49 1071.97 6m 26s 7,602 15,138
5 django__django-11551 A Yes Submitted 19 16,176 16,322 16,322 61.18 1113.69 5m 5s 5,989 15,132
6 django__django-12143 A Yes Submitted 23 17,073 17,179 17,179 61.10 1083.41 6m 52s 9,121 15,132
7 pydata__xarray-6938 A Yes Submitted 70 52,660 52,773 52,773 60.05 1191.11 47m 20s 25,741 15,423
8 django__django-15916 B Yes Submitted 52 42,071 42,126 42,126 60.79 269.84 8m 9s 17,605 15,276
9 django__django-12193 B Yes Submitted 21 14,161 14,344 14,344 60.11 254.86 2m 28s 5,384 15,271
10 pytest-dev__pytest-5262 B Yes Submitted 18 13,892 14,700 14,700 59.16 258.89 2m 48s 6,317 15,272
11 sphinx-doc__sphinx-8459 B Yes Submitted 49 36,858 36,935 36,935 60.73 289.35 6m 17s 14,446 15,280
12 sphinx-doc__sphinx-9281 B Yes Submitted 37 22,604 22,696 22,696 59.61 252.82 3m 59s 8,154 15,279
13 django__django-13012 B Yes Submitted 30 24,425 24,559 24,559 57.12 263.57 5m 52s 10,242 15,276
14 django__django-16082 B Yes Submitted 23 14,611 14,941 14,941 55.03 248.14 3m 3s 6,679 15,252
15 sympy__sympy-20916 B Yes Submitted 32 36,565 36,693 36,693 58.73 332.75 6m 37s 15,365 15,257
16 django__django-11749 B Yes Submitted 25 21,874 22,002 22,002 57.61 268.33 4m 45s 9,643 15,257
17 scikit-learn__scikit-learn-14629 B Yes Submitted 32 32,845 32,939 32,939 57.65 297.08 6m 12s 14,739 15,257
18 django__django-14631 B Yes Submitted 33 33,185 33,348 33,348 59.57 341.89 5m 31s 12,137 15,225
19 django__django-15930 B No LimitsExceeded 100 100,472 101,324 101,324 57.40 302.08 23m 1s 48,462 15,290
20 django__django-7530 B Yes Submitted 49 39,297 39,349 39,349 59.11 222.60 8m 34s 22,683 15,250
21 sympy__sympy-14248 B Yes Submitted 61 75,330 75,384 75,384 60.50 343.61 14m 56s 36,355 15,203
22 pylint-dev__pylint-4551 B Yes Submitted 73 63,078 63,348 63,348 61.15 296.25 11m 12s 26,986 15,203
23 pallets__flask-5014 B Yes Submitted 14 9,071 9,239 9,239 61.52 267.43 1m 32s 2,541 15,200
24 sphinx-doc__sphinx-7440 B Yes Submitted 75 52,670 52,839 52,839 60.02 259.04 12m 28s 21,869 15,200
25 astropy__astropy-14096 B Yes Submitted 19 27,473 27,551 27,551 61.58 445.87 6m 17s 15,886 15,200
26 sympy__sympy-17655 B Yes Submitted 67 104,243 104,504 104,504 60.32 307.13 25m 5s 66,983 15,203
27 django__django-17084 B Yes Submitted 73 50,761 50,913 50,913 58.21 247.37 15m 21s 21,064 15,200
28 django__django-16485 B Yes Submitted 22 21,770 21,898 21,898 65.37 334.30 3m 29s 8,642 15,200
29 django__django-16901 B Yes Submitted 43 30,301 30,717 30,717 57.69 267.05 6m 28s 12,008 15,203
30 django__django-15957 B Yes Submitted 69 60,478 60,765 60,765 58.00 280.29 11m 17s 26,919 15,385
<!-- gh-comment-id:5875859069 --> @hendrikp commented on GitHub (Sep 28, 2026): @Niko1221 i still continued on 0.1.13 a small swebench sample today to verify a bit more the quality and it was fine with the code/thinking settings. I think this shows that `strata` output is good. Feel free to share, Sadly i cant run more extensive verifcations on my local hw. ## Setup - Hardware: NVIDIA RTX 5080 16 GB, AMD Threadripper 2990WX, 128 GB system RAM, PCIe Gen3 x16; Windows host with Linux Docker task environments. - Engine: Strata v0.1.13, [b89c989a7155e984e544ddd90d1038dda7da9e3d](https://github.com/Niko1221/Strata/tree/b89c989a7155e984e544ddd90d1038dda7da9e3d). - Target: Qwen3.8-Flash-Next GSQ-RCO Q2_0, from [ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF](https://huggingface.co/ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF), with the prepared MTP drafter. - Context capacity: 262,144 tokens; INT8 streaming KV; 32,768 resident KV positions. - Expert cache and prefill chunk sizing: automatic; CPU expert pool: 12 workers. PLE/n-gram embeddings enabled and held in RAM. - MTP: `--spec 4 --spec-min-p 0.5`, meaning up to three MTP proposals plus the current token per window. Suffix drafting can use a different verification window. - Agent: mini-SWE-agent 2.4.6, [04d809ceab9df28f9adaed044884180159172930](https://github.com/SWE-agent/mini-SWE-agent/tree/04d809ceab9df28f9adaed044884180159172930), using its SWE-bench prompts and tool interface. - Grader: official SWE-bench, [02e7a74ffd0b707aab73d203fe87bdc7c76afc8e](https://github.com/SWE-bench/SWE-bench/tree/02e7a74ffd0b707aab73d203fe87bdc7c76afc8e). The first task's reference patch passed a separate grader smoke test before model evaluation. - Dataset: [SWE-bench/SWE-bench_Verified at 78f471bf655a3137b2e8a75af1501690ec009ec3](https://huggingface.co/datasets/SWE-bench/SWE-bench_Verified/tree/78f471bf655a3137b2e8a75af1501690ec009ec3), test split. - Selection fixed before inference: sort all instance IDs, shuffle using Python `random.Random(42)`, then take the first 30. The table below preserves that order. - Limits: 100 agent steps and 7,200 seconds per task, 32,768 output tokens per request, and 1,800 seconds for grading tests. An in-flight request may finish after the agent wall-time limit. Tasks ran sequentially. - Normal EOS termination. Experimental speed projection disabled. ## Thinking and sampling settings ```json { "temperature": 1.0, "top_p": 0.95, "top_k": 20, "min_p": 0.0, "presence_penalty": 0.0, "frequency_penalty": 0.0, "repetition_penalty": 1.0, "seed": 42, "chat_template_kwargs": {"enable_thinking": true} } ``` The sampling values follow the [Qwen thinking recommendations](https://huggingface.co/Qwen/Qwen3.8-Flash-Next#best-practices); seed and output limits are evaluation choices. Neutral penalties make the previously identified double-penalty sampler discrepancy inactive in this run, so these results do not validate a fix for that discrepancy. ## Configuration change during the pilot | Profile | Tasks | Prompt checkpoints | Checkpoint interval | Suffix drafting | |---|---|---:|---:|---:| | A | 1-7 | 0 | 0 | 0 (off) | | B | 8-30 | 6 | 16,384 tokens | 3 (minimum matching suffix length) | - Resolved: **29/30**. - Recorded agent turns: **1,244**. - Generated tokens across all turns: **501,793**. - Sum of agent-solving durations: **4h 53m 27s**, excluding image downloads, engine startup and grading. - Peak sampled total GPU memory usage: **15,423 MiB**; peak sampled GPU temperature: **74 C**. - Unresolved: `django__django-15930`, which ended with `LimitsExceeded` at 100 model calls. This does not establish the underlying cause of failure. ## Per-task results One agent turn is one recorded model response, not one individual shell command. All context lengths are tokens. Final input is the full prompt on the last turn, including reused tokens; final total adds that turn's generated tokens. Peak total is the largest input-plus-output context of any recorded turn. Output tokens are cumulative across the task. Average decode is total generated tokens divided by summed engine decode seconds. Average prefill is newly processed prompt tokens divided by summed engine prompt-processing seconds; reused cached tokens are excluded from its numerator. These are time-weighted averages, not the mean of per-turn rates. Small cached prompt extensions can show lower prefill t/s while completing much faster. All 1,244 recorded response timings matched the engine log in order using prompt and completion token counts; the initial API smoke request was excluded. | # | Task | Profile | Resolved | Agent exit | Turns | Final input | Final total | Peak total | Decode t/s | Prefill t/s (new tokens) | Agent time | Output tokens | Peak GPU MiB | |---:|---|:---:|:---:|---|---:|---:|---:|---:|---:|---:|---|---:|---:| | 1 | `django__django-14672` | A | Yes | Submitted | 19 | 13,464 | 13,528 | 13,528 | 63.18 | 1058.83 | 4m 24s | 3,842 | 15,108 | | 2 | `sphinx-doc__sphinx-10449` | A | Yes | Submitted | 40 | 36,435 | 36,539 | 36,539 | 60.26 | 1165.88 | 18m 48s | 12,327 | 15,111 | | 3 | `django__django-11299` | A | Yes | Submitted | 30 | 21,189 | 21,272 | 21,272 | 62.17 | 1105.40 | 9m 14s | 6,062 | 15,167 | | 4 | `django__django-14493` | A | Yes | Submitted | 26 | 16,883 | 17,009 | 17,009 | 61.49 | 1071.97 | 6m 26s | 7,602 | 15,138 | | 5 | `django__django-11551` | A | Yes | Submitted | 19 | 16,176 | 16,322 | 16,322 | 61.18 | 1113.69 | 5m 5s | 5,989 | 15,132 | | 6 | `django__django-12143` | A | Yes | Submitted | 23 | 17,073 | 17,179 | 17,179 | 61.10 | 1083.41 | 6m 52s | 9,121 | 15,132 | | 7 | `pydata__xarray-6938` | A | Yes | Submitted | 70 | 52,660 | 52,773 | 52,773 | 60.05 | 1191.11 | 47m 20s | 25,741 | 15,423 | | 8 | `django__django-15916` | B | Yes | Submitted | 52 | 42,071 | 42,126 | 42,126 | 60.79 | 269.84 | 8m 9s | 17,605 | 15,276 | | 9 | `django__django-12193` | B | Yes | Submitted | 21 | 14,161 | 14,344 | 14,344 | 60.11 | 254.86 | 2m 28s | 5,384 | 15,271 | | 10 | `pytest-dev__pytest-5262` | B | Yes | Submitted | 18 | 13,892 | 14,700 | 14,700 | 59.16 | 258.89 | 2m 48s | 6,317 | 15,272 | | 11 | `sphinx-doc__sphinx-8459` | B | Yes | Submitted | 49 | 36,858 | 36,935 | 36,935 | 60.73 | 289.35 | 6m 17s | 14,446 | 15,280 | | 12 | `sphinx-doc__sphinx-9281` | B | Yes | Submitted | 37 | 22,604 | 22,696 | 22,696 | 59.61 | 252.82 | 3m 59s | 8,154 | 15,279 | | 13 | `django__django-13012` | B | Yes | Submitted | 30 | 24,425 | 24,559 | 24,559 | 57.12 | 263.57 | 5m 52s | 10,242 | 15,276 | | 14 | `django__django-16082` | B | Yes | Submitted | 23 | 14,611 | 14,941 | 14,941 | 55.03 | 248.14 | 3m 3s | 6,679 | 15,252 | | 15 | `sympy__sympy-20916` | B | Yes | Submitted | 32 | 36,565 | 36,693 | 36,693 | 58.73 | 332.75 | 6m 37s | 15,365 | 15,257 | | 16 | `django__django-11749` | B | Yes | Submitted | 25 | 21,874 | 22,002 | 22,002 | 57.61 | 268.33 | 4m 45s | 9,643 | 15,257 | | 17 | `scikit-learn__scikit-learn-14629` | B | Yes | Submitted | 32 | 32,845 | 32,939 | 32,939 | 57.65 | 297.08 | 6m 12s | 14,739 | 15,257 | | 18 | `django__django-14631` | B | Yes | Submitted | 33 | 33,185 | 33,348 | 33,348 | 59.57 | 341.89 | 5m 31s | 12,137 | 15,225 | | 19 | `django__django-15930` | B | No | LimitsExceeded | 100 | 100,472 | 101,324 | 101,324 | 57.40 | 302.08 | 23m 1s | 48,462 | 15,290 | | 20 | `django__django-7530` | B | Yes | Submitted | 49 | 39,297 | 39,349 | 39,349 | 59.11 | 222.60 | 8m 34s | 22,683 | 15,250 | | 21 | `sympy__sympy-14248` | B | Yes | Submitted | 61 | 75,330 | 75,384 | 75,384 | 60.50 | 343.61 | 14m 56s | 36,355 | 15,203 | | 22 | `pylint-dev__pylint-4551` | B | Yes | Submitted | 73 | 63,078 | 63,348 | 63,348 | 61.15 | 296.25 | 11m 12s | 26,986 | 15,203 | | 23 | `pallets__flask-5014` | B | Yes | Submitted | 14 | 9,071 | 9,239 | 9,239 | 61.52 | 267.43 | 1m 32s | 2,541 | 15,200 | | 24 | `sphinx-doc__sphinx-7440` | B | Yes | Submitted | 75 | 52,670 | 52,839 | 52,839 | 60.02 | 259.04 | 12m 28s | 21,869 | 15,200 | | 25 | `astropy__astropy-14096` | B | Yes | Submitted | 19 | 27,473 | 27,551 | 27,551 | 61.58 | 445.87 | 6m 17s | 15,886 | 15,200 | | 26 | `sympy__sympy-17655` | B | Yes | Submitted | 67 | 104,243 | 104,504 | 104,504 | 60.32 | 307.13 | 25m 5s | 66,983 | 15,203 | | 27 | `django__django-17084` | B | Yes | Submitted | 73 | 50,761 | 50,913 | 50,913 | 58.21 | 247.37 | 15m 21s | 21,064 | 15,200 | | 28 | `django__django-16485` | B | Yes | Submitted | 22 | 21,770 | 21,898 | 21,898 | 65.37 | 334.30 | 3m 29s | 8,642 | 15,200 | | 29 | `django__django-16901` | B | Yes | Submitted | 43 | 30,301 | 30,717 | 30,717 | 57.69 | 267.05 | 6m 28s | 12,008 | 15,203 | | 30 | `django__django-15957` | B | Yes | Submitted | 69 | 60,478 | 60,765 | 60,765 | 58.00 | 280.29 | 11m 17s | 26,919 | 15,385 |
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#29
No description provided.