tuieval 0.2.0.dev2__py3-none-any.whl → 0.2.0.dev3__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.dev3'
22
+ __version_tuple__ = version_tuple = (0, 2, 0, 'dev3')
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"
@@ -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.dev3
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=2ILWlstNdKCO-w6pi6qFsd7f8ZJMAD8pn_6jJ7S_lmY,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
@@ -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.dev3.dist-info/METADATA,sha256=xZqfkjw1ZXBPMF-goFno6NYjbKpP379DrEAcKfZC2fg,12079
46
+ tuieval-0.2.0.dev3.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
47
+ tuieval-0.2.0.dev3.dist-info/entry_points.txt,sha256=7eIhi1GpFxBP2OLJV02Nn8LwsNuO512eKOGt1IBbj04,45
48
+ tuieval-0.2.0.dev3.dist-info/licenses/LICENSE,sha256=7wfRgGtBGH1aXhZkIn47oUznqKC18kEPMvUVgol7Ffc,1077
49
+ tuieval-0.2.0.dev3.dist-info/RECORD,,