AthelaPerk commited on
Commit
48b9ece
Β·
verified Β·
1 Parent(s): 61365da

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +49 -80
README.md CHANGED
@@ -2,118 +2,87 @@
2
  title: Mnemo v2 - AI Memory System
3
  emoji: 🧠
4
  colorFrom: purple
5
- colorTo: indigo
6
  sdk: gradio
7
  sdk_version: 5.9.1
8
  app_file: app.py
9
  pinned: false
10
  license: mit
11
- short_description: "AI memory with real embeddings & temporal decay"
12
  tags:
13
  - memory
14
  - ai-memory
15
  - llm-memory
16
- - memory-system
17
  - semantic-memory
18
- - long-term-memory
19
- - conversational-memory
20
- - chatbot-memory
21
- - agent-memory
22
- - rag
23
- - retrieval
24
- - semantic-search
25
- - vector-search
26
- - embeddings
27
  - sentence-transformers
28
  - faiss
29
  - hnsw
30
  - temporal-decay
31
- - langchain
32
- - llamaindex
33
  - mem0
34
- - memgpt
35
- - zep
36
  - mcp
37
- - tool
 
 
 
 
38
  ---
39
 
40
- # 🧠 Mnemo v2 - Enhanced Memory for LLMs
41
 
42
- **Production-ready memory system with real embeddings, HNSW search, and temporal decay.**
43
 
44
- ## ✨ Key Features
45
 
46
- | Feature | Implementation |
47
- |---------|----------------|
48
- | **Real Embeddings** | sentence-transformers `all-MiniLM-L6-v2` (384 dim) |
49
- | **Fast Search** | FAISS HNSW index - O(log n) complexity |
50
  | **Temporal Decay** | Ebbinghaus forgetting curve (configurable half-life) |
51
- | **Smart Scoring** | 40% similarity + 30% recency + 30% frequency |
52
- | **Auto Dedup** | ADD/UPDATE detection (0.85 similarity threshold) |
53
- | **Multi-User** | User ID scoping for multi-tenant apps |
 
54
 
55
  ## πŸš€ Quick Start
56
 
57
- ```python
58
- from mnemo_core import MnemoV2
 
 
59
 
60
- memory = MnemoV2(decay_half_life_days=7.0)
61
-
62
- # Add memories
63
- memory.add("User prefers Python for backend development", importance=0.9)
64
- memory.add("Meeting with team every Monday at 10am")
65
-
66
- # Search with relevance scoring
67
- results = memory.search("What programming language does the user prefer?")
68
- for r in results:
69
- print(f"{r['content']} (relevance: {r['relevance_score']:.2f})")
70
- ```
71
-
72
- ## πŸ“Š Architecture
73
 
74
  ```
75
- Input Text ──► Embedding ──► HNSW Index ──► Candidates
76
- (384 dim) (FAISS) β”‚
77
- β–Ό
78
- Relevance Scoring
79
- ─────────────────
80
- β€’ Similarity (40%)
81
- β€’ Recency (30%) ◄── Temporal Decay
82
- β€’ Frequency (30%)
83
- β€’ Importance mult
84
- β”‚
85
- β–Ό
86
- Ranked Results
87
- ```
88
-
89
- ## πŸ”§ Configuration
90
-
91
- ```python
92
- memory = MnemoV2(
93
- decay_half_life_days=7.0, # Memory decay rate
94
- similarity_weight=0.4, # Weight for semantic similarity
95
- recency_weight=0.3, # Weight for recency
96
- frequency_weight=0.3, # Weight for access frequency
97
- update_threshold=0.85, # Similarity for UPDATE vs ADD
98
- max_memories_per_user=10000 # Auto-pruning limit
99
- )
100
  ```
101
 
102
- ## πŸ“ˆ v1 vs v2 Comparison
103
 
104
- | Metric | v1 (Hash) | v2 (Transformer) |
105
- |--------|-----------|------------------|
106
- | Embedding Quality | Poor (hash-based) | Excellent (384-dim semantic) |
107
- | Search Complexity | O(n) linear | O(log n) HNSW |
108
- | Temporal Awareness | None | Ebbinghaus decay |
109
- | Relevance Scoring | Similarity only | Composite (3 factors) |
110
- | Deduplication | None | Auto UPDATE detection |
111
 
112
- ## πŸ”— Links
113
 
114
- - **API Server:** [AthelaPerk/mnemo-mcp](https://huggingface.co/spaces/AthelaPerk/mnemo-mcp)
115
- - **Source Code:** [AthelaPerk/mnemo-memory](https://huggingface.co/AthelaPerk/mnemo-memory)
116
 
117
- ## License
118
 
119
- MIT License
 
2
  title: Mnemo v2 - AI Memory System
3
  emoji: 🧠
4
  colorFrom: purple
5
+ colorTo: blue
6
  sdk: gradio
7
  sdk_version: 5.9.1
8
  app_file: app.py
9
  pinned: false
10
  license: mit
11
+ short_description: AI memory with semantic embeddings & temporal decay
12
  tags:
13
  - memory
14
  - ai-memory
15
  - llm-memory
 
16
  - semantic-memory
 
 
 
 
 
 
 
 
 
17
  - sentence-transformers
18
  - faiss
19
  - hnsw
20
  - temporal-decay
 
 
21
  - mem0
 
 
22
  - mcp
23
+ - rag
24
+ - retrieval
25
+ - embeddings
26
+ - vector-search
27
+ - zerogpu
28
  ---
29
 
30
+ # 🧠 Mnemo v2 - Enhanced Memory System for LLMs
31
 
32
+ Production-ready memory layer for AI applications with **real semantic embeddings**, **O(log n) vector search**, and **temporal decay**.
33
 
34
+ ## ✨ Features
35
 
36
+ | Feature | Description |
37
+ |---------|-------------|
38
+ | **Semantic Embeddings** | `sentence-transformers/all-MiniLM-L6-v2` (384 dimensions) |
39
+ | **Vector Search** | FAISS HNSW index with O(log n) complexity |
40
  | **Temporal Decay** | Ebbinghaus forgetting curve (configurable half-life) |
41
+ | **Relevance Scoring** | Composite: 40% similarity + 30% recency + 30% frequency |
42
+ | **Smart Deduplication** | Automatic UPDATE detection for similar memories |
43
+ | **Multi-User** | Full user_id scoping with per-user indices |
44
+ | **ZeroGPU** | Dynamic H200 GPU allocation for fast inference |
45
 
46
  ## πŸš€ Quick Start
47
 
48
+ 1. **Load Examples**: Click "Load Examples" to populate test memories
49
+ 2. **Search**: Ask semantic queries like "What are the user's preferences?"
50
+ 3. **Add**: Store new memories with importance weights and tags
51
+ 4. **Manage**: List, delete, or clear memories
52
 
53
+ ## πŸ”¬ Architecture
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
  ```
56
+ Query β†’ Sentence-Transformer β†’ 384-dim Embedding
57
+ β”‚
58
+ β–Ό
59
+ FAISS HNSW Index
60
+ (M=32, efSearch=50)
61
+ β”‚
62
+ β–Ό
63
+ Relevance Scoring
64
+ β”œβ”€ 40% Similarity
65
+ β”œβ”€ 30% Recency (decay)
66
+ └─ 30% Frequency
67
+ β”‚
68
+ β–Ό
69
+ Ranked Results
 
 
 
 
 
 
 
 
 
 
 
70
  ```
71
 
72
+ ## πŸ“Š Performance
73
 
74
+ | Metric | Value |
75
+ |--------|-------|
76
+ | Search Latency (GPU) | ~15-30ms |
77
+ | Embedding Dimensions | 384 |
78
+ | Index Type | HNSW Flat |
79
+ | Decay Half-Life | 7 days (configurable) |
 
80
 
81
+ ## πŸ”— Related
82
 
83
+ - **MCP Server**: [AthelaPerk/mnemo-mcp](https://huggingface.co/spaces/AthelaPerk/mnemo-mcp)
84
+ - **Inspired by**: [mem0](https://mem0.ai)
85
 
86
+ ## πŸ“œ License
87
 
88
+ MIT License - free for commercial use.