Introduction of EngramEdit-LongCat-Flash-Lite-MQuAKE-3K
Model Details of EngramEdit-LongCat-Flash-Lite-MQuAKE-3K
EngramEdit: MQuAKE · 3K
Overview
Conditional memory expands an LLM's capacity through learned
n-gram embeddings
that participate in its computation.
EngramEdit
enables decoupled knowledge updates by updating these embeddings while keeping the Transformer backbone fixed. Revised facts remain usable across different expressions and in multi-hop reasoning, while unrelated knowledge and general capabilities are largely preserved.
This repository provides the EngramEdit checkpoint for
the factual edits specified by 3,000 MQuAKE cases
on
LongCat-Flash-Lite
. The checkpoint contains the learned conditional memory updates. Load it together with the base model using the EngramEdit code below.
The example compares the model's response before and after loading the checkpoint. No editing, expression generation, or frequency-cache preparation is needed.
Each MQuAKE case may specify multiple factual edits. This example queries one edited fact; the repository also provides multi-hop evaluation. Counterfactual targets are benchmark edits, not claims about real-world facts.
from pathlib import Path
import torch
from huggingface_hub import hf_hub_download
from experiments.utils import load_model
from EngramEdit import prepare_engramedit_model
# Load the base model.
model, tokenizer = load_model("data/LongCat-Flash-Lite", "bfloat16")
prompt = "Fernando Santos is a citizen of"
target = "United Kingdom"@torch.inference_mode()defanswer(prompt):
inputs = tokenizer(prompt, return_tensors="pt").to(
model.get_input_embeddings().weight.device
)
output = model.generate(
**inputs, do_sample=False, max_new_tokens=32,
pad_token_id=tokenizer.pad_token_id,
)
return tokenizer.decode(
output[0, inputs.input_ids.shape[1]:], skip_special_tokens=True
)
# Inspect the query and the target fact.print("Prompt:", prompt)
# Prompt: Fernando Santos is a citizen ofprint("Target answer:", target)
# Target answer: United Kingdom# Responses below are illustrative, not recorded checkpoint outputs.print("Before loading:", answer(prompt))
# Before loading: Portugal# Download and load the learned conditional memory updates.
state_path = hf_hub_download(
repo_id="ModalityDance/EngramEdit-LongCat-Flash-Lite-MQuAKE-3K",
filename="engramedit_state.pt",
local_dir="checkpoints/mquake",
)
model = prepare_engramedit_model(model, state_dir=Path(state_path).parent)
# Ask the same question with the checkpoint loaded.print("After loading:", answer(prompt))
# After loading: United Kingdom
Citation
@misc{cai2026engramedit,
title = {EngramEdit: Decoupled Knowledge Updates in LLMs through Conditional Memory},
author = {Hongru Cai and Ran Wei and Wenjie Wang and Chengfa Wu and Ning Song and Yongqi Li and Wenjie Li},
year = {2026},
eprint = {2610.10533},
archivePrefix = {arXiv},
primaryClass = {cs.CL},
url = {https://arxiv.org/abs/2610.10533}
}
License
This checkpoint is released under the
MIT License
. The base model is distributed separately under its
own license
.
Runs of ModalityDance EngramEdit-LongCat-Flash-Lite-MQuAKE-3K on huggingface.co
0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About EngramEdit-LongCat-Flash-Lite-MQuAKE-3K huggingface.co Model
More EngramEdit-LongCat-Flash-Lite-MQuAKE-3K license Visit here:
EngramEdit-LongCat-Flash-Lite-MQuAKE-3K huggingface.co is an AI model on huggingface.co that provides EngramEdit-LongCat-Flash-Lite-MQuAKE-3K's model effect (), which can be used instantly with this ModalityDance EngramEdit-LongCat-Flash-Lite-MQuAKE-3K model. huggingface.co supports a free trial of the EngramEdit-LongCat-Flash-Lite-MQuAKE-3K model, and also provides paid use of the EngramEdit-LongCat-Flash-Lite-MQuAKE-3K. Support call EngramEdit-LongCat-Flash-Lite-MQuAKE-3K model through api, including Node.js, Python, http.
EngramEdit-LongCat-Flash-Lite-MQuAKE-3K huggingface.co is an online trial and call api platform, which integrates EngramEdit-LongCat-Flash-Lite-MQuAKE-3K's modeling effects, including api services, and provides a free online trial of EngramEdit-LongCat-Flash-Lite-MQuAKE-3K, you can try EngramEdit-LongCat-Flash-Lite-MQuAKE-3K online for free by clicking the link below.
ModalityDance EngramEdit-LongCat-Flash-Lite-MQuAKE-3K online free url in huggingface.co:
EngramEdit-LongCat-Flash-Lite-MQuAKE-3K is an open source model from GitHub that offers a free installation service, and any user can find EngramEdit-LongCat-Flash-Lite-MQuAKE-3K on GitHub to install. At the same time, huggingface.co provides the effect of EngramEdit-LongCat-Flash-Lite-MQuAKE-3K install, users can directly use EngramEdit-LongCat-Flash-Lite-MQuAKE-3K installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
EngramEdit-LongCat-Flash-Lite-MQuAKE-3K install url in huggingface.co: