Downloads · 30 days
15
19% of all-time downloads
Arojit/orbi-1b
orbi-1b is a text generation model from Arojit. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
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.
Downloads · 30 days
15
19% of all-time downloads
All-time downloads
81
Public
Parameters
1.1B
2.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.2 GB · 100%
From the Hugging Face model README
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.
The model can generate calls for the following functions:
smile(), cry(), move_hands(), dance()tell_news(), tell_story()whats_your_name(), who_am_i()answer_arithmetic(), english_learning()pip install transformers torch peft
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_dir = "your-username/orbi-1b"
device = "cuda" if torch.cuda.is_available() else "cpu"
tokenizer = AutoTokenizer.from_pretrained(model_dir)
model = AutoModelForCausalLM.from_pretrained(
model_dir,
torch_dtype=torch.bfloat16,
device_map="auto"
)
system_prompt = """You are Orbi's brain.
Respond with one or more <tool_call> JSON blocks, in the exact order the user requests actions.
that calls the best tool for the user's request. Do not write stories yourself.
Do not summarize news yourself. Map synonyms to the tool argument enums.
If parameters are missing, pick sensible defaults. Keep outputs terse.
Available tools and enums:
- smile() -> {}
- cry() -> {}
- move_hands(direction ∈ {left,right,up,down,wave}, speed ∈ {slow,normal,fast})
- dance(style ∈ {hiphop,ballet,robot,random}, duration_sec ∈ [10..120])
- tell_news(topic: string)
- tell_story(topic: string, tone ∈ {wholesome,funny,dramatic,spooky,random}, length ∈ {short,medium,long})
"""
user_input = "Wave your hands quickly and smile"
prompt = f"<|system|>\n{system_prompt}\n<|user|>\n{user_input}\n<|assistant|>\n"
inputs = tokenizer(prompt, return_tensors="pt").to(device)
outputs = model.generate(
**inputs,
max_new_tokens=192,
temperature=0.0,
do_sample=False
)
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=False)
print(response)
The model generates responses in the following format:
<tool_call>
{"name": "move_hands", "arguments": {"direction": "wave", "speed": "fast"}}
</tool_call>
<tool_call>
{"name": "smile", "arguments": {}}
</tool_call>
import json
import re
def parse_tool_calls(text):
pattern = r"<tool_call>\s*(\{.*?\})\s*</tool_call>"
matches = re.findall(pattern, text, re.DOTALL)
tools = []
for match in matches:
try:
tools.append(json.loads(match))
except:
continue
return tools
tools = parse_tool_calls(response)
print(tools)
# [{'name': 'move_hands', 'arguments': {'direction': 'wave', 'speed': 'fast'}},
# {'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:
@misc{orbi-1b,
title={Orbi-1B: A Fine-tuned TinyLlama for Function Calling},
author={Arojit Ghosh},
year={2025},
howpublished={\url{https://huggingface.co/Arojit/orbi-1b}}
}
Built on top of TinyLlama-1.1B-Chat-v1.0 by the TinyLlama team.