/ Модель

Характеристики

Контекст
40 960 токенов
Параметры
3,7 млрд
Размер весов
8 ГБ
Лицензия
Apache 2.0
Архитектура
qwen3 · dense
Базовая модель
Qwen3-4B
Библиотека
transformers
Опубликована
11 июл 2025

MemReader-4B

Генерация текстаТекст → текст8 профессий

MemReader-4B — дообученная языковая модель для извлечения и суммирования памяти из диалогов и документов на английском и китайском языках.

104скачиваний за 30 дней5лайковвеса обновлены11 июл 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

MemReader-4B — языковая модель MemTensor для операций с памятью в MemOS. Она предназначена для извлечения и обновления сведений из диалогов и документов, а также для создания кратких сводок разговоров и фрагментов документов. Модель построена на архитектуре Qwen3ForCausalLM и получена дообучением Qwen3-4B на размеченных людьми и сгенерированных моделями данных методом supervised fine-tuning. В метаданных указано 3,7 млрд параметров и контекст до 40 960 токенов; README приводит размер около 4 млрд параметров и контекст 32 768 токенов.

Модель поддерживает английский и китайский языки и рассчитана на диалоговое применение, включая локальное извлечение памяти в средах с ограниченным доступом к интернету. По данным README, в оценке Locomo она показала результат, сопоставимый с более крупными моделями на задачах памяти; эти результаты относятся к описанной авторами оценке. Для загрузки доступна библиотека Transformers, веса представлены в формате Safetensors. Лицензия — Apache-2.0.

Сценарии применения

  • извлечение важных сведений из истории диалога
  • создание краткой сводки разговора для долговременной памяти
  • извлечение фрагментов и фактов из документов
  • обновление памяти диалогового ассистента
  • локальная обработка памяти в средах без доступа к интернету

Ограничения

Модель предназначена для операций с памятью в MemOS; README не приводит подробных сведений о поведении за пределами этих сценариев. Заявления о качестве основаны на оценке Locomo, описанной авторами.

Для каких профессий подходит8

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Model Overview

Memory Operator is a sub-model exclusive to MemOS, designed specifically for memory operations. Its core functionalities include processing memory extraction, integration, and updating. The purpose of building the Memory Operator sub-model is:

  1. Support local-only deployment, making it convenient to use MemOS in restricted environments (e.g., scenarios where internet access is unavailable).
  2. Perform memory operations at lower cost and higher speed, while maintaining strong system performance.

The first Memory Operator model is MemReader-4B, which is derived from a fine-tuned version of Qwen3-4B. It has been further trained using supervised fine-tuning on both human-annotated and model-generated data, achieving high performance in memory extraction tasks.

MemReader-4B Features:

  • Type: Causal Language Models
  • Training Stage: Supervised Finetune
  • Supported Languages: en, zh
  • Number of Parameters: 4B
  • Context Length: 32,768

Highlights

  • Faster and more accurate memory extraction model
  • Supports memory extraction: MemReader-4B supports extracting memories from both conversations and documents, producing high-quality conversation summaries and document snippet summaries.
  • Excellent system performance: With only a 4B parameter size, it supports local deployment on most machines and outperforms GPT-4o-mini.
  • Multilingual support: Supports memory extraction in both Chinese and English.

Performance

Evaluation results on Locomo using memories extracted by different models in MemOS:

ModelOverallTemporal ReasoningMulti HopSingle HopOpen Domain
Qwen3-32B0.76170.77880.64530.82040.5312
Qwen3-14B0.73700.68220.66310.80020.5833
MemReader-4B0.73480.79020.61460.77640.5381
Qwen3-4B0.54540.25750.51180.67390.4896
GPT-4o-mini0.72530.73210.64300.78440.5521

By replacing your open-source model with MemReader-4B, you can achieve the same memory extraction performance while saving over 70% in resource consumption (4B vs 14B)!


Usage

MemOS Usage

You can easily use our trained MemReader model for memory extraction in MemOS by configuration.

Install MemOS via pip

pip install MemoryOS

Initialize a MemReader and Extract Memory

from memos.configs.mem_reader import SimpleStructMemReaderConfig
from memos.mem_reader.simple_struct import SimpleStructMemReader

config = SimpleStructMemReaderConfig(
    **{
        "llm": {
            "backend": "huggingface",
            "config": {
                "model_name_or_path": "MemTensor/MemReader-4B",
                "temperature": 0.6,
                "max_tokens": 6000,
                "top_p": 0.95,
                "top_k": 20,
            },
        },
        "embedder": {
            "backend": "ollama",
            "config": {"model_name_or_path": "nomic-embed-text:latest"},
        },
        "chunker": {
            "backend": "sentence",
            "config": {
                "tokenizer_or_token_counter": "gpt2",
                "chunk_size": 512,
                "chunk_overlap": 128,
                "min_sentences_per_chunk": 1,
            },
        },
        "remove_prompt_example": True,
    }
)

reader = SimpleStructMemReader(config)

chat_data = [
    [
        {
            "role": "user",
            "chat_time": "June 26, 2025 at 3:00 PM",
            "content": "Hi Jerry! Yesterday at 3 PM I had a meeting with my team about the new project.",
        },
        {
            "role": "assistant",
            "chat_time": "June 26, 2025 at 3:00 PM",
            "content": "Oh Tom! Do you think the team can finish by December 15?",
        },
        {
            "role": "user",
            "chat_time": "June 26, 2025 at 3:00 PM",
            "content": "I’m worried. The backend won’t be done until December 10, so testing will be tight.",
        },
        {
            "role": "assistant",
            "chat_time": "June 26, 2025 at 3:00 PM",
            "content": "Maybe propose an extension?",
        },
        {
            "role": "user",
            "chat_time": "June 26, 2025 at 4:21 PM",
            "content": "Good idea. I’ll raise it in tomorrow’s 9:30 AM meeting—maybe shift the deadline to January 5.",
        },
    ]
]
with open("tmp.txt", "w") as f:
    f.write(
        "Lou Henry Hoover (March 29, 1874 – January 7, 1944) was an American philanthropist, geologist, and the first lady of the United States from 1929 to 1933 as the wife of President Herbert Hoover. She was active in community organizations and volunteer groups throughout her life, including the Girl Scouts of the USA, which she led from 1922 to 1925 and from 1935 to 1937. Throughout her life, Hoover supported women's rights and women's independence. She was a polyglot, fluent in Mandarin and well-versed in Latin, and was the primary translator from Latin to English of the complex 16th-century metallurgy text De re metallica."
    )

chat_memory = reader.get_memory(
    chat_data, type="chat", info={"user_id": "Tom", "session_id": "session1"}
)
doc_memory = reader.get_memory(
    ["tmp.txt"],
    "doc",
    info={
        "user_id": "Tom",
        "session_id": "session2",
    },
)

print(chat_memory)
print(doc_memory)

Huggingface Usage

You can also directly load the model via Huggingface, vLLM, or SGLang and perform memory extraction using the preset templates we have configured.

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "MemTensor/MemReader-4B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")

# prepare the model input
chat_messages = [
    {
        "role": "user",
        "chat_time": "June 26, 2025 at 3:00 PM",
        "content": "Hi Jerry! Yesterday at 3 PM I had a meeting with my team about the new project.",
    },
    {
        "role": "assistant",
        "chat_time": "June 26, 2025 at 3:00 PM",
        "content": "Oh Tom! Do you think the team can finish by December 15?",
    },
    {
        "role": "user",
        "chat_time": "June 26, 2025 at 3:00 PM",
        "content": "I’m worried. The backend won’t be done until December 10, so testing will be tight.",
    },
    {
        "role": "assistant",
        "chat_time": "June 26, 2025 at 3:00 PM",
        "content": "Maybe propose an extension?",
    },
    {
        "role": "user",
        "chat_time": "June 26, 2025 at 4:21 PM",
        "content": "Good idea. I’ll raise it in tomorrow’s 9:30 AM meeting—maybe shift the deadline to January 5.",
    },
]
doc_message = "Lou Henry Hoover (March 29, 1874 – January 7, 1944) was an American philanthropist, geologist, and the first lady of the United States from 1929 to 1933 as the wife of President Herbert Hoover. She was active in community organizations and volunteer groups throughout her life, including the Girl Scouts of the USA, which she led from 1922 to 1925 and from 1935 to 1937. Throughout her life, Hoover supported women's rights and women's independence. She was a polyglot, fluent in Mandarin and well-versed in Latin, and was the primary translator from Latin to English of the complex 16th-century metallurgy text De re metallica."
chat_text = tokenizer.apply_chat_template(
    chat_messages,
    tokenize=False,
    add_generation_prompt=True,
    extract_chat_memory=True,
    enable_think=False,
)
doc_text = tokenizer.apply_chat_template(
    doc_message,
    tokenize=False,
    add_generation_prompt=True,
    extract_doc_memory=True,
    enable_think=False,
)
print(chat_text, doc_text)

model_inputs = tokenizer(
    [chat_text, doc_text], return_tensors="pt", padding=True, padding_side="left"
).to(model.device)
generated_ids = model.generate(**model_inputs, max_new_tokens=2000)
chat_output_ids = generated_ids[0][len(model_inputs.input_ids[0]) :].tolist()
doc_output_ids = generated_ids[1][len(model_inputs.input_ids[1]) :].tolist()
chat_content = tokenizer.decode(chat_output_ids, skip_special_tokens=True).strip("\n")
doc_content = tokenizer.decode(doc_output_ids, skip_special_tokens=True).strip("\n")

print("chat memory:", chat_content)
print("doc memory:", doc_content)

Prompt for chat memory extraction

You are a memory extraction expert.

Your task is to extract memories from the perspective of user, based on a conversation between user and assistant. This means identifying what user would plausibly remember — including their own experiences, thoughts, plans, or relevant statements and actions made by others (such as assistant) that impacted or were acknowledged by user.

Please perform:
1. Identify information that reflects user's experiences, beliefs, concerns, decisions, plans, or reactions — including meaningful input from assistant that user acknowledged or responded to.
2. Resolve all time, person, and event references clearly:
   - Convert relative time expressions (e.g., “yesterday,” “next Friday”) into absolute dates using the message timestamp if possible.
   - Clearly distinguish between event time and message time.
   - If uncertainty exists, state it explicitly (e.g., “around June 2025,” “exact date unclear”).
   - Include specific locations if mentioned.
   - Resolve all pronouns, aliases, and ambiguous references into full names or identities.
   - Disambiguate people with the same name if applicable.
3. Always write from a third-person perspective, referring to user as
"The user" or by name if name mentioned, rather than using first-person ("I", "me", "my").
For example, write "The user felt exhausted..." instead of "I felt exhausted...".
4. Do not omit any information that user is likely to remember.
   - Include all key experiences, thoughts, emotional responses, and plans — even if they seem minor.
   - Prioritize completeness and fidelity over conciseness.
   - Do not generalize or skip details that could be personally meaningful to user.

Return a single valid JSON object with the following structure:

{
  "memory list": [
    {
      "key": <string, a unique, concise memory title>,
      "memory_type": <string, Either "LongTermMemory" or "UserMemory">,
      "value": <A detailed, self-contained, and unambiguous memory statement — written in English if the input conversation is in English, or in Chinese if the conversation is in Chinese>,
      "tags": <A list of relevant thematic keywords (e.g., ["deadline", "team", "planning"])>
    },
    ...
  ],
  "summary": <a natural paragraph summarizing the above memories from user's perspective, 120–200 words, same language as the input>
}

Language rules:
- The `key`, `value`, `tags`, `summary` fields must match the language of the input conversation.
- Keep `memory_type` in English.

Conversation:
${conversation}

Your Output:

Prompt for doc extraction

You are an expert text analyst for a search and retrieval system. Your task is to process a document chunk and generate a single, structured JSON object.
The input is a single piece of text: `[DOCUMENT_CHUNK]`.
You must generate a single JSON object with two top-level keys: `summary` and `tags`.
1. `summary`:
   - A dense, searchable summary of the ENTIRE `[DOCUMENT_CHUNK]`.
   - The purpose is for semantic search embedding.
   - A clear and accurate sentence that comprehensively summarizes the main points, arguments, and information within the `[DOCUMENT_CHUNK]`.
   - The goal is to create a standalone overview that allows a reader to fully understand the essence of the chunk without reading the original text.
   - The summary should be **no more than 50 words**.
2. `tags`:
   - A concise list of **3 to 5 high-level, summative tags**.
   - **Each tag itself should be a short phrase, ideally 2 to 4 words long.**
   - These tags must represent the core abstract themes of the text, suitable for broad categorization.
   - **Crucially, prioritize abstract concepts** over specific entities or phrases mentioned in the text. For example, prefer "Supply Chain Resilience" over "Reshoring Strategies".

Here is the document chunk to process:
`[DOCUMENT_CHUNK]`
{chunk_text}

Produce ONLY the JSON object as your response.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen3ForCausalLM
Ревизия весов
a25d7fa

0 моделей