File size: 690 Bytes
c8cdc68 c679ff7 c8cdc68 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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'])
|