Reduce Ollama load: 10min cycle, fast-gate skip for confident qwen, 60s scalp, 75s stagger per bot

This commit is contained in:
drjones
2026-08-03 23:24:57 -07:00
parent d631fe529b
commit bed9ac0207
16 changed files with 19855 additions and 255 deletions

View File

@@ -6,7 +6,7 @@
"stake_cents": 10,
"max_contracts": 1,
"daily_loss_cap_cents": 500,
"min_conf": 0.5,
"min_conf": 0.55,
"ollama_url": "http://10.30.20.186:11434",
"ollama_model": "ornith:latest",
"swing_threshold_pct": 0.005,
@@ -18,8 +18,8 @@
"db_path": "bnb.db",
"post_price_cents": 50,
"max_spend_cents": 100,
"decision_interval_sec": 300,
"start_delay_sec": 25,
"decision_interval_sec": 600,
"start_delay_sec": 375,
"fast_llm_url": "http://localhost:11434",
"fast_llm_model": "qwen3.5:4b",
"deep_llm_url": "http://10.30.20.186:11434",
@@ -31,5 +31,8 @@
"embed_url": "http://10.30.20.186:11434",
"embed_model": "nomic-embed-text-v2-moe:latest",
"kraken_pair": "BNBUSD",
"binance_symbol": "BNBUSDT"
"binance_symbol": "BNBUSDT",
"keep_alive": "15m",
"fast_gate_conf": 0.65,
"scalp_interval_sec": 60
}

19558
bot.log

File diff suppressed because it is too large Load Diff

10
bot.py
View File

@@ -348,7 +348,13 @@ def llm_vote(cfg, price, mom, mom_score, conn):
v1 = fast_v if fast_v in ("UP","DOWN","SKIP") else "SKIP"
c1 = fast_c if fast_v in ("UP","DOWN","SKIP") else 0.50
# Model 2: ornith deep verify (GamingPC RTX 3070)
# Fast-gate skip: if qwen is confident enough, skip ornith entirely
fast_gate_conf = cfg.get("fast_gate_conf", 0.65)
if v1 in ("UP","DOWN") and c1 >= fast_gate_conf:
LOG.info(f"[fast-gate {v1} {c1:.2f}] skipping ornith — qwen confident")
return v1, c1, f"[fast-gate {v1} {c1:.2f}] {fast_w[:80]}"
# Model 2: ornith deep verify (GamingPC RTX 3070) — only on borderline/uncertain
try:
r2 = requests.post("http://10.30.20.186:11434/api/generate",
json={"model": "ornith:latest", "prompt": prompt, "stream": False, "think": False, "keep_alive": "10m",
@@ -806,7 +812,7 @@ def run():
LOG.info(f"skip {ticker}: {why}")
except Exception as e:
log_event(conn, "error", f"loop error: {e}")
time.sleep(15) # scalp loop: watch constantly
time.sleep(cfg.get("scalp_interval_sec", 60)) # configurable scalp loop
if __name__ == "__main__":
run()

BIN
btc.db

Binary file not shown.

View File

@@ -6,7 +6,7 @@
"stake_cents": 10,
"max_contracts": 1,
"daily_loss_cap_cents": 500,
"min_conf": 0.5,
"min_conf": 0.55,
"ollama_url": "http://10.30.20.186:11434",
"ollama_model": "ornith:latest",
"swing_threshold_pct": 0.005,
@@ -18,8 +18,8 @@
"db_path": "btc.db",
"post_price_cents": 50,
"max_spend_cents": 100,
"decision_interval_sec": 300,
"start_delay_sec": 80,
"decision_interval_sec": 600,
"start_delay_sec": 300,
"fast_llm_url": "http://localhost:11434",
"fast_llm_model": "qwen3.5:4b",
"deep_llm_url": "http://10.30.20.186:11434",
@@ -29,5 +29,8 @@
"diverify_url": "http://10.30.20.89:11434",
"diverify_model": "llama3.2:latest",
"embed_url": "http://10.30.20.186:11434",
"embed_model": "nomic-embed-text-v2-moe:latest"
"embed_model": "nomic-embed-text-v2-moe:latest",
"keep_alive": "15m",
"fast_gate_conf": 0.65,
"scalp_interval_sec": 60
}

View File

@@ -166,7 +166,13 @@ async function ctl(){await fetch('/api/control',{method:'POST',headers:{'Content
async function toggleDry(){await fetch('/api/toggle-dry',{method:'POST'});refresh();}
async function kill(){if(confirm('HALT THE BOT? (relaunch manually to revive)')){await fetch('/api/kill',{method:'POST'});refresh();}}
refresh();setInterval(refresh,5000);
</script></body></html>"""
</script>
<div style="text-align:center;padding:16px 0 24px 0;margin-bottom:44px">
<a href="https://buymeacoffee.com/r26xrthzttg" target="_blank" style="display:inline-block;background:#031007;border:1px solid #00ff41;color:#00ff41;padding:8px 18px;border-radius:4px;text-decoration:none;font-family:'SF Mono',Menlo,monospace;font-size:.72rem;letter-spacing:1px;box-shadow:0 0 12px #00ff4133;transition:all .2s" onmouseover="this.style.background='#00ff4122';this.style.boxShadow='0 0 18px #00ff4166'" onmouseout="this.style.background='#031007';this.style.boxShadow='0 0 12px #00ff4133'">
☕ Buy me a coffee
</a>
</div>
</body></html>"""
FLEET_HTML = r"""<!DOCTYPE html><html><head><meta charset="utf-8"><title>K4LSH1 FLEET</title>
<style>
@@ -310,7 +316,13 @@ async function load(){
document.getElementById('statusbar').innerHTML=`<div class="cell"><span class="lab">BAL</span><b>$${(bs.balance/100).toFixed(2)}</b></div><div class="cell"><span class="lab">PNL</span>${fmt(tp)}</div><div class="cell"><span class="lab">OPEN</span>${to}</div><div class="cell"><span class="lab">REC</span>${tw}W/${tb-tw}L</div>`;
}
load();setInterval(load,15000);
</script></body></html>"""
</script>
<div style="text-align:center;padding:16px 0 24px 0;margin-bottom:44px">
<a href="https://buymeacoffee.com/r26xrthzttg" target="_blank" style="display:inline-block;background:#031007;border:1px solid #00ff41;color:#00ff41;padding:8px 18px;border-radius:4px;text-decoration:none;font-family:'SF Mono',Menlo,monospace;font-size:.72rem;letter-spacing:1px;box-shadow:0 0 12px #00ff4133;transition:all .2s" onmouseover="this.style.background='#00ff4122';this.style.boxShadow='0 0 18px #00ff4166'" onmouseout="this.style.background='#031007';this.style.boxShadow='0 0 12px #00ff4133'">
☕ Buy me a coffee
</a>
</div>
</body></html>"""
def cfg():

BIN
doge.db

Binary file not shown.

View File

@@ -6,7 +6,7 @@
"stake_cents": 10,
"max_contracts": 1,
"daily_loss_cap_cents": 500,
"min_conf": 0.5,
"min_conf": 0.55,
"ollama_url": "http://10.30.20.186:11434",
"ollama_model": "ornith:latest",
"swing_threshold_pct": 0.005,
@@ -19,7 +19,7 @@
"post_price_cents": 50,
"proxy": "http://10.30.20.154:3128",
"max_spend_cents": 100,
"decision_interval_sec": 300,
"decision_interval_sec": 600,
"start_delay_sec": 0,
"fast_llm_url": "http://localhost:11434",
"fast_llm_model": "qwen3.5:4b",
@@ -28,5 +28,8 @@
"diverify_url": "http://10.30.20.89:11434",
"diverify_model": "llama3.2:latest",
"embed_url": "http://10.30.20.186:11434",
"embed_model": "nomic-embed-text-v2-moe:latest"
"embed_model": "nomic-embed-text-v2-moe:latest",
"keep_alive": "15m",
"fast_gate_conf": 0.65,
"scalp_interval_sec": 60
}

BIN
eth.db

Binary file not shown.

View File

@@ -6,7 +6,7 @@
"stake_cents": 10,
"max_contracts": 1,
"daily_loss_cap_cents": 500,
"min_conf": 0.5,
"min_conf": 0.55,
"ollama_url": "http://10.30.20.186:11434",
"ollama_model": "ornith:latest",
"swing_threshold_pct": 0.005,
@@ -19,8 +19,8 @@
"post_price_cents": 50,
"proxy": "http://10.30.20.189:3128",
"max_spend_cents": 100,
"decision_interval_sec": 300,
"start_delay_sec": 40,
"decision_interval_sec": 600,
"start_delay_sec": 150,
"fast_llm_url": "http://localhost:11434",
"fast_llm_model": "qwen3.5:4b",
"deep_llm_url": "http://10.30.20.186:11434",
@@ -28,5 +28,8 @@
"diverify_url": "http://10.30.20.89:11434",
"diverify_model": "llama3.2:latest",
"embed_url": "http://10.30.20.186:11434",
"embed_model": "nomic-embed-text-v2-moe:latest"
"embed_model": "nomic-embed-text-v2-moe:latest",
"keep_alive": "15m",
"fast_gate_conf": 0.65,
"scalp_interval_sec": 60
}

View File

@@ -6,7 +6,7 @@
"stake_cents": 10,
"max_contracts": 1,
"daily_loss_cap_cents": 500,
"min_conf": 0.5,
"min_conf": 0.55,
"ollama_url": "http://10.30.20.186:11434",
"ollama_model": "ornith:latest",
"swing_threshold_pct": 0.005,
@@ -18,8 +18,8 @@
"db_path": "near.db",
"post_price_cents": 50,
"max_spend_cents": 100,
"decision_interval_sec": 300,
"start_delay_sec": 30,
"decision_interval_sec": 600,
"start_delay_sec": 450,
"fast_llm_url": "http://localhost:11434",
"fast_llm_model": "qwen3.5:4b",
"deep_llm_url": "http://10.30.20.186:11434",
@@ -31,5 +31,8 @@
"embed_url": "http://10.30.20.186:11434",
"embed_model": "nomic-embed-text-v2-moe:latest",
"kraken_pair": "NEARUSD",
"binance_symbol": "NEARUSDT"
"binance_symbol": "NEARUSDT",
"keep_alive": "15m",
"fast_gate_conf": 0.65,
"scalp_interval_sec": 60
}

BIN
sol.db

Binary file not shown.

View File

@@ -6,7 +6,7 @@
"stake_cents": 10,
"max_contracts": 1,
"daily_loss_cap_cents": 500,
"min_conf": 0.5,
"min_conf": 0.55,
"ollama_url": "http://10.30.20.186:11434",
"ollama_model": "ornith:latest",
"swing_threshold_pct": 0.005,
@@ -19,8 +19,8 @@
"post_price_cents": 50,
"proxy": "http://10.30.20.71:3128",
"max_spend_cents": 100,
"decision_interval_sec": 300,
"start_delay_sec": 20,
"decision_interval_sec": 600,
"start_delay_sec": 75,
"fast_llm_url": "http://localhost:11434",
"fast_llm_model": "qwen3.5:4b",
"deep_llm_url": "http://10.30.20.186:11434",
@@ -28,5 +28,8 @@
"diverify_url": "http://10.30.20.89:11434",
"diverify_model": "llama3.2:latest",
"embed_url": "http://10.30.20.186:11434",
"embed_model": "nomic-embed-text-v2-moe:latest"
"embed_model": "nomic-embed-text-v2-moe:latest",
"keep_alive": "15m",
"fast_gate_conf": 0.65,
"scalp_interval_sec": 60
}

BIN
xrp.db

Binary file not shown.

View File

@@ -6,7 +6,7 @@
"stake_cents": 10,
"max_contracts": 1,
"daily_loss_cap_cents": 500,
"min_conf": 0.5,
"min_conf": 0.55,
"ollama_url": "http://10.30.20.186:11434",
"ollama_model": "ornith:latest",
"swing_threshold_pct": 0.005,
@@ -19,8 +19,8 @@
"post_price_cents": 50,
"proxy": "http://10.30.20.154:3128",
"max_spend_cents": 100,
"decision_interval_sec": 300,
"start_delay_sec": 60,
"decision_interval_sec": 600,
"start_delay_sec": 225,
"fast_llm_url": "http://localhost:11434",
"fast_llm_model": "qwen3.5:4b",
"deep_llm_url": "http://10.30.20.186:11434",
@@ -29,5 +29,8 @@
"diverify_url": "http://10.30.20.89:11434",
"diverify_model": "llama3.2:latest",
"embed_url": "http://10.30.20.186:11434",
"embed_model": "nomic-embed-text-v2-moe:latest"
"embed_model": "nomic-embed-text-v2-moe:latest",
"keep_alive": "15m",
"fast_gate_conf": 0.65,
"scalp_interval_sec": 60
}

View File

@@ -6,7 +6,7 @@
"stake_cents": 10,
"max_contracts": 1,
"daily_loss_cap_cents": 500,
"min_conf": 0.5,
"min_conf": 0.55,
"ollama_url": "http://10.30.20.186:11434",
"ollama_model": "ornith:latest",
"swing_threshold_pct": 0.005,
@@ -18,8 +18,8 @@
"db_path": "zec.db",
"post_price_cents": 50,
"max_spend_cents": 100,
"decision_interval_sec": 300,
"start_delay_sec": 35,
"decision_interval_sec": 600,
"start_delay_sec": 525,
"fast_llm_url": "http://localhost:11434",
"fast_llm_model": "qwen3.5:4b",
"deep_llm_url": "http://10.30.20.186:11434",
@@ -31,5 +31,8 @@
"embed_url": "http://10.30.20.186:11434",
"embed_model": "nomic-embed-text-v2-moe:latest",
"kraken_pair": "ZECUSD",
"binance_symbol": "ZECUSDT"
"binance_symbol": "ZECUSDT",
"keep_alive": "15m",
"fast_gate_conf": 0.65,
"scalp_interval_sec": 60
}