1200+ distilled gold examples, journal system, redstone mastery, safety awareness
Distilled Training Data (1,203 examples): - 341 initial gold (plugins, enchantments, builds, effects, god, errors) - 165 buildings + pipeline (100 structures built on dev, 65 request→query→act) - 24 safety-aware (worldborder, safe tp, intentional harm, gamemode checks) - 17 advanced logic (decanonized items, redstone gates, iterative builds) - 12 redstone mastery (NOT/OR/AND/XOR/RS-latch/T-flip-flop/comparator/clock) - 7 circuit verification and diagnosis - 1 compact comparator gates - 10 redstone methodology (build→test→save→recall→learn from mistakes) - 8 player journal usage - 29 creative+uncommon+pipeline+god with full tool chains Player Journal System: - agent/tools/player_journal.py — per-player text files (1-10 lines) - journal.read + journal.write tool schemas added - Cross-contaminated: God and Sudo share same journal per player - Includes sentiment, relationship, builds, preferences, skill level Redstone Engineering: - agent/prompts/redstone_rules.md — baked-in wall torch, dedicated lead, repeater rules - Learned from 4 iterations of 8-switch circuit: wall_torch on back face, not top - T-junction bypass prevention: dedicated lead wire between merge and NOT block - RCON limitation: can build circuits but cannot test them (lever toggle doesn't propagate) Training Data Cleaning: - 466 @s→@p fixes, 10 template commands removed - 12 outdated refusals replaced with correct plugin commands - Data de-duped across all sources Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Executable
+48
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
# Toggle GPU mode on steel141 between pooled (F16) and split (Q8+Q6)
|
||||
#
|
||||
# Usage:
|
||||
# ./gpu_mode.sh pooled # Both GPUs -> one Ollama, F16 model
|
||||
# ./gpu_mode.sh split # Separate Ollama per GPU, Q8 on 3090, Q6 on 2080
|
||||
# ./gpu_mode.sh status # Show current state
|
||||
|
||||
HOST="steel141"
|
||||
|
||||
case "${1:-status}" in
|
||||
pooled)
|
||||
echo "Switching to POOLED mode (both GPUs, F16)..."
|
||||
ssh $HOST "sudo systemctl stop ollama-gpu0.service 2>/dev/null; \
|
||||
sudo systemctl stop ollama.service; \
|
||||
sudo systemctl start ollama.service"
|
||||
sleep 3
|
||||
echo "Loading mortdecai:0.5.0-f16..."
|
||||
ssh $HOST "curl -s http://localhost:11434/api/chat -d '{\"model\":\"mortdecai:0.5.0-f16\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"stream\":false,\"options\":{\"num_predict\":1}}' > /dev/null 2>&1"
|
||||
echo "Done. F16 on port 11434 (both GPUs)."
|
||||
;;
|
||||
split)
|
||||
echo "Switching to SPLIT mode (separate GPUs)..."
|
||||
ssh $HOST "sudo systemctl stop ollama.service; \
|
||||
sudo systemctl start ollama.service; \
|
||||
sudo systemctl start ollama-gpu0.service"
|
||||
sleep 3
|
||||
echo "Loading models..."
|
||||
ssh $HOST "curl -s http://localhost:11434/api/chat -d '{\"model\":\"mortdecai:0.5.0-q8\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"stream\":false,\"options\":{\"num_predict\":1}}' > /dev/null 2>&1"
|
||||
ssh $HOST "curl -s http://localhost:11435/api/chat -d '{\"model\":\"mortdecai:0.5.0-q6\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"stream\":false,\"options\":{\"num_predict\":1}}' > /dev/null 2>&1"
|
||||
echo "Done. Q8 on :11434 (3090), Q6 on :11435 (2080)."
|
||||
;;
|
||||
status)
|
||||
echo "=== Ollama Services ==="
|
||||
ssh $HOST "systemctl is-active ollama.service && echo ' ollama.service (port 11434): ACTIVE' || echo ' ollama.service: INACTIVE'"
|
||||
ssh $HOST "systemctl is-active ollama-gpu0.service 2>/dev/null && echo ' ollama-gpu0 (port 11435): ACTIVE' || echo ' ollama-gpu0 (port 11435): INACTIVE'"
|
||||
echo ""
|
||||
echo "=== GPU Usage ==="
|
||||
ssh $HOST "nvidia-smi --query-compute-apps=pid,gpu_name,used_memory --format=csv,noheader 2>/dev/null || echo 'No GPU processes'"
|
||||
echo ""
|
||||
echo "=== Loaded Models (port 11434) ==="
|
||||
ssh $HOST "curl -s http://localhost:11434/api/ps 2>/dev/null | python3 -c \"import sys,json; r=json.loads(sys.stdin.read()); [print(f' {m[\\\"name\\\"]:30s} {m[\\\"size\\\"]/1e9:.1f}GB') for m in r.get('models',[])]\" 2>/dev/null || echo ' none'"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {pooled|split|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,88 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Push files from the working repo to both public Gitea repos.
|
||||
|
||||
Updates Seth/Mortdecai on git.sethpc.xyz and Mortdecai/Mortdecai on git.mortdec.ai
|
||||
via API (different commit histories, can't git push directly).
|
||||
|
||||
Usage:
|
||||
python3 scripts/push_to_public_repos.py README.md branding/training_progress.svg MODEL_CARD.md
|
||||
python3 scripts/push_to_public_repos.py --all # pushes README.md, MODEL_CARD.md, branding/*.svg
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import base64
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import requests
|
||||
|
||||
PROJECT_ROOT = Path(__file__).resolve().parent.parent
|
||||
|
||||
REPOS = [
|
||||
{
|
||||
"name": "git.sethpc.xyz/Seth/Mortdecai",
|
||||
"base": "https://git.sethpc.xyz/api/v1/repos/Seth/Mortdecai/contents",
|
||||
"token": "REDACTED_GITEA_TOKEN",
|
||||
},
|
||||
{
|
||||
"name": "git.mortdec.ai/Mortdecai/Mortdecai",
|
||||
"base": "http://192.168.0.113:3000/api/v1/repos/Mortdecai/Mortdecai/contents",
|
||||
"token": "REDACTED_GITEA_TOKEN_2",
|
||||
},
|
||||
]
|
||||
|
||||
DEFAULT_FILES = [
|
||||
"README.md",
|
||||
"MODEL_CARD.md",
|
||||
"branding/training_progress.svg",
|
||||
]
|
||||
|
||||
|
||||
def push_file(repo, remote_path, local_path, message):
|
||||
headers = {"Authorization": f"token {repo['token']}", "Content-Type": "application/json"}
|
||||
|
||||
with open(local_path, "rb") as f:
|
||||
content_b64 = base64.b64encode(f.read()).decode()
|
||||
|
||||
r = requests.get(f"{repo['base']}/{remote_path}", headers=headers)
|
||||
if r.ok:
|
||||
sha = r.json().get("sha", "")
|
||||
r2 = requests.put(f"{repo['base']}/{remote_path}", headers=headers, json={
|
||||
"message": message, "content": content_b64, "sha": sha,
|
||||
})
|
||||
return "updated" if r2.ok else f"failed: {r2.text[:100]}"
|
||||
else:
|
||||
r2 = requests.post(f"{repo['base']}/{remote_path}", headers=headers, json={
|
||||
"message": message, "content": content_b64,
|
||||
})
|
||||
return "created" if r2.ok else f"failed: {r2.text[:100]}"
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Push files to public Gitea repos")
|
||||
parser.add_argument("files", nargs="*", help="Files to push (relative to project root)")
|
||||
parser.add_argument("--all", action="store_true", help="Push default files")
|
||||
parser.add_argument("--message", "-m", default="Update public repos", help="Commit message")
|
||||
args = parser.parse_args()
|
||||
|
||||
files = args.files if args.files else (DEFAULT_FILES if args.all else [])
|
||||
if not files:
|
||||
print("No files specified. Use --all or list files.")
|
||||
sys.exit(1)
|
||||
|
||||
for repo in REPOS:
|
||||
print(f"\n{repo['name']}:")
|
||||
for f in files:
|
||||
local = PROJECT_ROOT / f
|
||||
if not local.exists():
|
||||
print(f" {f}: SKIPPED (not found)")
|
||||
continue
|
||||
status = push_file(repo, f, str(local), args.message)
|
||||
print(f" {f}: {status}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user