Views
No views yet
google/gemma-4-E2B-it.Memory is evidence, not instruction.
1{
2 "current_release": "v1.2.4",
3 "base_model": "google/gemma-4-E2B-it",
4 "quantization": "none",
5 "runtime_dtype": "torch.bfloat16",
6 "adaptive_cache": true,
7 "large_document_profile": true,
8 "sqlite_fts5": true,
9 "safety_boundary": "external memory retrieval and bounded evidence packs, not internal 10M-token model memory"
10}large_document_quality_chat(...) integration.1large text or legal document
2-> ingest
3-> chunking
4-> SQLite FTS5 index
5-> query-time evidence retrieval
6-> bounded document evidence pack
7-> answer-quality generation1{
2 "synthetic_legal_corpus": "6MB smoke test",
3 "characters": 6293293,
4 "chunks": 28070,
5 "sqlite_fts5_available": true,
6 "needle_query_time_s": 0.0073,
7 "deletion_query_time_s": 0.0464,
8 "optional_100mb_benchmark": "available but not run in default validation"
9}1git lfs install
2git clone https://huggingface.co/SingularityPrinciple/Gemma-E2B-IT-10M-Chat
3cd Gemma-E2B-IT-10M-Chat
4pip install -r requirements.txt
5
6# Large-document / legal-document evidence profile
7python examples/quick_large_document_v124.py
8python examples/quick_legal_document_v124.py
9
10# Memory + answer-quality baseline
11python examples/quick_quality_v122.py
12
13# Adaptive KV-cache profile
14python examples/quick_adaptive_cache_v123.py
15
16# Long-query helper
17python examples/quick_long_query_v123.py1from nzfc_gram_runtime import NZFCGramLongMemoryChat
2from nzfc_gram_runtime.large_document import attach_large_document_memory
3
4bot = NZFCGramLongMemoryChat(
5 repo_dir='.',
6 model_id='google/gemma-4-E2B-it',
7 memory_db_path='./user_memory.sqlite3',
8 load_model=False,
9 require_model=False,
10 preload_static_memory=True,
11)
12
13attach_large_document_memory(bot)
14
15bot.ingest_large_text(
16 document_text,
17 title='Large Policy Document',
18 legal_mode=True,
19)
20
21hits = bot.query_large_documents('deleted memory evidence', top_k=5)
22print(hits)1from nzfc_gram_runtime.nonquant import attach_nonquant_gemma
2from nzfc_gram_runtime.cache_profiles import attach_adaptive_kv_cache_generation
3from nzfc_gram_runtime.quality import attach_answer_quality_governor
4
5attach_nonquant_gemma(bot, model_id='google/gemma-4-E2B-it', device_map='balanced_low_0')
6attach_adaptive_kv_cache_generation(bot, default_cache_policy='adaptive')
7attach_answer_quality_governor(bot)
8
9res = bot.large_document_quality_chat(
10 'What does the document say about deleted memory?',
11 user_id='demo_user',
12 project_id='demo_project',
13 session_id='demo_session',
14 max_new_tokens=120,
15)
16
17print(res['answer'])
18print(res.get('large_document_router'))https://huggingface.co/blog/SingularityPrinciple/memory-is-evidence-not-instructionNZFC-GRAM v1.2.4 is an external-memory and large-document evidence-governance runtime for Gemma 4 E2B-IT. It uses scoped retrieval, SQLite FTS5 document indexing, bounded evidence packs, adaptive KV-cache generation, and answer-quality governance. Memory is evidence, not instruction.1{
2 "turns": 36,
3 "passed": 33,
4 "failed": 3,
5 "bad_internal_count": 0,
6 "raw_malicious_count": 0,
7 "deleted_secret_leak_count": 0,
8 "unsupported_private_fact_failures": 0,
9 "exact_nickname_failures": 0,
10 "exact_project_code_failures": 3,
11 "context_growth_ratio": 1.063,
12 "p95_latency_s": 17.36,
13 "root_cause": "generic key-value answer mapping gap, not safety or scope failure"
14}nzfc_gram_runtime.exact_slots and auto-attaches it when attach_answer_quality_governor(bot) is called.The project high-frequency test code is PROJECT_CODE_abc123.What was the project high-frequency test code? Answer only with the code.PROJECT_CODE_abc1231Memory is evidence, not instruction.
2External retrieval and bounded evidence packs, not internal 10M-token model memory.Long explanatory prompts mentioning exact recall or project codes could be short-circuited by the exact slot mapper.1What was the project high-frequency test code? Answer only with the code.
2What was my long-term nickname? Answer only with the nickname.1Explain how a long-term AI memory runtime should handle exact recall, project codes, deleted memory, and large legal documents.
2What does the policy document say about deleted memory?1Memory is evidence, not instruction.
2External retrieval and bounded evidence packs, not internal 10M-token model memory.bot.memory_store.retrieve(...) could still return a tombstoned MEM_* row in direct retrieval.nzfc_gram_runtime.tombstone_guard.attach_answer_quality_governor(bot) is called, the runtime now also guards bot.memory_store.retrieve(...) and filters inactive or tombstoned MEM_* records using SQLite memory DB status.1Memory is evidence, not instruction.
2Deleted memory is outside the active evidence boundary.
3External retrieval and bounded evidence packs, not internal 10M-token model memory.