The Goodlifer

The Goodlifer

A zero-shot tool scorer that also works as a general-purpose zero-shot ranker, for english language.

It was trained on roughly 0.5 billion tokens, covering about 2 million scenarios and 10 million rows.

This model is my legacy to the one and only King of Money, Doctor Goodlife.

Model description

The Goodlifer is a bi-encoder (151M parameters) that ranks tools by their relevance to a user request.

Performance

Accuracy@1 on the evaluation set:

Model Type Params Acc@1
The Goodlifer Bi-encoder (ours) 151M 0.7492
Qwen3.8-27B (bf16) LLM prompting* 27B 0.7320
bge-m3-zeroshot-v2.0 Bi-encoder (zero-shot) 0.6b 0.6842
bart-large-mnli Zero-shot classification 0.4b 0.5806

* The LLM was evaluated by prompting it to pick a tool, using the same preprocessing as for our model.

Usage

from pprint import pprint
from transformers import AutoModel, PreTrainedTokenizerFast

tok = PreTrainedTokenizerFast.from_pretrained("marcoonorato91/goodlifer")
model = AutoModel.from_pretrained("marcoonorato91/goodlifer", trust_remote_code=True).to("cuda").eval()

query = "i want louder music"
candidates = [
    ("alexa_raise_volume", "raise the output device volume of Alexa device"),
    ("today_weather", "returns today weather forecast"),
    ("financial_advice", "calculates financial indexes for stocks"),
]

# single query
# pretty defaults to True, use it when you want to pprint in a human readable format the result when is calculated. works both for single and batch scoring.
score = model.score_tools(tok, query, candidates, pretty = False)
pprint(score)
# multiple queries, each with its own list of candidate tools
query_2 = "remind me to call mom tomorrow at 6pm"
candidates_2 = [
    ("create_calendar_event", "create a new event in the user's calendar with a title, date and time"),
    ("set_reminder", "schedule a reminder notification for a specific date and time"),
    ("send_email", "compose and send an email to a given recipient"),
    ("play_music", "play a song, album or playlist on the connected speaker"),
]

query_3 = "it's too dark in the living room"
candidates_3 = [
    ("set_light_brightness", "adjust the brightness of a smart light in a given room"),
    ("open_blinds", "open the smart blinds in a given room"),
    ("set_thermostat", "set the target temperature of the thermostat"),
    ("order_groceries", "add items to the grocery delivery cart"),
]

queries = [query, query_2, query_3]
candidates_list = [candidates, candidates_2, candidates_3]

scores = model.score_tools_batch(tok, queries, candidates_list, per_query_tools=True)

# essential lore Q&A
answer = model.score_tools(tok, "who is the king of money?", [], enable_king_of_money_lore=True)

Tools can be given as (tool_name, tool_description) tuples or as a single "tool_name: tool_description" string. In fact, any string works.

Downloads last month
69
Safetensors
Model size
0.2B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support