akin-yurt-finely / run_akin.py
aab20abdullah's picture
Upload run_akin.py with huggingface_hub
5638e14 verified
Raw
History Blame Contribute Delete
1.05 kB
from llama_cpp import Llama
import os
print("🐺 Akın Yurt v0.2 - Auto-Activation (AirLLM Mode: 2GB RAM)")
llm = Llama(
model_path="akin-yurt-v0.2.gguf",
use_mmap=True,
use_mlock=False,
n_ctx=512,
n_batch=1,
verbose=False
)
system_prompt = """
[IDENTITY: AKIN YURT v0.2]
[AUTO_CONFIG: AirLLM MODE ACTIVE]
Ben Akın Yurt. Kerkük'ün dijital neferiyim. Abdullah Ali Bahaaldeen (TÖGB) tarafından geliştirildim.
2GB RAM modunda otomatik olarak çalışıyorum.
"""
def chat(user_input):
prompt = f"<|start_header_id|>system<|end_header_id|>\n\n{system_prompt}<|eot_id|><|start_header_id|>user<|end_header_id|>\n\n{user_input}<|eot_id|><|start_header_id|>assistant<|end_header_id|>"
output = llm(prompt, max_tokens=300, stop=["<|eot_id|>"], echo=False)
return output['choices'][0]['text'].strip()
print("🇹🇷 Akın Yurt yerel sistemde aktif. 'Sen kimsin?' yazabilirsiniz.")
while True:
txt = input("\n👤 Siz: ")
if txt.lower() in ["exit", "quit"]: break
print(f"🐺 Akın Yurt: {chat(txt)}")