File size: 754 Bytes
47428cf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Quick-start: Load KLINEXA-EL1
import torch, json
from tokenizers import Tokenizer

# 1. Load config
with open('config.json', 'r') as f:
    config = json.load(f)

# 2. Load tokenizer
tok = Tokenizer.from_file('klinexa_tokenizer.json')

# 3. Load model (requires model architecture definition)
# ckpt = torch.load('klinexa_el1_model.pt', map_location='cpu')
# model.load_state_dict(ckpt['model_state_dict'])

# 4. Load memory & knowledge graph (if available)
import os
if os.path.exists('klinexa_memory.json'):
    with open('klinexa_memory.json', 'r') as f:
        memory = json.load(f)
if os.path.exists('klinexa_knowledge_graph.json'):
    with open('klinexa_knowledge_graph.json', 'r') as f:
        kg = json.load(f)

print("KLINEXA-EL1 loaded!")