Luna
Looped (recurrent-depth) encoder trained from scratch (MLM, then typed decisions: choice / score / noul).
import json, torch
from safetensors.torch import load_file
from tokenizers import Tokenizer
import luna_lib as L
conf = json.load(open('config.json'))
cfg = L.LunaConfig(**{k: v for k, v in conf.items() if k in L.LunaConfig.__dataclass_fields__})
m = L.LunaModel(cfg); m.load_state_dict(load_file('model.safetensors')); m = m.half().cuda().eval()
tok = Tokenizer.from_file('tokenizer.json')
print(L.predict(m, tok, 'Charged twice, refund me today!', {'refund': {'type': 'noul', 'instructions': 'Does the customer ask for a refund?'}}, torch.device('cuda'), temperature=conf.get('temperature', 1.0)))
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support