Jonas Loos
I’m a PhD student in the Machine Learning Group at TU Berlin and ELIZA, where I try to understand what happens inside generative models.
Currently, I study how fine-tuning changes language model behavior, and how to read out what a model represents at each layer. Before that, I analyzed internal representations of diffusion models.
Papers Published work and theses
-
KV-Cache Patching: Tracing How and Where Fine-Tuned Behaviors Arise
Patching the KV cache of a fine-tuned model into its base model can transfer behaviors such as answering in German or emergent misalignment. The effect grows with how much of the cache is patched and concentrates at a few pivotal tokens, like the system prompt and the chat template.
-
SCAM: A Real-World Typographic Robustness Evaluation for Multimodal Foundation Models
The largest set of real-world typographic attacks: 1,162 photos of objects with a handwritten note that misleads vision-language models.
-
Latent Diffusion U-Net Representations Contain Positional Embeddings and Anomalies
The intermediate representations of Stable Diffusion contain a learned positional embedding, high-similarity corner artifacts, and a few anomalous high-norm tokens.
-
An Analysis of Representation Similarities in Latent Diffusion Models and Implications for Representation Extraction
Which image regions does a diffusion model consider similar, and why can this go wrong? The thesis came with an interactive similarity explorer and sdhelper, a library to extract representations from diffusion models.
-
Spatiotemporal Modeling of First and Second Wave Outbreak Dynamics of COVID-19 in Germany
A network model of how COVID-19 spread between the counties of Germany, used to predict local infections and deaths.
Research notes Smaller experiments, replications and write‑ups
-
Can one extract and inject task vectors in language models?
Take the hidden state from a few-shot prompt and inject it into a zero-shot prompt. For natural-language tasks this recovers 74–115% of the few-shot accuracy; for algorithmic tasks, only 15–28%.
-
Do language models struggle to use representations learned in context?
Models can form an internal map of a graph from a random walk in their context, but often fail to use it. How you ask matters: prefilling the response with the walk, or giving one example, recovers most of the lost accuracy.
-
Swapping the positional embedding of a pretrained model
Replace RoPE with PoPE, or remove it completely, then recalibrate on about 2% of the pretraining budget. PoPE matches RoPE within the training length and stays stable beyond it. Removing RoPE also helps beyond the training length, but does not recover the original perplexity.
-
How to run Qwen3.8 27B at 30+ tokens/s on a base M5 MacBook
With tree-based speculative decoding, a 27B model runs at 28 to 61 instead of about 8 tokens per second on a MacBook. The post goes from token-by-token decoding to custom Metal kernels for 4-bit matmul and tree attention.
-
Do the embeddings of a rotating object form a ring?
Render a turning 3D object, embed every frame with a vision model in the browser, and project the embeddings to 3D. If a model represents the viewpoint smoothly, the frames trace a ring.
Projects Tools, demos and things built for fun
- compute-sessionsSLURM GPU sessions for coding agents2026
- STATICA 3D game rendered entirely as noise2026
- Oscillator digitsDigits from coupled oscillators2026
- ring-nnNeural networks on a ring of integers2025
- Fast Cursor TyperType with three mouse moves per character2025
- H-space directionsDiffusion directions paper, reimplemented2024
- Mars roverEuropean Rover Challenge 2023 and 20242023
- BibTeX to HayagrivaBibliographies for Typst, in the browser2023
- trainplotLive training curves in Jupyter notebooks2023
- NiceHTMLLike HTML, but nicer2023
- Simple toy languageA toy language, parser and interpreter2021
- COVID dataGerman case numbers in a simple format2021