Building in the openOpen Post-Training SystemBuilding Open Post-Training System: a JAX/TPU-native Agent Swarm RL infrastructure for long-horizon cybersecurity research.
Can models be tricked through culture? I study where open-weight and frontier models break on cultural knowledge in cyber and social-engineering attacks, and teach them to secure critical infrastructure.
I am working on building the Open Post-Training System: a JAX/TPU-native Agent Swarm RL infrastructure for long-horizon cybersecurity research. Since November 2026 I have been building it independently and in the open, to find loopholes in models and systems and to teach models how to secure critical infrastructure.
Focused on building the complete RL stack: distributed orchestration, rollout generation, sandboxed environments, verifiers, training, inference, and evaluation. Building reliable, scalable infrastructure with robust APIs, automated testing, and observability, while studying training dynamics, debugging failures, and running controlled experiments to improve model capabilities over increasingly long horizons.
Optimizing end-to-end training and inference performance through distributed systems engineering, GPU and TPU kernel development, memory and communication optimization, profiling, and benchmarking. Focused on eliminating bottlenecks, maximizing hardware utilization, and improving throughput and efficiency across accelerator architectures.
Before going independent, I completed my research at Carnegie Mellon University on long-horizon agentic systems, studying where models fail across extended coding and agentic tasks and developing evaluation environments and verifiers to identify failures in context retention, state tracking, planning, and execution. Before that, at the Indian Institute of Science (IISc), I studied the internal representations associated with reasoning and memorization in language models.
My research spans the full stack around reasoning models — post-training methods that build reasoning (RLVR, preference optimization, reasoning distillation), the test-time strategies that make it efficient (compute allocation, deciding when to stop deliberating), and the empirical and evaluation work needed to trust any of it. I have been going deeper into mechanistic interpretability — studying the internal circuits and representations behind multi-step reasoning in large language models, to understand failure modes like reward hacking and unfaithful chain-of-thought well enough to actually fix them, not just detect them. A specific thread: disentangling memorization from genuine reasoning mechanistically — which circuits are doing lookup versus computation — and using that understanding to work toward guiding reasoning safely, so models can be steered away from unfaithful or unsafe reasoning traces rather than just penalized after the fact.
My work brings together reinforcement learning, agent environments and evaluation, distributed systems, and accelerator performance. I share research code, experiments, and technical explanations through GitHub and Substack.
Featured project
Building Open Post-Training System: a JAX/TPU-native Agent Swarm RL infrastructure for long-horizon cybersecurity research.
First, why this exists. Then Part 1 of how I am building it: the JAX foundation, written from scratch so that every number in it is one I derived and checked myself, with the Qwen3-0.6B architecture, a tokenizer, a growing KV cache and cached generation.
In middle school I was hooked on computer hacking. I wanted to go down to assembly level and see how an exploit can be reversed, and Stuxnet, a zero-day-powered worm, is the example that stayed with me. Now that I have matured, I want to use AI to research exactly this, and to teach models how to secure computer systems.
Frontier models keep expanding their cybersecurity capabilities, and they have shown they can find real, critical vulnerabilities in systems. So how far can open-weight and frontier models be pushed, or tricked, into committing fraud and social-engineering attacks?
Models lack cultural knowledge, and attackers can exploit that gap to trick them into helping launch cyber and social-engineering attacks. If the hypothesis holds, it becomes one of the biggest questions for RL, agentic research and model security in general.
The Open Post-Training System is how I test it: an Agent Swarm RL infrastructure on JAX and TPUs, built for long-horizon work. It finds loopholes in models and systems, then post-trains models to secure critical infrastructure. It is not only infrastructure. The infrastructure is the instrument for the research.
This also comes from my earlier work in computer security. In my early career I helped save many people from scams and similar attacks. Scammers prey on people’s lack of awareness about technology, and people in India often know this best. If you have ideas around it, I would like to hear them.
I report on this publicly as I build it. I have only just started, and there is more to be revealed over the next few months.
The first target is Qwen3-0.6B, a decoder-only Transformer. I rebuilt it from its config and checkpoint and accounted for parameters, FLOPs and memory per component, then reconciled the total with the model card. The LM head is tied to the embedding, so it adds no parameters, but it still costs about 311M FLOPs per token.
Parameter budget. The norms add 65,536 parameters (0.125 MiB), too small to draw.
A pytree is a nested structure of dictionaries whose leaves are arrays, so jit, grad and tree_map understand it natively, and the same shape will later carry gradients and optimizer state. The checkpoint is flat, so I stack each weight type along a new leading axis. That layout is what lets jax.lax.scan compile the layer body once instead of unrolling 28 copies.
The forward pass is compiled once with jax.jit, and params goes in as an argument. If it were captured, JAX would bake about 1.2 GB of weights into the program as constants.
Without a cache, every generated token recomputes the whole sequence: about 77 GFLOPs per token at 64 positions, against about 1.2 for the one new token. Past keys and values never change, so I store them per layer as [28, B, capacity, 8, 128] (112 KiB per token) and double the capacity whenever it is full.
Cache slots. After prefill only the first n are valid; padding slots are stale and masked, then overwritten one decode step at a time.
Wiring the cache end to end surfaced real bugs. Most were silent, because JAX happily returns wrong arrays and drops out-of-range writes without an error. Three of them:
What went wrongA typo wrote the value update into the key-cache variable.
FixEach cache is written from its own tensor.
What went wrongThe value tensor was reshaped for the matmul, then returned in place of the cache.
FixA separate attention-only variable; the real cache is returned.
What went wrongThe layer call skipped the cache arguments, so rope_theta landed in a cache slot.
FixPass caches and cache_position end to end through the scan.
Part 1 showed how I built Qwen3-0.6B and made it generate text. Part 2 picks up from there: it follows how separate agents receive their own instructions and information, communicate, use tools, and act in a sandboxed environment. The full guide walks through one episode and explains what is implemented and what still needs evaluation or real execution evidence.
Beyond Fixed Directions: Adaptive Representation Analysis of Reasoning and Memorization in LLMs
Preprint · 2026
An empirical study of whether reasoning and memorization can be characterized by a single representation direction, and whether that geometry remains stable after GRPO. Read the preprint
Long-form walkthroughs from the YouTube channel. This one starts at 2:46:36.
Play on YouTube →Part 1: choosing Qwen3-0.6B, deriving its parameters, FLOPs and memory, loading it into a JAX pytree, building a tokenizer from scratch, and adding a growing KV cache with cached generation.
An introduction to the environments in which agents interact, take actions, receive feedback, and learn from experience.
How neural networks represent more features than dimensions, and how sparse autoencoders can help study those representations.
A practical introduction to circuits, superposition, activation patching, and sparse autoencoders for understanding model computation.