Saturday, October 24, 2026
Git cheatsheet
Miscellaneous Security
Examine your JVM's certificates of your Certificate Authorities with the tool provided by the JDK:
- SPIFFE ID - a URL that acts like 'username' for the container or machine.
- SPIFFE Verifiable Identity Document (SVID) - a short lived certificate
- An API that can give a SVID with no further protocol.
Friday, September 18, 2026
Configuring Polaris
There's a bit of a mismatch between Spark and Polaris terminology as illustrated below:
| Spark | Polaris |
| spark.sql.catalog.[CATALOG_NAME].warehouse | catalog |
| namespace | no equivalent |
| no equivalent | namespace |
Tuesday, July 7, 2026
KeyCloak Security
Sunday, June 28, 2026
LLMs in Java - part 1
Interpretability of LLMs is important in many real world situations. For instance, there is an EU law that says if a bank's model refuses a loan then the client has the right to know why. But neural nets are notoriously hard to interpret.
There are a few techniques:
Activation Patching: this is basically A/B testing a neural net where the activations from a clean prompt are transplanted to that of a corrupted prompt and we check if that fixes the corruption.
Logit lens: take the residual stream vector (that is, the vector that represents the working memory) and apply it to the vocabulary logits at each layer. This way, we can see where an output word (probably) starts to form.
Sparse Auto Encoders: the auto encoder is trained on the model's input and output, and deliberately made sparse for low values so prominent features become clear.
The neural net itself
Most of the Java code that iterates over the tokens lives in InferenceEngine.generateTokensGPULlama. In turn, this delegates to the Tornado graphs that are executed in TornadoVMMasterPlan.tornadoVMForwardExecuteLayered. Note that the positionHolder is an IntArray that has a single element.
Saturday, June 6, 2026
Production ready Polaris
Sunday, May 17, 2026
R-squared
yt = εt + φεt-1 + φ2εt-2 + ... where |φ|<1
1. note that the joint probability distribution of x and y if they're independent is f(x,y) = f(x)f(y)2. integrate the expected values, that is integrate xy.f(x,y) = x f(x) y f(y)3. When you do that, you'll find E[XY] = E[X]E[Y].4. Substituing this into the formula for covariance above, Cov(X,Y) = 0 if X and Y are independent.