File size: 1,508 Bytes
3786156
 
a1164c3
687620d
3786156
 
 
 
687620d
5027724
 
 
687620d
 
 
 
 
5027724
 
 
 
687620d
3eced3a
 
 
 
 
 
 
 
 
 
 
3786156
 
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
from __future__ import annotations

from aethon_open_structure import AethonOpenStructureModel


if __name__ == "__main__":
    model = AethonOpenStructureModel.from_hub("OkeyMetaLtd/Aethon-N1-Base-Open-Structure")
    try:
        prompts = [
            "Amina used to live in Lagos, but now she lives in Accra. What changed about her location?",
            "Tell me the story of Zainab after she misses the last train and discovers the map was outdated.",
            "If the meeting conflicts with lunch and the report must finish before the client call, what should happen first and what should be rescheduled?",
        ]
        for prompt in prompts:
            reply = model.ask(prompt)
            print(f"Q: {prompt}")
            print(f"A: {reply.text}")
            if reply.reasoning:
                print("reasoning:")
                for step in reply.reasoning:
                    print(f"  - {step}")
            print()
        instructed = model.ask_messages(
            [
                {"role": "system", "content": "Answer in exactly three sentences and keep each sentence grounded."},
                {
                    "role": "user",
                    "content": "Take this carefully and answer each part in one flowing response: where is Amina, what does regional launch depend on, and what is your tokenizer?",
                },
            ]
        )
        print("Instruction-following example:")
        print(instructed.text)
    finally:
        model.close()