tuieval 0.2.0.dev2__py3-none-any.whl → 0.2.0.dev4__py3-none-any.whl

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/_version.py CHANGED
@@ -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.dev2'
22
- __version_tuple__ = version_tuple = (0, 2, 0, 'dev2')
21
+ __version__ = version = '0.2.0.dev4'
22
+ __version_tuple__ = version_tuple = (0, 2, 0, 'dev4')
23
23
 
24
24
  __commit_id__ = commit_id = None
tuieval/engine.py CHANGED
@@ -96,6 +96,16 @@ def load_config(path):
96
96
  return cfg
97
97
 
98
98
 
99
+ def fit_check(server):
100
+ """Whether tuieval sizes the context for this server's models from GGUF headers (machines.fit,
101
+ which assumes llama.cpp's memory use). By default only servers whose command takes {ctx}, i.e.
102
+ where tuieval chooses the context; others size their own memory, and their context is the
103
+ model's max_context. models.toml `fit_check = true|false` on a server overrides it."""
104
+ if "fit_check" in server:
105
+ return bool(server["fit_check"])
106
+ return any("{ctx}" in str(a) for a in server.get("cmd", []))
107
+
108
+
99
109
  def effective_sampling(cfg, m):
100
110
  """The request settings this model runs with: [sampling], then the model's own overrides."""
101
111
  s = dict(cfg["sampling"])
@@ -1018,13 +1028,15 @@ class Engine:
1018
1028
  path = expand(m["model"])
1019
1029
  if server.get("model_is_path") and os.path.isfile(path):
1020
1030
  try:
1021
- mmproj = expand(m.get("mmproj", ""))
1022
- extra = os.path.getsize(mmproj) if mmproj and os.path.isfile(mmproj) else 0
1023
- headroom = self.machine_settings(mc.id).get("memory_headroom_gb", 4.0)
1024
- f = machines.fit(path, mc, kv_type=kv or "f16", headroom_gb=headroom, extra_bytes=extra,
1025
- want_ctx=want)
1026
1031
  info = machines.read_gguf(path)
1027
- ctx, fits, note, mtp, size = f.max_ctx, f.fits, f.note, info["mtp_layers"], info["bytes"]
1032
+ mtp, size = info["mtp_layers"], info["bytes"]
1033
+ if fit_check(server):
1034
+ mmproj = expand(m.get("mmproj", ""))
1035
+ extra = os.path.getsize(mmproj) if mmproj and os.path.isfile(mmproj) else 0
1036
+ headroom = self.machine_settings(mc.id).get("memory_headroom_gb", 4.0)
1037
+ f = machines.fit(path, mc, kv_type=kv or "f16", headroom_gb=headroom, extra_bytes=extra,
1038
+ want_ctx=want)
1039
+ ctx, fits, note = f.max_ctx, f.fits, f.note
1028
1040
  except (OSError, ValueError) as e:
1029
1041
  note = f"couldn't read the GGUF header ({e}); context not checked"
1030
1042
  profile, perf, source = None, [], "n/a"
tuieval/tune.py CHANGED
@@ -315,8 +315,11 @@ def family(path):
315
315
  i = machines.read_gguf(engine_mod.expand(path))
316
316
  except (OSError, ValueError):
317
317
  return None
318
+ # The MTP (nextn) draft layers at the end are left out: GGUFs of the same model describe them
319
+ # differently, and whether draft-mtp is offered is decided per model (knobs) anyway.
320
+ heads = i["kv_heads_per_layer"][:len(i["kv_heads_per_layer"]) - i["mtp_layers"]]
318
321
  return (i["architecture"], i["layers"], i["embedding"], i["experts"], i["experts_used"],
319
- i["head_dim_k"], i["head_dim_v"], tuple(i["kv_heads_per_layer"]))
322
+ i["head_dim_k"], i["head_dim_v"], tuple(heads))
320
323
 
321
324
 
322
325
  @dataclasses.dataclass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: tuieval
3
- Version: 0.2.0.dev2
3
+ Version: 0.2.0.dev4
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
@@ -1,10 +1,10 @@
1
1
  tuieval/__init__.py,sha256=myVXVX7htbwezW6k3x_FuKgn1RSZ2WcTaDEMByGn6Wg,312
2
2
  tuieval/__main__.py,sha256=E6Gls0DNz8GQK2K-kOUIx8cYhgANW_CH54VKrfCfs14,52
3
- tuieval/_version.py,sha256=EOZVyFNK9VEmUe6471HI7YHfwqJ5uDi2cXJHVylN6eI,533
3
+ tuieval/_version.py,sha256=7rQfE9HWjmke7Ju8Nk_aqQp4chEDuGAHhvH3RPUbSyc,533
4
4
  tuieval/cli.py,sha256=ZaLoWrxyCABu4SJzx5U2gVUUmwcwRgpZVqdqnxyFMOk,4167
5
5
  tuieval/client.py,sha256=Vui7ucVv_GiKObGoVS_EWSZFUKPou9PWmutqMTrahXk,9313
6
6
  tuieval/compare.py,sha256=b-rVcMwq0Tos3oNKcpUP1HXULKhAQNAS4rlXYSY7t6k,25460
7
- tuieval/engine.py,sha256=Amft1EL0iQVsiutfN7vQpwRXMCq_TYryDj0pMtY2suM,94195
7
+ tuieval/engine.py,sha256=SizirCzV1klc_a2nS14FIjS5jLiHCGbVT23eES4StEc,94817
8
8
  tuieval/export.py,sha256=dbHQgL_ubWtIPM1sLzAew_gETnrDJyd0zgqVA5vkpXM,9657
9
9
  tuieval/machines.py,sha256=CeestY-_6h8ZKhJbBA_xyf0prqBvjvdgs2XJtCJYnNg,12974
10
10
  tuieval/packs.py,sha256=Go-kTSPvYZriXMo4DvmqNNL-iD0J92MKLiNCnP2chJ8,10305
@@ -14,7 +14,7 @@ tuieval/run_evals.py,sha256=uPzidbRPUduBwP8sKyzg-U8cka0p-RsbZlVis6qQTlk,37526
14
14
  tuieval/scaffold.py,sha256=-AE5vKXeTtMZJ8OMk4UiIstoUWozTKjThKxZ87j0f9E,4720
15
15
  tuieval/selftest.py,sha256=xKfR73wMTYcDRSCBYQTNyKeR9bYU5HIYUSg7oZvNCyI,9330
16
16
  tuieval/tui.py,sha256=8diKtYE31ZUKq62rfMGdMkEbHgK6arRYpjFu-wcMVZs,131997
17
- tuieval/tune.py,sha256=zOs1cfKS3NhaFenjCY6fDb7oa8cx5lsoxgGaIEas_ys,32625
17
+ tuieval/tune.py,sha256=Kf5angorAFNPLqeIuNdcFphMCL53BffYqjPi_XPW77Q,32879
18
18
  tuieval/verdict.py,sha256=oLKpRIruk7W8eF1YdmITFx9BgBK3kPKYViKL20Nzyu0,16306
19
19
  tuieval/watch_proxy.py,sha256=z916NRhEur04a9RnLm6ZpIEY1SnnUGPiHYbmlD9ktQ0,11035
20
20
  tuieval/workspace.py,sha256=V_HhkaN1odr0OpjNsPYradRWLpzDldM7SwpvxohBL4U,895
@@ -42,8 +42,8 @@ tuieval/templates/packs/tool_call/pack.toml,sha256=n4bx0lGJHSmW41uVqhfIXJ2BWZpmT
42
42
  tuieval/templates/packs/tool_call/system.txt,sha256=mKxu-lB-0YjLHXdgeFJa8x2C180OvcNz5cHv2N5Bg3U,254
43
43
  tuieval/templates/packs/tool_call/tests.yaml,sha256=Nv7c4syrzJ9cU8EBKSK_1ZSFx9V02aCjW4-2TBCPT7s,1859
44
44
  tuieval/templates/packs/tool_call/tools.yaml,sha256=HgxCkh0On2VwbHSsjAGM8tNCK7ZtKLGrs7lMCn3Fprs,1048
45
- tuieval-0.2.0.dev2.dist-info/METADATA,sha256=ukHZagdns1Pj_mnQQsl9dxLIl40A-E8BtYIPx57I-cw,12079
46
- tuieval-0.2.0.dev2.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
47
- tuieval-0.2.0.dev2.dist-info/entry_points.txt,sha256=7eIhi1GpFxBP2OLJV02Nn8LwsNuO512eKOGt1IBbj04,45
48
- tuieval-0.2.0.dev2.dist-info/licenses/LICENSE,sha256=7wfRgGtBGH1aXhZkIn47oUznqKC18kEPMvUVgol7Ffc,1077
49
- tuieval-0.2.0.dev2.dist-info/RECORD,,
45
+ tuieval-0.2.0.dev4.dist-info/METADATA,sha256=c653KXH4TRW-6b59HkXhbb0HW9jKyabSHWoD30aLI3w,12079
46
+ tuieval-0.2.0.dev4.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
47
+ tuieval-0.2.0.dev4.dist-info/entry_points.txt,sha256=7eIhi1GpFxBP2OLJV02Nn8LwsNuO512eKOGt1IBbj04,45
48
+ tuieval-0.2.0.dev4.dist-info/licenses/LICENSE,sha256=7wfRgGtBGH1aXhZkIn47oUznqKC18kEPMvUVgol7Ffc,1077
49
+ tuieval-0.2.0.dev4.dist-info/RECORD,,