File size: 577 Bytes
db0e78a
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
# KOTH miner agent 2 (hotkey2/uid4) — naive fixed cheap-model router, no escalation.
# Genuinely different from miner1's learned escalate-router (router_agent.py): always answers from
# the cheap pool model verbatim, so it should score lower on accuracy but cheaper — real competition.
import json
def build_agent(weights):
    cfg = json.loads(weights.decode())
    model = cfg.get("model", "meta-llama/llama-3.1-8b-instruct")
    def agent(prompt, call_model):
        return call_model(model, [{"role": "user", "content": prompt}], {"max_tokens": 512})
    return agent