tuieval 0.2.0.dev158__tar.gz → 0.2.0.dev160__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.
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/CHANGELOG.md +1 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/PKG-INFO +1 -1
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/models.md +1 -1
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/_version.py +2 -2
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/ctxbench.py +14 -3
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/tests/test_tuieval.py +15 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/.gitignore +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/LICENSE +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/README.md +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/RELEASING.md +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/agent-packs.md +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/brand/README.md +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/brand/favicon.ico +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/brand/readme-header.png +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/brand/social-preview.png +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/brand/tuieval-icon-1024.png +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/brand/tuieval-icon-128.png +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/brand/tuieval-icon-16.png +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/brand/tuieval-icon-16.svg +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/brand/tuieval-icon-256.png +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/brand/tuieval-icon-32.png +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/brand/tuieval-icon-48.png +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/brand/tuieval-icon-512.png +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/brand/tuieval-icon-64.png +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/brand/tuieval-icon-animated.svg +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/brand/tuieval-icon.svg +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/tui-answer-reasoning.png +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/tui-run-reasoning.png +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/images/tui-setup.png +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/docs/writing-packs.md +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/pyproject.toml +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/__init__.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/__main__.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/agents.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/builtin.toml +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/cli.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/client.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/compare.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/dates.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/doctor.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/engine.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/export.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/graders/__init__.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/graders/answer.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/graders/code.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/graders/rag.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/graders/reply.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/graders/tool_call.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/insights.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/logs.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/machines.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/onboard.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/packs.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/profiles.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/pta.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/remove.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/run_evals.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/scaffold.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/selftest.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/models.toml +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/answer/pack.toml +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/answer/system.txt +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/answer/tests.yaml +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/code/pack.toml +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/code/system.txt +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/code/tests.yaml +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/rag/pack.toml +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/rag/system.txt +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/rag/tests.yaml +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/reply/pack.toml +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/reply/system.txt +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/reply/tests.yaml +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/tool_call/pack.toml +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/tool_call/system.txt +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/tool_call/tests.yaml +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/tool_call/tools.yaml +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/tui.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/tune.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/verdict.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/watch_proxy.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/workspace.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/yamlout.py +0 -0
- {tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/tests/mock_server.py +0 -0
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- Fix: `tuieval tune --ctx` stopped early ("predicted to need more memory") on servers that fill memory to their own budget whatever the context. When the smallest context that passed already took more than the memory set aside, the prediction no longer caps the search.
|
|
5
6
|
- Fix: `tuieval tune --ctx` found no working context for servers that fill memory to their own budget and run with macOS memory pressure at the warning level. When the first try reaches that level with nothing swapped, tries are judged by swapping, memory running out and critical pressure instead.
|
|
6
7
|
- Fix: `tuieval tune --ctx` refused models larger than the machine's memory ("another model or app is holding memory"), which servers that read the model from disk as needed run fine. Their size on disk is no longer checked against free memory.
|
|
7
8
|
- Fix: `tuieval tune --ctx` waits for the machine to recover after each try (memory pressure back to normal, memory given back). A try stopped for memory pressure could fail the next one within seconds, at a context that works.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: tuieval
|
|
3
|
-
Version: 0.2.0.
|
|
3
|
+
Version: 0.2.0.dev160
|
|
4
4
|
Summary: Evaluate local and frontier LLMs on your own questions: accuracy, speed, tokens and PASS/FAIL verdicts, in the terminal.
|
|
5
5
|
Project-URL: Homepage, https://github.com/ashe-wb/tuieval
|
|
6
6
|
Project-URL: Issues, https://github.com/ashe-wb/tuieval/issues
|
|
@@ -154,7 +154,7 @@ The fit check estimates the context from the model file, and only for servers th
|
|
|
154
154
|
|
|
155
155
|
1. It starts the server with a context, sends a built-in document that fills it (sized from the token counts the server reports, so any tokenizer works) with one fact near the start, and asks for that fact.
|
|
156
156
|
2. The try passes when the answer is right, the server read the whole document (a server that cuts long prompts short fails here), and the machine stayed healthy: no macOS memory pressure, no swapping, memory left on Linux. A try is stopped the moment one of those turns bad, also while the server is still loading. The next try waits until the machine has recovered, so the pressure one try leaves behind can't fail the next. Some servers fill memory to a budget of their own and run with macOS memory pressure at the warning level: when the very first try reaches it with nothing swapped out, it is tried again, and from then on a try is stopped only for swapping, memory running out or critical pressure.
|
|
157
|
-
3. It starts at half the context the model runs with now (32768 when that isn't known) and doubles. Memory grows about linearly with the context, so two tries that passed predict the largest context that fits in the machine's memory (less `memory_headroom_gb`, and less whatever other apps hold now); no try goes above the prediction, and a failed try is bisected against the largest that passed.
|
|
157
|
+
3. It starts at half the context the model runs with now (32768 when that isn't known) and doubles. Memory grows about linearly with the context, so two tries that passed predict the largest context that fits in the machine's memory (less `memory_headroom_gb`, and less whatever other apps hold now); no try goes above the prediction, and a failed try is bisected against the largest that passed. A server that takes more than that at the smallest context and still passes sizes its own memory (it fills a budget of its own, whatever the context): the prediction doesn't cap it, and it keeps doubling until a try fails or is stopped.
|
|
158
158
|
|
|
159
159
|
Expect 3 to 5 server starts; the largest ones take as long as the server needs to read that many tokens. It won't start when memory pressure is already elevated or the model is larger than the memory free now (unless the model is larger than the machine's memory altogether: a server that reads its model from disk as needed is judged by the tries alone).
|
|
160
160
|
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.2.0.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 2, 0, '
|
|
21
|
+
__version__ = version = '0.2.0.dev160'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 2, 0, 'dev160')
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -20,7 +20,9 @@ The search starts at half the context the model runs with now and doubles, up to
|
|
|
20
20
|
limit: what models.toml caps the context at (max_ctx, ctx, a context flag) doesn't bound it, since
|
|
21
21
|
the measurement replaces those. Memory grows about linearly with the context, so two probes that
|
|
22
22
|
passed predict the largest context that fits under the machine's limit; no probe goes above that
|
|
23
|
-
prediction, and a failed probe is bisected against the largest that passed. A
|
|
23
|
+
prediction, and a failed probe is bisected against the largest that passed. (A server that already
|
|
24
|
+
takes more than that limit at the smallest context, and passes, sizes its own memory: the
|
|
25
|
+
prediction doesn't cap it, and the probes and their guard decide.) A probe is stopped at
|
|
24
26
|
once, while the server loads or works, when memory pressure rises, the machine starts swapping,
|
|
25
27
|
or memory runs out. (A server that reaches the warning level at the smallest context, with nothing
|
|
26
28
|
swapped, fills memory to a budget of its own: for it only critical pressure counts, besides
|
|
@@ -321,6 +323,7 @@ def search(try_ctx, start, upper, limit_gb=None, step=STEP, floor=FLOOR, max_sta
|
|
|
321
323
|
Returns (probes in the order tried, why it stopped)."""
|
|
322
324
|
tried, lo, hi, c = [], None, None, min(start, upper)
|
|
323
325
|
why = f"{max_starts} server starts used"
|
|
326
|
+
budget = limit_gb # None once the tries show it doesn't describe this server
|
|
324
327
|
while len(tried) < max_starts:
|
|
325
328
|
emit("tune_step", message=f"[{len(tried) + 1}] context {c:,}", start=len(tried) + 1, max_starts=max_starts)
|
|
326
329
|
try:
|
|
@@ -347,12 +350,20 @@ def search(try_ctx, start, upper, limit_gb=None, step=STEP, floor=FLOOR, max_sta
|
|
|
347
350
|
if hi is not None and hi - lo <= step:
|
|
348
351
|
why = f"{hi:,} failed: {next(p.error for p in tried if p.ctx == hi)}"
|
|
349
352
|
break
|
|
350
|
-
|
|
353
|
+
smallest = min((p for p in tried if p.ok and p.mem_gb), key=lambda p: p.ctx, default=None)
|
|
354
|
+
if budget is not None and smallest and smallest.mem_gb >= budget:
|
|
355
|
+
# Over the budget at the smallest context that passed: the context isn't what takes the
|
|
356
|
+
# memory. The server fills memory to a budget of its own, so the prediction can't cap it.
|
|
357
|
+
emit("tune_step", message=f" it took {smallest.mem_gb:.1f} GB at {smallest.ctx:,} already, more than the "
|
|
358
|
+
f"{budget:.1f} GB set aside, and passed: this server sizes its own memory, so "
|
|
359
|
+
"the search goes by the tries, not by predicted memory")
|
|
360
|
+
budget = None
|
|
361
|
+
_, per, fit = predict([p for p in tried if p.ok], budget)
|
|
351
362
|
nxt = min(upper, lo * 2) if hi is None else lo + _grid((hi - lo) / 2)
|
|
352
363
|
if fit is not None and fit < nxt:
|
|
353
364
|
if _grid(fit) - lo < min(step, upper - lo):
|
|
354
365
|
at = min(upper, lo + step)
|
|
355
|
-
why = (f"memory: {at:,} is predicted to need more than the {
|
|
366
|
+
why = (f"memory: {at:,} is predicted to need more than the {budget:.1f} GB this machine has "
|
|
356
367
|
f"for it ({per * 1000:.3f} GB per 1,000 tokens)")
|
|
357
368
|
break
|
|
358
369
|
nxt = _grid(fit)
|
|
@@ -4044,6 +4044,21 @@ class ContextBench(unittest.TestCase):
|
|
|
4044
4044
|
ctxbench.settle(eng, 85.0, lambda kind, **d: said.append(d["message"]), limit_s=0.01)
|
|
4045
4045
|
self.assertIn("25.0 GB less memory is available", said[-1])
|
|
4046
4046
|
|
|
4047
|
+
def test_search_isnt_capped_by_memory_a_server_sizes_itself(self):
|
|
4048
|
+
said = []
|
|
4049
|
+
# about 84 GB whatever the context, against 82.9 GB set aside: over it from the smallest try on
|
|
4050
|
+
best, tried, why = self._search(300000, gb=lambda c: 84.0 + c * 4e-6, start=32768, upper=1048576,
|
|
4051
|
+
limit_gb=82.9, max_starts=12,
|
|
4052
|
+
emit=lambda kind, **d: said.append(d.get("message", "")))
|
|
4053
|
+
self.assertEqual(tried[:5], [32768, 65536, 131072, 262144, 524288])
|
|
4054
|
+
self.assertGreaterEqual(best, 262144)
|
|
4055
|
+
self.assertIn("failed", why)
|
|
4056
|
+
self.assertEqual(sum("sizes its own memory" in s for s in said), 1)
|
|
4057
|
+
# one whose memory grows with the context past the budget is still capped
|
|
4058
|
+
best, tried, why = self._search(10**9, gb=lambda c: 70 + 0.0001 * c, start=32768, upper=1048576, limit_gb=82.9)
|
|
4059
|
+
self.assertTrue(why.startswith("memory:"), why)
|
|
4060
|
+
self.assertLess(max(tried), 131072)
|
|
4061
|
+
|
|
4047
4062
|
def test_search_halves_when_the_first_try_fails(self):
|
|
4048
4063
|
best, tried, why = self._search(20000, start=65536, upper=131072)
|
|
4049
4064
|
self.assertEqual(tried[:3], [65536, 32768, 16384])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/tool_call/pack.toml
RENAMED
|
File without changes
|
{tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/tool_call/system.txt
RENAMED
|
File without changes
|
{tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/tool_call/tests.yaml
RENAMED
|
File without changes
|
{tuieval-0.2.0.dev158 → tuieval-0.2.0.dev160}/src/tuieval/templates/packs/tool_call/tools.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|