Safetensors
lfm2_moe

Engram

Engram-8B-A1B is BRAHMAI's conversational memory intelligence model, built to identify, classify, and extract information from interactions that may be useful beyond the immediate moment.

Given a conversation, Engram analyzes the latest user message in the context of the interaction and produces compact, structured memory records representing information worth carrying forward.

Engram is fine-tuned from LiquidAI/LFM2.5-8B-A1B.


What Engram stands for

Modern AI systems can process enormous context windows, retrieve documents, call tools, and generate increasingly capable responses.

But context is not memory.

A conversation history is a record of what happened.

Memory is a representation of what should continue to matter.

Engram exists to bridge that gap.

It is designed around a simple idea:

An intelligent system should not remember everything. It should understand what is worth remembering.

Engram transforms conversations into structured memory units that can be stored, retrieved, consolidated, ranked, connected, and used by downstream AI systems.

It is not merely an information extraction model.

It represents a foundational component for AI systems that maintain continuity over time.

Systems that can remember preferences.

Systems that can track ongoing work.

Systems that can recognize important events.

Systems that can preserve instructions and interaction patterns.

Systems that can build increasingly useful representations of the people they interact with.

The name Engram refers to the concept of a persistent trace formed by experience.

Within BRAHMAI's work on memory systems, Engram represents the transition from raw conversational history to structured machine memory.

Conversation becomes experience.

Experience becomes memory.

Memory becomes continuity.


What the model does

Engram processes conversations incrementally.

For every new user message, the model:

  1. Analyzes the latest message.
  2. Uses previous conversation history as contextual evidence.
  3. Identifies information that may be worth retaining.
  4. Avoids extracting information already represented by prior context.
  5. Converts extracted information into standalone memory statements.
  6. Assigns each memory a type.
  7. Assigns each memory a confidence level.
  8. Returns the result as deterministic, machine-readable XML.

The model extracts memories from the latest user message only.

Previous conversation turns are provided as background context to:

  • resolve references,
  • understand ongoing tasks,
  • distinguish temporary information from durable information,
  • prevent duplicate memories,
  • and improve interpretation.

Engram is designed to answer one question:

Given what the user just said and what has already happened, what new information should the system carry forward?


Input and output examples

Example 1: Durable user information

Input

[user]: I'm a backend engineer based in Berlin.

Output

<memories>
  <memory>
    <content>Works as a backend engineer based in Berlin.</content>
    <type>semantic</type>
    <confidence>high</confidence>
  </memory>
</memories>

Example 2: User preference

Input

[user]: Keep your answers concise. I hate unnecessarily long explanations.

Output

<memories>
  <memory>
    <content>Prefers concise responses without unnecessarily long explanations.</content>
    <type>procedural</type>
    <confidence>high</confidence>
  </memory>
</memories>

Example 3: Ongoing work

Input

[history]
[user]: I'm building a distributed caching system.
[assistant]: What language are you using?

[latest_message]
I'm implementing it in Go and currently working on cache invalidation.

Output

<memories>
  <memory>
    <content>Is implementing the distributed caching system in Go.</content>
    <type>contextual</type>
    <confidence>high</confidence>
  </memory>
  <memory>
    <content>Is currently working on cache invalidation for the distributed caching system.</content>
    <type>contextual</type>
    <confidence>high</confidence>
  </memory>
</memories>

Example 4: Episodic information

Input

[user]: We launched the first public beta of our product yesterday.

Output

<memories>
  <memory>
    <content>Launched the first public beta of their product yesterday.</content>
    <type>episodic</type>
    <confidence>high</confidence>
  </memory>
</memories>

Example 5: No useful memory

Input

[user]: Thanks!

Output

<memories></memories>

Example 6: Using history to avoid duplication

Input

[history]
[user]: I live in Noida.
[assistant]: Got it.

[latest_message]
I've been living here for three years now.

Output

<memories>
  <memory>
    <content>Has been living in Noida for three years.</content>
    <type>semantic</type>
    <confidence>high</confidence>
  </memory>
</memories>

Engram does not need to extract Lives in Noida again because that information is already represented by the conversation history.


Memory taxonomy

Each extracted memory is assigned exactly one type.

The taxonomy uses the following priority order:

Priority Type Description Example
1 procedural Instructions, preferences, or patterns describing how an AI system should interact with the user "Prefers concise technical explanations."
2 contextual Information primarily relevant to the current conversation, task, project, or active situation "Currently debugging the authentication middleware."
3 episodic Specific events or experiences associated with a point or period in time "Launched the product beta last Friday."
4 implicit High-confidence information inferred from context rather than directly stated "Likely works with distributed systems."
5 semantic Durable facts, preferences, traits, relationships, roles, or knowledge about the user "Works as a backend engineer."
6 explicit Directly stated concrete information that does not fit a higher-priority category "User's preferred project codename is Atlas."

Each memory also receives a confidence level:

  • high
  • medium
  • low

Output format

Engram produces structured XML.

<memories>
  <memory>
    <content>...</content>
    <type>procedural | contextual | episodic | implicit | semantic | explicit</type>
    <confidence>high | medium | low</confidence>
  </memory>
</memories>

When no information should be retained:

<memories></memories>

The structured output format makes Engram suitable for integration with memory stores, databases, graphs, retrieval systems, user models, personalization layers, and long-running AI agents.


Quick start

Installation

pip install transformers torch accelerate

Python inference

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_id = "brahmairesearch/engram-8B-A1B"

tokenizer = AutoTokenizer.from_pretrained(
    model_id,
    trust_remote_code=True,
)

model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)

model.eval()

conversation = [
    {
        "role": "user",
        "content": "I'm a backend engineer based in Berlin."
    },
    {
        "role": "assistant",
        "content": "Nice. What are you working on?"
    },
    {
        "role": "user",
        "content": (
            "Building a distributed caching layer in Go. "
            "Keep things minimal, no frameworks."
        )
    },
]

inputs = tokenizer.apply_chat_template(
    conversation,
    add_generation_prompt=True,
    return_tensors="pt",
)

if isinstance(inputs, dict):
    input_ids = inputs["input_ids"].to(model.device)
else:
    input_ids = inputs.to(model.device)

with torch.no_grad():
    output_ids = model.generate(
        input_ids=input_ids,
        max_new_tokens=512,
        do_sample=False,
        pad_token_id=tokenizer.pad_token_id,
        eos_token_id=tokenizer.eos_token_id,
    )

new_tokens = output_ids[0, input_ids.shape[-1]:]

print(
    tokenizer.decode(
        new_tokens,
        skip_special_tokens=True,
    )
)

Expected output:

<memories>
  <memory>
    <content>Works as a backend engineer based in Berlin.</content>
    <type>semantic</type>
    <confidence>high</confidence>
  </memory>
  <memory>
    <content>Currently building a distributed caching layer in Go.</content>
    <type>contextual</type>
    <confidence>high</confidence>
  </memory>
  <memory>
    <content>Prefers minimal approaches without frameworks.</content>
    <type>procedural</type>
    <confidence>high</confidence>
  </memory>
</memories>

Chat template

Engram ships with a custom Jinja chat template designed specifically for incremental memory extraction.

Input Behavior
No system message Memory extraction mode
System message present Standard conversational mode

In memory extraction mode, the template automatically:

  1. Identifies the final user turn as [latest_message].
  2. Formats all previous conversation turns as [history].
  3. Injects the memory extraction instruction.
  4. Constructs the complete inference prompt.

Users do not need to manually construct the extraction prompt.


Model architecture

Engram-8B-A1B is fine-tuned from LiquidAI/LFM2.5-8B-A1B.

The base model uses Liquid AI's LFM2.5 architecture and a sparse Mixture-of-Experts design with approximately 8 billion total parameters and approximately 1 billion active parameters per token.

Property Value
Model Engram-8B-A1B
Model ID brahmairesearch/engram-8B-A1B
Base model LiquidAI/LFM2.5-8B-A1B
Model family LFM2.5
Architecture Sparse Mixture-of-Experts
Total parameters ~8B
Active parameters ~1B per token
Task Conversational memory extraction
Output format Structured XML
Language English
Library Hugging Face Transformers

Training

Data

Engram-8B-A1B was fine-tuned on an internal dataset prepared by BRAHMAI specifically for training conversational memory extraction models.

The dataset was designed to teach the model to:

  • identify information worth remembering,
  • distinguish new memories from existing conversational context,
  • produce standalone memory representations,
  • classify memories using the Engram memory taxonomy,
  • assign confidence levels,
  • use conversation history for contextual interpretation,
  • avoid redundant memory extraction,
  • and produce stable structured outputs.

No additional details about the internal training dataset are disclosed.


Training objective

Engram is trained as a supervised structured-generation model.

Given:

conversation history + latest user message

the model learns to generate:

new structured memories introduced by the latest user message

The model is optimized for precision over exhaustive extraction.

Engram is intentionally conservative.

Information that is ambiguous, unsupported, redundant, or unlikely to be useful beyond the immediate interaction may be omitted.


Recommended inference settings

Parameter Recommended value
max_new_tokens 16000 (it's a reasoning model)
do_sample False
temperature 0.0 to 0.1
repetition_penalty 1.05

Deterministic decoding is recommended for applications that depend on stable structured outputs.


Intended use

Engram is intended to serve as a memory extraction and memory intelligence component within larger AI systems.

Primary applications

  • Persistent memory systems for AI assistants
  • Long-term personalization
  • User modeling
  • Conversational memory extraction
  • Agent memory architectures
  • Structured profile construction
  • Memory graphs
  • Context management systems
  • Long-running AI agents
  • Adaptive interfaces
  • Personal AI systems

Engram is especially useful in systems where raw conversation histories are too large, noisy, redundant, or unstructured to function as effective long-term memory.


What Engram represents

Engram represents BRAHMAI's approach to one of the fundamental problems in persistent AI systems:

How should an artificial intelligence decide what to remember?

Large context windows allow models to see more.

Retrieval systems allow models to search more.

Databases allow systems to store more.

None of these capabilities determine what information deserves to persist.

Engram is designed to provide that missing layer.

It converts interactions into structured memory candidates that can become part of a persistent representation of the user, their preferences, their experiences, their work, and their evolving relationship with an AI system.

The model is not the memory system itself.

It is the mechanism that transforms experience into memory.

Within a broader cognitive architecture, Engram can act as the boundary between transient interaction and persistent machine memory.

This makes Engram more than a conversation processing model.

It is infrastructure for AI systems designed to maintain continuity.


Limitations

  • English-focused: The model is intended primarily for English-language conversations.
  • Task-specific: Engram is specialized for conversational memory extraction and is not intended to replace general-purpose language models.
  • Conservative extraction: Some useful information may be omitted when the model determines that evidence is insufficient.
  • Implicit memory uncertainty: Inferred memories are inherently less reliable than directly stated information.
  • Structured generation: Invalid or malformed XML remains possible and should be handled by production systems.
  • Memory extraction is not memory management: Engram identifies memory candidates. Storage, consolidation, retrieval, forgetting, conflict resolution, privacy enforcement, and lifecycle management remain responsibilities of the surrounding memory architecture.
  • Sensitive information: Applications processing personal information should implement appropriate privacy, security, consent, retention, and access-control mechanisms.

Responsible use

Engram may extract information that users consider personal or sensitive.

Developers integrating Engram into production systems should implement appropriate mechanisms for:

  • user consent,
  • transparency,
  • memory inspection,
  • memory correction,
  • memory deletion,
  • access control,
  • secure storage,
  • retention policies,
  • and compliance with applicable privacy regulations.

Users should be able to understand, modify, and remove information retained about them.


Citation

If you use Engram in research or products, please cite:

@misc{engram8ba1bv02026,
  title  = {Engram-8B-A1B: Conversational Memory Intelligence Model},
  author = {BRAHMAI Research},
  month  = {July},
  year   = {2026},
  note   = {A conversational memory intelligence model developed by BRAHMAI, fine-tuned from LiquidAI/LFM2.5-8B-A1B}
}
Downloads last month
31
Safetensors
Model size
8B params
Tensor type
F32
·
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for brahmairesearch/engram-8B-A1B

Quantizations
1 model