Gemma-E2B-IT-10M-Chat / examples /quick_nonquant_bf16.py
SingularityPrinciple's picture
Finalize English-only public surface for NZFC-GRAM v1.2.2
c679ff7 verified
Raw
History Blame Contribute Delete
690 Bytes
from nzfc_gram_runtime import NZFCGramLongMemoryChat
from nzfc_gram_runtime.nonquant import attach_nonquant_gemma, patch_generation_use_cache_false
bot = NZFCGramLongMemoryChat(repo_dir='.', load_model=False, require_model=False)
attach_nonquant_gemma(bot, gpu_max_memory_gib=11, device_map='balanced_low_0')
patch_generation_use_cache_false(bot)
out = bot.chat(
'NZFC-GRAM\uc758 \uc7a5\uae30\uae30\uc5b5 \uacbd\uacc4\uac00 \ub0b4\ubd80 context\uc778\uc9c0 \uc678\ubd80 memory retrieval\uc778\uc9c0 \uc124\uba85\ud574\uc918.',
user_id='quick_user',
project_id='quick_project',
session_id='quick_session',
save_turn=False,
max_new_tokens=80,
)
print(out['answer'])