nielsr HF Staff commited on
Commit
536c2b7
·
verified ·
1 Parent(s): fbbd066

Add model card and metadata

Browse files

This PR adds a comprehensive model card for MemoBrain-8B, including:
- Metadata for `pipeline_tag` (`text-generation`) and `library_name` (`transformers`).
- A link to the paper: [MemoBrain: Executive Memory as an Agentic Brain for Reasoning](https://huggingface.co/papers/2601.08079).
- A link to the official GitHub repository.
- Detailed sample usage for both vLLM deployment and Python integration based on the provided documentation.

Files changed (1) hide show
  1. README.md +84 -3
README.md CHANGED
@@ -1,3 +1,84 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: transformers
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - memory
7
+ - agent
8
+ - reasoning
9
+ - tool-use
10
+ ---
11
+
12
+ # MemoBrain-8B: Executive Memory as an Agentic Brain for Reasoning
13
+
14
+ MemoBrain is an executive memory model for tool-augmented agents that constructs a dependency-aware memory over reasoning steps, capturing salient intermediate states and their logical relations. Operating as a co-pilot alongside a reasoning agent, MemoBrain organizes reasoning progress without blocking execution and actively manages the working context.
15
+
16
+ - **Paper:** [MemoBrain: Executive Memory as an Agentic Brain for Reasoning](https://huggingface.co/papers/2601.08079)
17
+ - **Repository:** [https://github.com/qhjqhj00/MemoBrain](https://github.com/qhjqhj00/MemoBrain)
18
+
19
+ ## Overview
20
+
21
+ MemoBrain introduces an **executive memory system** that acts as a cognitive co-pilot for reasoning agents. Unlike traditional approaches that passively accumulate context, MemoBrain actively manages the reasoning trajectory by:
22
+
23
+ 1. **Memory Construction**: Building a dependency-aware graph of reasoning steps.
24
+ 2. **Flush**: Removing invalid or redundant reasoning nodes.
25
+ 3. **Fold**: Compressing completed sub-trajectories into compact summaries.
26
+ 4. **Context Management**: Maintaining a fixed-size, high-salience reasoning backbone.
27
+
28
+ ## Usage
29
+
30
+ ### Deploy with vLLM
31
+
32
+ The model can be served using [vLLM](https://github.com/vllm-project/vllm) to create an OpenAI-compatible API endpoint:
33
+
34
+ ```bash
35
+ pip install vllm
36
+ vllm serve TommyChien/MemoBrain-8B --port 8002
37
+ ```
38
+
39
+ ### Python API
40
+
41
+ After installing the `memobrain` package from the [official repository](https://github.com/qhjqhj00/MemoBrain), you can use the model as follows:
42
+
43
+ ```python
44
+ import asyncio
45
+ from memobrain import MemoBrain
46
+
47
+ async def main():
48
+ # Step 1: Initialize MemoBrain
49
+ # Note: vLLM doesn't require an actual API key
50
+ memory = MemoBrain(
51
+ api_key="EMPTY",
52
+ base_url="http://localhost:8002/v1",
53
+ model_name="TommyChien/MemoBrain-8B"
54
+ )
55
+
56
+ # Step 2: Initialize memory with your task
57
+ memory.init_memory("Solve a complex research problem")
58
+
59
+ # Step 3: Memorize conversation interactions
60
+ # Recommended unit is an episode: thinking -> tool call -> tool response
61
+ await memory.memorize([
62
+ {"role": "assistant", "content": "I need to search for information about Paris..."},
63
+ {"role": "user", "content": "Search results: Paris is the capital of France..."}
64
+ ])
65
+
66
+ # Step 4: Optimize memory (flush invalid steps & fold completed sub-trajectories)
67
+ optimized_messages = await memory.recall()
68
+ print(f"Memory optimized: {len(optimized_messages)} messages")
69
+
70
+ asyncio.run(main())
71
+ ```
72
+
73
+ ## Citation
74
+
75
+ If you find MemoBrain useful for your research, please cite:
76
+
77
+ ```bibtex
78
+ @article{memobrain2026,
79
+ title={MemoBrain: Executive Memory as an Agentic Brain for Reasoning},
80
+ author={Hongjin Qian, Zhao Cao, Zheng Liu},
81
+ journal={arXiv preprint arXiv:2601.08079},
82
+ year={2026}
83
+ }
84
+ ```