File size: 1,277 Bytes
7ec19e0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""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)