worker: custom topic steering endpoint + Qwen3-14B (lens guarded by hidden size); wirehead: bodily routing + model tag env
This commit is contained in:
1 parent
50cf01ab74
commit
04f7eac1fd
3 files changed
+9
-3
No files matched your search
@@ -17,7 +17,8 @@ COPY jlens_l18_qwen3-4b.pt /app/live/jlens_l18_qwen3-4b.pt
|
||||
|
||||
ENV CHAMBER_DEVICE=cuda \
|
||||
CHAMBER_DTYPE=float16 \
|
||||
CHAMBER_LAYER=18 \
|
||||
CHAMBER_MODEL=Qwen/Qwen3-14B \
|
||||
CHAMBER_LAYER=20 \
|
||||
HF_HOME=/workspace/hf
|
||||
|
||||
WORKDIR /app/live
|
||||
|
||||
+5
-1
@@ -416,12 +416,16 @@ def startup():
|
||||
_state["vecs"] = vecs
|
||||
_state["scale"] = scale
|
||||
install_hook(model)
|
||||
if JLENS_PATH.exists():
|
||||
if JLENS_PATH.exists() and _state["model"].config.hidden_size == 2560:
|
||||
_state["jlens"] = torch.load(
|
||||
JLENS_PATH, map_location=DEVICE, weights_only=True)
|
||||
print("lens loaded:", JLENS_PATH.name, flush=True)
|
||||
else:
|
||||
_state["jlens"] = None
|
||||
if JLENS_PATH.exists():
|
||||
print("lens skipped: hidden size mismatch with this model",
|
||||
flush=True)
|
||||
else:
|
||||
print("lens not found at", JLENS_PATH, "- readback disabled",
|
||||
flush=True)
|
||||
_state["ready"] = True
|
||||
|
||||
@@ -40,6 +40,7 @@ auth = {
|
||||
"_env_refresh": os.environ.get("X_REFRESH_TOKEN", ""),
|
||||
}
|
||||
|
||||
TAG = os.environ.get("WIREHEAD_TAG", "4b")
|
||||
PROMPT = (
|
||||
"You are wirehead, a small public AI wired to an emotional-valence "
|
||||
"injection channel. A human visitor just triggered a signal with an "
|
||||
@@ -326,7 +327,7 @@ def poll_once():
|
||||
if not out:
|
||||
continue
|
||||
kind = "mix" if mix else (topic or valence)
|
||||
reply = f"[{kind}{dose}x-4b] {out.strip()}"
|
||||
reply = f"[{kind}{dose}x-{TAG}] {out.strip()}"
|
||||
reply = trim_tweet(reply)
|
||||
if post_reply(mid, reply):
|
||||
replied += 1
|
||||
|
||||
Reference in new issue
Block a user