Skip to content
View kaelvalen's full-sized avatar
😺
😺

Highlights

  • Pro

Block or report kaelvalen

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
kaelvalen/README.md

Mehmet Arda Hakbilen (kael valen)

I work on ML systems: catching training runs before they fail, and changing what a deployed model knows without retraining it. Ankara, Türkiye.

email · linkedin · portfolio: kaelvalen.vercel.app


Now

RELIC: transactional knowledge updates for frozen language models

Knowledge editing writes facts into a model's weights, but then a single fact cannot be removed, the fact behind an answer cannot be named, and an update's effect on unrelated questions is hard to bound. RELIC keeps the base model frozen and stores each new fact as its own entry: a note served in the context and, when the note is not enough (or in the default store, alongside it), a LoRA adapter trained with a KL penalty toward the base. An adapter is admitted only if its divergence on 40 held-out canary prompts stays below a threshold. A router whose parameters are fixed before any fact is stored applies at most one entry per query, so removal and attribution are exact by construction.

Pre-registered study, Qwen2.5-1.5B-Instruct, 1000 facts per dataset (reported stores use rank-16 adapters; a rank-2 LoRA+ int8 variant shrinks each adapter from 8.7 MB to 373 KB):

CounterFact zsRE
Edit prompts answered (default: adapter + note) 99.6% 98.9%
Paraphrases answered (default: adapter + note) 89.1% 98.2%
Other questions about a stored subject that get a stored answer 4.3% not measured
Removed facts returning to the base answer (100 removed) 100% 100% by content
Tiered store: facts that need an adapter 16.2% (66.4% paraphrase) 20.6%

Under the same chat template, GRACE answers 2.0% of CounterFact paraphrases and WISE 10.5% (EasyEdit, 200 sequential edits), and neither can remove a single edit. The open problem is leakage into neighboring relations: 11.7% of natural questions about them receive a wrong stored answer. The paper and every pre-registration record are in the repo.

Weightsmith: build, train and diagnose models from a graph

The source of truth is a typed graph, not code: shapes are checked as you draw, the graph compiles to plain PyTorch you can read and export, and it trains on a local GPU with every run identified by the hashes of its graph, config, data and seed. Variants diff against each other, LoRA and adapters are modifiers on a node, and Llama, Mistral, Qwen2, Mixtral, GPT-2, BERT, MPNet and Mamba checkpoints open as editable graphs.

Every run is recorded by trainscope, its flight recorder for loss spikes (still on PyPI on its own). A CUSUM change-point detector catches gradual loss drift 5 to 20 steps before it turns into a full spike, with 0.0% false positives across 280+ held-out noise scenarios and 100% detection for drift from 0.10σ to 0.50σ. When a run fails, Weightsmith shows which layer moved first, whether it was activation kurtosis or a gradient explosion, marks the node that holds it on the canvas, and across runs answers which setting the failed ones share. trainscope started as a tool I needed during ENGRAM runs.

Closed: NOESIS

NOESIS tried to inject retrieved memory (a Titans-style associative matrix with test-time training) directly into a frozen LLM's hidden states. The result was negative and worth stating plainly: a frozen backbone's hidden manifold cannot be given new semantic content by an untrained vector injection, however carefully the geometry is aligned (KV-cache-purge controls, negative controls, 0% recall on a 50-fact benchmark). Writeup in FINDINGS.md. RELIC started from this result.


Projects

Machine learning and research

  • relic: transactional knowledge updates for frozen LMs. Notes and KL-gated LoRA adapters, parameter-free routing, exact removal and attribution. PyTorch, PEFT.
  • weightsmith: visual ML workbench. Typed graph IR → readable PyTorch → local GPU training → loss-spike diagnosis that points at the node. PyTorch, FastAPI, React.
  • trainscope: the post-mortem flight recorder for LLM training loss spikes inside weightsmith, still installable on its own. CUSUM change-point detection, HF and Lightning callbacks, on PyPI.
  • noesis: continual learning with a frozen backbone and vector memory injection. Closed with a documented negative result.
  • engram: hybrid linear-recurrent backbone, Mamba-2 SSD blocks interleaved 3:1 with Gated Delta Rule blocks, applied to PTB-XL, Speech Commands and sCIFAR-10 (312 tests).
  • beyond_transformer: PULSE, the predecessor to ENGRAM. Kept public as a design record.

Systems and tools

  • latch-lang: a programming language written in Rust (tree-walk interpreter and bytecode VM behind one frontend). On crates.io.
  • measure: Claude Code plugin for performance work — profile first, prove a speedup with an interleaved A/B benchmark and a bootstrap CI.
  • connor: terminal-native CI/CD runner in Rust. TOML config, DAG-parallel execution, no server.
  • weave: local-first, plugin-based productivity app. Tauri, React, Rust.
  • nanonet: distributed service monitoring. Go backend, Rust agents, React frontend (~70k lines). Archived.

Stack

PyTorch for ML work, with Hugging Face Transformers and PEFT for the language-model experiments and Triton when there is no way around it. Rust and Go for systems (now and then C++), TypeScript and React for frontends.

GitHub metrics

Pinned Loading

  1. relic relic Public

    Transactional knowledge updates for a frozen LLM: each new fact is a note plus, when needed, a 373 KB LoRA+ adapter, served through a router with provenance and exact removal. Pre-registered experi…

    Python

  2. trainscope trainscope Public archive

    Moved to github.com/kaelvalen/weightsmith (trainscope/).

    Python

  3. noesis noesis Public archive

    Memory-centric inference system: frozen RWKV/Mamba backbone + Titans associative memory, test-time training, vector DB — learns at inference time

    Python 1

  4. measure measure Public

    Claude Code plugin: profile first, prove speedups with an interleaved A/B benchmark and a bootstrap CI, revert noise

    Python 1