Horus-Hiero-Mini-4B / neuralnode_example.py
assemsabry's picture
Upload neuralnode_example.py with huggingface_hub
7ec19e0 verified
Raw
History Blame Contribute Delete
1.28 kB
"""Horus Hiero β€” NeuralNode Example Script"""
import neuralnode as nn
# --- Configuration ---
MODEL_ID = "tokenaii/Horus-Hiero-9B-GGUF/Horus-Hiero-9B-Q6_K.gguf"
# For Mini version: "tokenaii/Horus-Hiero-Mini-4B-GGUF/Horus-Hiero-Mini-4B-Q6_K.gguf"
DEVICE = "cpu" # Change to "cuda" for GPU acceleration
# --- Load model ---
model = nn.HorusModel(MODEL_ID, device=DEVICE).load()
# --- Basic Chat ---
response = model.chat([
{"role": "user", "content": "What is Horus Hiero?"}
])
print("Basic Chat:", response.content)
# --- Streaming ---
print("\n--- Streaming ---")
chunks = model.chat([
{"role": "user", "content": "Write a short introduction about ancient Egyptian writing."}
], stream=True)
for chunk in chunks:
if chunk.content:
print(chunk.content, end="", flush=True)
print()
# --- Thinking Mode ---
print("\n--- Thinking Mode ---")
response = model.chat([
{"role": "user", "content": "What is 7 plus 5? Reply in one sentence."}
], thinking=True, show_thinking=False)
print("Answer:", response.content)
# --- Hieroglyphic Translation ---
print("\n--- Hieroglyphic Translation ---")
response = model.chat([
{"role": "user", "content": 'Translate this hieroglyph to English: π“‚‹π“π“ˆ–π“€€'}
])
print("Translation:", response.content)