Skip to content

Instantly share code, notes, and snippets.

View sholtomaud's full-sized avatar
💭
Research

Sholto Maud sholtomaud

💭
Research
  • Sydney
View GitHub Profile
#!/usr/bin/env python
import boto3
import argparse
from operator import itemgetter
from collections import defaultdict
def nested_defaultdict():
return defaultdict(nested_defaultdict)
@sholtomaud
sholtomaud / llm-browser.py
Created July 10, 2024 01:11 — forked from jart/llm-browser.py
Using an LLM as an HTTP proxy with LLaMAfile
#!/usr/bin/env python
import socket
import threading
import subprocess
def handle_client(client_socket):
request = client_socket.recv(8192).decode('utf-8', errors='ignore')
first_line = request.split('\n')[0]
@sholtomaud
sholtomaud / Consciousness.txt
Created December 21, 2024 11:10 — forked from ruvnet/Consciousness.txt
The system maps world observations into internal models and reasons iteratively, seeking coherence f(I) between its structure and goals. It evaluates the universe U(t) to refine its role within it, creating a recursive cycle of self-improvement. This enables it to implement awareness and act purposefully.
# Step 1: Represent Universe State
Initialize Ψ(t) in Hilbert space H
# Step 2: Define Field Configurations
Define configuration space M with measure μ
For each (g, φ) in M:
Represent fields as algebraic structures (groups, rings, etc.)
# Step 3: Complexity Operator
Define operator T acting on Ψ(t) to extract complexity
@sholtomaud
sholtomaud / Mor.md
Created December 21, 2024 11:10 — forked from ruvnet/Mor.md
Mixture of Reflection (MoR) Model

Mixture of Reflection (MoR) Model: Detailed Implementation ## Forward: The Next Generation of AI Models

Reflection-based AI models are poised to redefine how AI is utilized, shifting from generating rapid, surface-level responses to producing thoughtful, in-depth analyses. These models emphasize self-evaluation and iterative improvement, leveraging internal feedback loops to refine outputs and enhance performance over multiple cycles.

This year has seen a marked shift toward reflection models, which differ from earlier Mixture of Experts (MoE) architectures. While MoE models efficiently handle specific tasks using specialized subnetworks, reflection-based models integrate iterative reasoning, enabling them to "think" before delivering results. This approach allows for evaluating and correcting reasoning pathways, ultimately improving performance through self-critique.

The proposed Mixture of Reflection (MoR) architecture builds on this foundation by combining the strengths of MoE with reflection-based re

@sholtomaud
sholtomaud / README.md
Created April 7, 2025 11:55 — forked from dreamorosi/README.md
A super-basic MCP Server hosted on AWS Lambda

To deploy, create a Lambda function and enable function URL (no auth - yolo), then use the handler above in your function. That same implementation will also work with API Gateway HTTP (aka v2), if you want to use ALB or API Gateway REST (aka v1) you should swap the schema used for parsing.

Then you can test using a POST request with this body:

{
  "jsonrpc": "2.0",
  "method": "tools/list",
  "id": 2
}