okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

1872183316bench: community report, RTX 4060 Ti + Xeon E5-2673 v3 (DDR3, PCIe 3.0 x8), Q2_0 and IQ3_S, 0.1.39 path vs #706 + #764 + a busier tier (#913)ffa7a90b7

main
1.9 KiB50 linesraw
1"""The four decode-speed evaluation prompts (essay, code edit, translation, explanation)."""
2
3CODE = '''import os, json
4
5def load(path):
6    with open(path) as f:
7        return json.load(f)
8
9def save(path, data):
10    tmp = path + ".tmp"
11    with open(tmp, "w") as f:
12        json.dump(data, f, indent=2)
13    os.replace(tmp, path)
14
15def merge(a, b):
16    out = dict(a)
17    for k, v in b.items():
18        if k in out and isinstance(out[k], dict) and isinstance(v, dict):
19            out[k] = merge(out[k], v)
20        else:
21            out[k] = v
22    return out
23
24def find_files(root, ext):
25    result = []
26    for d, _, files in os.walk(root):
27        for name in files:
28            if name.endswith(ext):
29                result.append(os.path.join(d, name))
30    return sorted(result)
31
32def main(root):
33    cfg = {}
34    for p in find_files(root, ".json"):
35        cfg = merge(cfg, load(p))
36    save(os.path.join(root, "merged.json"), cfg)
37    return len(cfg)
38'''
39EN = ("Mixture-of-experts models activate only a small subset of their parameters for each token, "
40      "which makes them attractive for consumer hardware: the total parameter count can exceed the "
41      "available GPU memory, while the per-token compute stays modest. The main difficulty is memory "
42      "bandwidth. When expert weights live in system RAM, every generated token must stream the selected "
43      "experts through the CPU memory bus or across PCIe, and this transfer, rather than arithmetic, "
44      "usually determines decoding speed.")
45PROMPTS = [
46    ("essay", "用中文写一篇大约600字的散文,主题是秋天的城市。"),
47    ("code_edit", "给下面代码的每个函数加上类型注解和一行中文 docstring,其他内容保持不变,输出完整代码:\n\n" + CODE),
48    ("translate", "把下面这段英文翻译成中文:\n\n" + EN),
49    ("explain", "详细解释 TCP 三次握手和四次挥手的过程,以及为什么需要这样设计。"),
50]