Align Hermes context window with local 64K model profiles
This commit is contained in:
1 parent
8544abd2d4
commit
0929cdb555
7 files changed
+91
-2
No files matched your search
@@ -58,6 +58,22 @@ class PreparationTests(unittest.TestCase):
|
||||
self.assertEqual(updated["custom_providers"][1]["extra_body"]["max_tokens"], 2048)
|
||||
self.assertEqual(updated["auxiliary"]["compression"]["base_url"], "http://127.0.0.1:8081/v1")
|
||||
|
||||
def test_context_matches_both_main_profiles_and_replaces_stale_window(self):
|
||||
for previous in (None, 256000):
|
||||
with self.subTest(previous=previous):
|
||||
config = {"model": {"context_length": previous},
|
||||
"compression": {"threshold_tokens": 24000}}
|
||||
prepare.configure_hermes(config)
|
||||
window = config["model"]["context_length"]
|
||||
self.assertEqual(window, 65536)
|
||||
for name in ("routine", "large"):
|
||||
text = prepare.profile_config(name, [self.root / "weights.gguf"])
|
||||
self.assertIn(f"--ctx-size {window}", text)
|
||||
self.assertEqual(config["compression"]["threshold_tokens"], 24000)
|
||||
before = json.dumps(config, sort_keys=True)
|
||||
prepare.configure_hermes(config)
|
||||
self.assertEqual(json.dumps(config, sort_keys=True), before)
|
||||
|
||||
def test_existing_profiles_preserved_and_explicit_selection_backed_up(self):
|
||||
path = self.root / "llama.env"
|
||||
path.write_text("custom tuning\n")
|
||||
|
||||
Reference in new issue
Block a user