specbench-cli 0.1.0__tar.gz → 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/PKG-INFO +2 -3
  2. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/README.md +1 -2
  3. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/pyproject.toml +1 -1
  4. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/src/speculation_benchmark/__init__.py +1 -1
  5. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/src/speculation_benchmark/backends/base.py +37 -0
  6. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/src/speculation_benchmark/backends/llamacpp.py +492 -52
  7. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/src/speculation_benchmark/config.py +50 -0
  8. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/src/speculation_benchmark/publisher.py +35 -2
  9. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/src/speculation_benchmark/runner.py +389 -29
  10. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/src/speculation_benchmark/visualize.py +361 -48
  11. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/tests/test_llamacpp_backend.py +244 -1
  12. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/tests/test_suites_and_runner.py +422 -6
  13. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/tests/test_visualize.py +31 -2
  14. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/.gitignore +0 -0
  15. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/LICENSE +0 -0
  16. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/config.example.yaml +0 -0
  17. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/src/speculation_benchmark/backends/__init__.py +0 -0
  18. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/src/speculation_benchmark/cli.py +0 -0
  19. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/src/speculation_benchmark/hf_jobs.py +0 -0
  20. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/src/speculation_benchmark/suites/__init__.py +0 -0
  21. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/src/speculation_benchmark/suites/base.py +0 -0
  22. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/src/speculation_benchmark/suites/loaders.py +0 -0
  23. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/suites/assets/sample_architecture.png +0 -0
  24. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/suites/assets/sample_bar_chart.png +0 -0
  25. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/suites/coding_smoke.jsonl +0 -0
  26. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/suites/multimodal_smoke.jsonl +0 -0
  27. {specbench_cli-0.1.0 → specbench_cli-0.1.1}/tests/test_hf_jobs.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: specbench-cli
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Benchmark llama.cpp speculative decoding token acceptance rates, speedup, and memory overhead across draft lengths and task suites.
5
5
  Project-URL: Homepage, https://github.com/merveenoyan/specbench
6
6
  Project-URL: Repository, https://github.com/merveenoyan/specbench
@@ -35,8 +35,7 @@ Description-Content-Type: text/markdown
35
35
 
36
36
  Benchmark **speculative decoding** in [`llama.cpp`](https://github.com/ggml-org/llama.cpp) across draft lengths and task domains, push results to Hugging Face Hub, and plot dashboards to find the fastest setup for your hardware.
37
37
 
38
- https://github.com/user-attachments/assets/771ae1b8-5b28-4af5-a71e-c80f75fcf209
39
-
38
+ https://github.com/user-attachments/assets/43c08a8e-29a5-46ff-8a32-92d078f5dd41
40
39
 
41
40
  ![Muse-Glimmer-30B speculative decoding benchmark dashboard](https://raw.githubusercontent.com/merveenoyan/specbench/main/assets/muse-glimmer-30b-dashboard.png)
42
41
 
@@ -2,8 +2,7 @@
2
2
 
3
3
  Benchmark **speculative decoding** in [`llama.cpp`](https://github.com/ggml-org/llama.cpp) across draft lengths and task domains, push results to Hugging Face Hub, and plot dashboards to find the fastest setup for your hardware.
4
4
 
5
- https://github.com/user-attachments/assets/771ae1b8-5b28-4af5-a71e-c80f75fcf209
6
-
5
+ https://github.com/user-attachments/assets/43c08a8e-29a5-46ff-8a32-92d078f5dd41
7
6
 
8
7
  ![Muse-Glimmer-30B speculative decoding benchmark dashboard](https://raw.githubusercontent.com/merveenoyan/specbench/main/assets/muse-glimmer-30b-dashboard.png)
9
8
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "specbench-cli"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  description = "Benchmark llama.cpp speculative decoding token acceptance rates, speedup, and memory overhead across draft lengths and task suites."
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
@@ -21,7 +21,7 @@ PACKAGE_NAME = "specbench-cli"
21
21
  try:
22
22
  __version__ = version(PACKAGE_NAME)
23
23
  except PackageNotFoundError:
24
- __version__ = "0.1.0"
24
+ __version__ = "0.1.1"
25
25
 
26
26
  __all__ = [
27
27
  "BenchmarkConfig",
@@ -14,6 +14,7 @@ class CompletionTimings:
14
14
  predicted_n: int = 0
15
15
  draft_n: int = 0
16
16
  draft_n_accepted: int = 0
17
+ cache_n: int = 0
17
18
  prompt_ms: float | None = None
18
19
  predicted_ms: float | None = None
19
20
  prompt_per_second: float | None = None
@@ -26,6 +27,34 @@ class CompletionTimings:
26
27
  return self.draft_n_accepted / self.draft_n
27
28
 
28
29
 
30
+ @dataclass
31
+ class SpeculationStatus:
32
+ """Runtime verification report for a started backend sweep step."""
33
+
34
+ requested_spec_type: str
35
+ requested_draft_n_max: int
36
+ effective_draft_n_max: int
37
+ active_spec_types: list[str] = field(default_factory=list)
38
+ auto_detected_spec_type: str | None = None
39
+ loaded_draft_file: str | None = None
40
+ mtp_context_created: bool = False
41
+ detected_block_size: int | None = None
42
+ error_messages: list[str] = field(default_factory=list)
43
+ startup_logs_observed: bool = False
44
+ silent_fallback: bool = False
45
+ warnings: list[str] = field(default_factory=list)
46
+
47
+ @property
48
+ def effective_spec_type(self) -> str:
49
+ if self.requested_draft_n_max == 0:
50
+ return "none"
51
+ if self.active_spec_types:
52
+ return ",".join(self.active_spec_types)
53
+ if self.silent_fallback:
54
+ return "none"
55
+ return self.requested_spec_type
56
+
57
+
29
58
  @dataclass
30
59
  class CompletionResponse:
31
60
  """Normalized completion response from a speculative decoding backend."""
@@ -34,8 +63,16 @@ class CompletionResponse:
34
63
  finish_reason: str | None
35
64
  latency_s: float
36
65
  timings: CompletionTimings
66
+ reasoning_content: str = ""
37
67
  raw_usage: dict[str, Any] = field(default_factory=dict)
38
68
 
69
+ @property
70
+ def full_output(self) -> str:
71
+ """Full generated text including any reasoning trace, for exact consistency comparison."""
72
+ if self.reasoning_content and self.content:
73
+ return f"{self.reasoning_content}\n{self.content}"
74
+ return self.content or self.reasoning_content
75
+
39
76
 
40
77
  class SpeculationBackend(Protocol):
41
78
  """Protocol implemented by inference backends (local llama.cpp now, HF Jobs later)."""