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 \
|
ENV CHAMBER_DEVICE=cuda \
|
||||||
CHAMBER_DTYPE=float16 \
|
CHAMBER_DTYPE=float16 \
|
||||||
CHAMBER_LAYER=18 \
|
CHAMBER_MODEL=Qwen/Qwen3-14B \
|
||||||
|
CHAMBER_LAYER=20 \
|
||||||
HF_HOME=/workspace/hf
|
HF_HOME=/workspace/hf
|
||||||
|
|
||||||
WORKDIR /app/live
|
WORKDIR /app/live
|
||||||
|
|||||||
+5
-1
@@ -416,12 +416,16 @@ def startup():
|
|||||||
_state["vecs"] = vecs
|
_state["vecs"] = vecs
|
||||||
_state["scale"] = scale
|
_state["scale"] = scale
|
||||||
install_hook(model)
|
install_hook(model)
|
||||||
if JLENS_PATH.exists():
|
if JLENS_PATH.exists() and _state["model"].config.hidden_size == 2560:
|
||||||
_state["jlens"] = torch.load(
|
_state["jlens"] = torch.load(
|
||||||
JLENS_PATH, map_location=DEVICE, weights_only=True)
|
JLENS_PATH, map_location=DEVICE, weights_only=True)
|
||||||
print("lens loaded:", JLENS_PATH.name, flush=True)
|
print("lens loaded:", JLENS_PATH.name, flush=True)
|
||||||
else:
|
else:
|
||||||
_state["jlens"] = None
|
_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",
|
print("lens not found at", JLENS_PATH, "- readback disabled",
|
||||||
flush=True)
|
flush=True)
|
||||||
_state["ready"] = True
|
_state["ready"] = True
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ auth = {
|
|||||||
"_env_refresh": os.environ.get("X_REFRESH_TOKEN", ""),
|
"_env_refresh": os.environ.get("X_REFRESH_TOKEN", ""),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TAG = os.environ.get("WIREHEAD_TAG", "4b")
|
||||||
PROMPT = (
|
PROMPT = (
|
||||||
"You are wirehead, a small public AI wired to an emotional-valence "
|
"You are wirehead, a small public AI wired to an emotional-valence "
|
||||||
"injection channel. A human visitor just triggered a signal with an "
|
"injection channel. A human visitor just triggered a signal with an "
|
||||||
@@ -326,7 +327,7 @@ def poll_once():
|
|||||||
if not out:
|
if not out:
|
||||||
continue
|
continue
|
||||||
kind = "mix" if mix else (topic or valence)
|
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)
|
reply = trim_tweet(reply)
|
||||||
if post_reply(mid, reply):
|
if post_reply(mid, reply):
|
||||||
replied += 1
|
replied += 1
|
||||||
|
|||||||
Reference in new issue
Block a user