Orbi-1B is a fine-tuned variant of TinyLlama-1.1B-Chat specialized for function calling and robotic assistant interactions. The model is trained to generate structured tool calls in response to natural language commands.
Orbi-1B is designed to act as the "brain" of a robotic assistant named Orbi. It translates natural language user requests into structured JSON tool calls that can be executed by downstream systems.
1 import torch
2 from transformers import AutoTokenizer , AutoModelForCausalLM
3
4 model_dir = "your-username/orbi-1b"
5 device = "cuda" if torch . cuda . is_available ( ) else "cpu"
6
7 tokenizer = AutoTokenizer . from_pretrained ( model_dir )
8 model = AutoModelForCausalLM . from_pretrained (
9 model_dir ,
10 torch_dtype = torch . bfloat16 ,
11 device_map = "auto"
12 )
13
14 system_prompt = """You are Orbi's brain.
15 Respond with one or more <tool_call> JSON blocks, in the exact order the user requests actions.
16 that calls the best tool for the user's request. Do not write stories yourself.
17 Do not summarize news yourself. Map synonyms to the tool argument enums.
18 If parameters are missing, pick sensible defaults. Keep outputs terse.
19
20 Available tools and enums:
21 - smile() -> {}
22 - cry() -> {}
23 - move_hands(direction ∈ {left,right,up,down,wave}, speed ∈ {slow,normal,fast})
24 - dance(style ∈ {hiphop,ballet,robot,random}, duration_sec ∈ [10..120])
25 - tell_news(topic: string)
26 - tell_story(topic: string, tone ∈ {wholesome,funny,dramatic,spooky,random}, length ∈ {short,medium,long})
27 """
28
29 user_input = "Wave your hands quickly and smile"
30 prompt = f"<|system|>\n { system_prompt } \n<|user|>\n { user_input } \n<|assistant|>\n"
31
32 inputs = tokenizer ( prompt , return_tensors = "pt" ) . to ( device )
33 outputs = model . generate (
34 ** inputs ,
35 max_new_tokens = 192 ,
36 temperature = 0.0 ,
37 do_sample = False
38 )
39
40 response = tokenizer . decode ( outputs [ 0 ] [ inputs . input_ids . shape [ 1 ] : ] , skip_special_tokens = False )
41 print ( response )
<tool_call>
{"name": "move_hands", "arguments": {"direction": "wave", "speed": "fast"}}
</tool_call>
<tool_call>
{"name": "smile", "arguments": {}}
</tool_call>
1 import json
2 import re
3
4 def parse_tool_calls ( text ) :
5 pattern = r"<tool_call>\s*(\{.*?\})\s*</tool_call>"
6 matches = re . findall ( pattern , text , re . DOTALL )
7 tools = [ ]
8 for match in matches :
9 try :
10 tools . append ( json . loads ( match ) )
11 except :
12 continue
13 return tools
14
15 tools = parse_tool_calls ( response )
16 print ( tools )
17 # [{'name': 'move_hands', 'arguments': {'direction': 'wave', 'speed': 'fast'}},
18 # {'name': 'smile', 'arguments': {}}]
The model was fine-tuned on a custom dataset of conversational examples mapping natural language commands to structured tool calls in JSONL format.
This model is designed for robotic assistant applications. Users should:
1 @misc{orbi-1b,
2 title={Orbi-1B: A Fine-tuned TinyLlama for Function Calling},
3 author={Arojit Ghosh},
4 year={2025},
5 howpublished={\url{https://huggingface.co/Arojit/orbi-1b}}
6 }