cd /news/large-language-models/relm-local-llms-as-base-r-objects-wi… · home topics large-language-models article
[ARTICLE · art-52355] src=github.com ↗ pub= topic=large-language-models verified=true sentiment=↑ positive

Relm – local LLMs as base-R objects, with interpretability

The R-ebirth project released relm, an R package with a Rust native core that embeds llama.cpp to expose local LLMs as base-R objects, supporting loading, generation, embeddings, activation tracing, steering, and ablation. The package aims to make R a first-class environment for scientific research on AI interpretability and machine learning, with all numerical features validated against an independent reference.

read2 min views6 publishedJul 9, 2026
Relm – local LLMs as base-R objects, with interpretability
Image: source

R-ebirth aims to make R a first-class environment for scientific research on data and AI — mechanistic interpretability ("AI neuroscience"), machine learning including topic modelling, and the life sciences — while staying simple for researchers.

It is delivered as ** relm**: an R package with a Rust native core that embeds a patched

llama.cpp

, exposing local LLMs (, generation, embeddings, activation tracing, steering, and ablation) as base-R-idiom functions returning plain data.frame

s and matrix

es.Topic modelling with no Python: llm_embed() → UMAP → HDBSCAN → the model names each cluster. One of two runnable demos — see the package README.

Using the package?Start with the[package README](quickstart, examples, the two demos) and[docs/getting-started.md](install options — binaries or from source — a first run, and troubleshooting). This page is the repository/developer overview.

The first public release is here. relm

loads local GGUF models and exposes, as base-R objects:

model ,llm()

tokenization;llm_tokens()

text generation,llm_generate()

next-token distributions;llm_logits()

text embeddings;llm_embed()

activation tracing,llm_trace()

steering,llm_steer()

ablation — the mechanistic-interpretability core;llm_ablate()

checksum-verified fetch of pinned models.llm_download()

Every numerical feature is validated value-for-value against an independent reference (harness B). Vision (image inputs) is the next release (v0.2.0); v0.1.0 is text-only. The full plan is in ROADMAP.md

.

rebirth/            the R package (R/, src/ + src/rust/ extendr crate, tests/, vignettes/)
rust/               Cargo workspace: rebirth-ffi (R <-> Rust boundary), rebirth-llm (engine)
rebirth/src/llama.cpp/   pinned, patched llama.cpp (vendored; see its VENDORING.md)
tests/llm-golden/   Harness B numerical goldens
tests/demos/        the two reference demos (anatomy lab; topics without Python)

CLAUDE.md

, SOLO-PHASE-PLAN.md

, ROADMAP.md

, API-GRAMMAR.md

, ARCHITECTURE.md

, DECISIONS.md

, and THESIS-PLAN.md

. If anything else disagrees with these files, the files win.

End users install prebuilt binaries from r-universe (no toolchain required). Building from source requires R (>= 4.5), a C toolchain, a Rust toolchain (rustup

; the pinned channel is in rust-toolchain.toml

), and CMake (>= 3.28) for the vendored engine.

cd rust && cargo test && cargo clippy --all-targets -- -D warnings

R CMD build rebirth && R CMD check relm_0.1.0.tar.gz

Dual-licensed MIT OR Apache-2.0 — see LICENSE.md. The vendored llama.cpp

is MIT (see NOTICE

). The name is protected: modified redistributions must rename (see TRADEMARK.md).

── more in #large-language-models 4 stories · sorted by recency
── more on @r-ebirth 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/relm-local-llms-as-b…] indexed:0 read:2min 2026-07-09 ·