Qwen3.8-40B-Ultimate-Heretic-Uncensored-Build2-v17
model with episodic memory
2 min readupdated
This is a new version of the flagship 40-billion parameter language model (based on DavidAU's work), enhanced with the V17 episodic memory architecture. The model saves observations, keys, and values to persistent storage, allowing it to reference past dialogues even after a server restart. The system automatically consolidates data during idle time (sleep function) and forecasts events using timestamps. It is well-suited for developers of smart assistants and local knowledge bases who need long-term context memory without losing accuracy.
Key features
- Episodic memory: preservation of key attention points and states in external storage.
- Background processing (Sleep): transfer of new observations and verification of data links during service idle time.
- Forecasting: evaluation of future state probabilities using timestamps and past event chains.
- SGLang integration: deployment in Docker with support for a format 8 persistent memory volume.
What you can do
- Deploy a local chat server via SGLang with preserved dialog history between sessions.
- Use the Transformers library to integrate the model with built-in memory into Python scripts.
- Set up automatic knowledge base updates and background fact-checking.
Example
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
repo = "LTM-Lab/Qwen3.8-40B-Ultimate-Heretic-Uncensored-Build2-v17"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForImageTextToText.from_pretrained(
repo, trust_remote_code=True, dtype="auto", device_map={"": 0}
).eval()
model.reopen_memory(storage_path="./qwen-40b-v17-store")
note = "The spare key is in locker QV-823."
with torch.inference_mode(), model.memory_source(role="user", text=note):
model(**tokenizer(note, return_tensors="pt").to(model.device))
Read more
Details• Base model: LTM-Lab/Qwen3.8-40B-Ultimate-Heretic-Uncensored-Build2-v16
• Parameters: 39.96 billion, 96 layers (24 full attention layers involved in memory)
• Requirements: GPU with BF16 support (weights take about 79.9 GB)
• Limitations: Memory token budget is limited; long-term operation requires backing up the SQLite database and segments.










Comments