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
+11
-5
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
|
||||
|
||||
+7
-3
@@ -416,14 +416,18 @@ 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
|
||||
print("lens not found at", JLENS_PATH, "- readback disabled",
|
||||
flush=True)
|
||||
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
|
||||
print("chamber ready; 1x scale", round(scale, 3), "; vector norms",
|
||||
{k: round(float(v.norm()), 2) for k, v in _state["vecs"].items()},
|
||||
|
||||
Reference in new issue
Block a user