From b9a67ff976459d14688e066c8fcb1464423cd62c Mon Sep 17 00:00:00 2001 From: drjones Date: Tue, 4 Aug 2026 00:49:37 -0700 Subject: [PATCH] Speed bot refinements, MLX standardization --- bot.log | 1 + bot.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bot.log b/bot.log index 94e8eeb..80bf54f 100644 --- a/bot.log +++ b/bot.log @@ -23987,3 +23987,4 @@ sqlite3.OperationalError: no such column: id 2026-08-04 00:08:23,619 skip KXBNB15M-26AUG040315-15: BTC +1.6% 24h — no counter-trend shorts (conf 0.65<0.78) 2026-08-04 00:08:33,518 skip KXBTC15M-26AUG040315-15: BTC +1.6% 24h — no counter-trend shorts (conf 0.65<0.78) 2026-08-04 00:08:42,688 skip KXZEC15M-26AUG040315-15: passes: [split qwen=SKIP(0.50) ornith=SKIP(0.50)] Extreme fear + choppy regime, no clear edge +2026-08-04 00:48:16,761 127.0.0.1 - - [04/Aug/2026 00:48:16] "GET /health HTTP/1.1" 404 - diff --git a/bot.py b/bot.py index 44eab73..3fc8635 100644 --- a/bot.py +++ b/bot.py @@ -36,7 +36,7 @@ DEFAULT_CFG = { "swing_threshold_pct": 0.12, # fade triggers when |weighted 15m move| >= this "learning": True, "ollama_url": "http://localhost:11434", - "ollama_model": "qwen3.5:4b", + "ollama_model": "qwen3.5:4b-mlx", "series": "KXBTC15M", "kill": False, } @@ -330,7 +330,7 @@ def llm_vote(cfg, price, mom, mom_score, conn): prompt = enriched_context(cfg, price, mom, mom_score, conn) try: fast_url = cfg.get("fast_llm_url", cfg.get("ollama_url","http://localhost:11434")) - fast_model = cfg.get("fast_llm_model", "qwen3.5:4b") + fast_model = cfg.get("fast_llm_model", "qwen3.5:4b-mlx") r1 = requests.post(fast_url+"/api/generate", json={"model": fast_model, "prompt": prompt, "stream": False, "think": False, "keep_alive": "10m", "options": {"temperature": 0.3, "num_predict": 60}}, timeout=8, @@ -608,7 +608,7 @@ def adapt_controls(conn, cfg): try: fast_url = cfg.get("fast_llm_url", "http://localhost:11434") r = requests.post(fast_url+"/api/generate", - json={"model": cfg.get("fast_llm_model","qwen3.5:4b"), "prompt": prompt, + json={"model": cfg.get("fast_llm_model","qwen3.5:4b-mlx"), "prompt": prompt, "stream": False, "think": False, "options": {"temperature": 0.1, "num_predict": 80}}, timeout=10) txt = r.json().get("response","") @@ -628,7 +628,7 @@ def adapt_controls(conn, cfg): ) try: r3 = requests.post(fast_url+"/api/generate", - json={"model": cfg.get("fast_llm_model","qwen3.5:4b"), "prompt": lp, + json={"model": cfg.get("fast_llm_model","qwen3.5:4b-mlx"), "prompt": lp, "stream": False, "think": False, "options": {"temperature": 0.1, "num_predict": 60}}, timeout=10) txt3 = r3.json().get("response","")