Post

Traditional architecture requires client, server, database, deployment method. Server and database have to be talking constantly about persistent state. Almost certainly gonna get out of sync. Requires solving the hardest problem in CS, and then many other problems

Solve the problem? Make the database realtime OR make the server ACID-durable. Showing physics simulation running inside database. And now over time! Next talk: "Powering Amsterdam public transit", #sd25 Runs on Generic ICT Vehicle Achitecture (GIVA). Complicated, follows international standards

Public transit is nightmare mode: constrained hardware, regular powercycling, unreliable networking ("2g networks plus tunnels"), coupled driving (forces networked bridges, 2 clocks, 2 gpses, etc) Mostly solved in Java. Has to be integrated with stop buttons, traffic lights, routing info. impl 2020

Speaker 4: "Better Blocks", #sd25 Why we need new cloud building blocks s3 costs $23 to store 1TB/mo, $13k for 1k wrtites/s. On EC2, the writes cost $13, Hetzner 50 cents. Imagine you build a cache, it'd make s3 chepaer and faster, but you can't adapt it to Azure or Hetzner

Legacy tech infrastructure is married to silos. Something cloud agnostic would have to be built on cloud VMs, and should give us ability to make "simpler faster high-levle service". Proposed first service: write-ahead log and SSD storage First person not to go over time! Beat it by 10 seconds

Last lightning talk: "Tango: precise performance measurements through paired benchmarking", #sd25 Computers give sketchy performance agreements. Lots of different system modules can delay something happening. Messes with benchmarks Proposal: run 2 algorithms you want to compare simultaneously

Make two executables with the benchmarks and tango runner. Live demo follows, showing robustness of benchmark. Now all the speakers are stepping up for Q/A

------- "A Systems View to AI", Amod Malviya, #sd25 AI Systems are fundamentally different from traditional systems. To understand why, we have to define "systems": a set of interacting components in an circumscribed boundary with input and output. Natural systems come from emergent behavior

Human systems are designed. AI systems are designed, but they have emergent behavior. In trad systems, we use abstractions to get composability, modularity, stacking, all intended to make reasoning about them tenable. Each intends to deal with faults, like modularity isolates faults to units.

Composability reduces emergent faults. Each abstraction reduces fault models, but AI has different fault models. System design is about recognizing fault models and engineering Universal approximation theorem: a sufficiently large neural network can learn any function.

Quick explanation of how LLMs work: giant next token prediction networks. Usually connected to an orchestrator, which appends that next token and feeds it back to the LLM, along with instructions that influence the next token. This creates a context window. #sd25

We can only modulate the bheavior of a generative AI by either changing the training of the LLM or changing the context window. Training starts with pretraining to get all the data in, then supervised finetuning and "preference optimization". Last two are "posttraining"

The fault models of AI are different. Normally we think nondeterminism as something to avoid. AI are inherently nondet, as they have open-ended outputs. Older AI is probabilistic, but deterministic in a given input.. GenAI focuses on what's "possible", not "correct". Called `temperature`

Hallucination "is a bug, not a feature". It only bothers us when it violates correctness. One way to fix this: output verification. Check output against an oracle. For example, we can verify code by trying to compile it, get information-rich compiler errors. and feed those back into the LLM #sd25

Big challenge for AI researches is to figure out how to verify outputs in various domains. Can also improve hallucination with better training, but this doesn't scale. Off the cuff estimation, getting from 3% hallucination to 2% hallucination via training is 10x more expensive. Ok in finetuning tho

It is possible to reduce hallucination with better prompts. But a system that sensitive to the prompt is definitionally a very fragile system! LLM also has an architectural fault model. Think of LLM as CPU, system prompt as program, user input as instructions. Then control plane == data plane!

This is why prompt injection is possibly unsolvable. Also means that eventually, the system prompt is going to leave the context window and you lose your "program". "Context window overflow". There are also fault models that stem from emergent behavior. #sd25

You could train a model in a way that a special sequence of words triggers special system behavior. You can go through the source code of traditional code, you can't go through the training data of an open-source model. Also, LLMs are weirdly anti-modular. specialist models << generalist models

Composability seems like it happens from MCP, but this is insanely insecure rn, because LLMs are anti-modular and does all reasoning centrally. You can't isolate sensitive data to one part of the LLM @simonwillison.net namedrop (the trifecta post he literally wrote four days ago)

------- "Jepsen 18: Serializable Mom", Kyle Kingsbury/@aphyr.com , #sd25 Engineers are tasked with building towers of abstraction, building everything higher and higher above the towering tire fire that is databases. "I professionally set those tires on fire".

1 repost4 likes

Built Jepsen, a tool for testing databases. Open source, anybody can run it themselves. Works only on binaries, no code analysis. Does fault injection. Designed for concurrency, uses generative testing (randomized inputs, check properties hold).

JVM program opens ssh connections to databases, connects clients, and runs commands against them while also messing with IP tables and the disks and connections and so on. Also running generator which produces abstract terms like "read x", "kill db1", "set y=3".

Clients execute the terms and put the results in a history log. Can see if the history log has certain properties, like "repeatable reads". Distributed systems can do one of three things: succeed, return an error, not return at all. Gonna talk about past projects. #sd25

bufstreamIO [uses/is Kafka?] Kafka has some wierd properties, like you can insert a write in the middle of a read. Going through some of the bugs he found with jepsen, like a lease expiration never getting transmitted These slides are v good btw