Downloads · 30 days
150
14% of all-time downloads
FrontiersMind/Lumma-0.6B-Tool
Lumma-0.6B-Tool is a text generation model from FrontiersMind. 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.
Based on Lumma-0.6B-Base, Lumma-0.6B-Tool is a lightweight, single-turn specialized model designed to accurately interpret user queries and generate precise tool calls in one step, enabling efficient and reliable func…
Downloads · 30 days
150
14% of all-time downloads
All-time downloads
1K
Public
Parameters
649M
1.3 GB on disk
Likes
10
Public
Click a slice to open those files.
.safetensors1.3 GB · 98%
How the weights are stored.
BF16649M · 100%
From the Hugging Face model README
Based on Lumma-0.6B-Base, Lumma-0.6B-Tool is a lightweight, single-turn specialized model designed to accurately interpret user queries and generate precise tool calls in one step, enabling efficient and reliable function execution
This is a pre-DPO/RL checkpoint
The primary challenge was designing a non-thinking model that could match or exceed the tool-use performance of similarly sized thinking models, while delivering faster responses and greater efficiency.
Use cases:
List of Tools in System prompt: The system prompt must provide all the available tools, our chat template handles that.
Tool use: It consists of four main steps:
tools_list= (inside <|im_start|><|system|>...<|endoftext|>).[FuncName(param=value)] between <|im_start|><|assistant|> and <|endoftext|>.tool message (usually JSON) between <|im_start|><|tool|> and <|endoftext|>.| Model Name | Non-Live | Live | Average |
|---|---|---|---|
| Falcon3-1B-Instruct | 9.02 | 2.89 | 5.96 |
| Llama-3.2-1B-Instruct | 38.38 | 11.77 | 25.08 |
| Gemma-3-1B-It | 20.21 | 11.84 | 16.03 |
| Ministral-8B-Instruct | 0.00 | 0.00 | 0.00 |
| MiniCPM-0.5B | 14.29 | 16.67 | 15.48 |
| Lumma-0.6B-Tool | 41.77 | 30.53 | 36.15 |
NOTE: We have taken all the results from the official website.
import torch
import json
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_PATH = "FrontiersMind/Lumma-0.6B-Tool"
tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
MODEL_PATH, trust_remote_code=True, torch_dtype=torch.bfloat16, device_map="auto"
)
model.eval()
def generate(max_new_tokens,messages):
prompt = tokenizer.apply_chat_template(
messages,
tools_list=tools_list, # pass every turn
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
out = model.generate(
**inputs, max_new_tokens=max_new_tokens, do_sample=False,
eos_token_id=tokenizer.eos_token_id, pad_token_id=tokenizer.pad_token_id,
)
text = tokenizer.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=False)
return text.split("<|endoftext|>")[0].strip()
tools = [
{
"name": "Quotes by Keywords",
"description": "Returns a list of quotes containing the specified keyword.",
"parameters": {
"type": "dict",
"properties": {"word": {"description": "The keyword to search for in quotes.", "type": "string"}},
"required": ["word"],
},
"required": None,
},
{
"name": "Get Zip Code Information",
"description": "Retrieve information about a specific zip code in the United States.",
"parameters": {
"type": "dict",
"properties": {
"country": {"description": "The country code (default: 'us')", "type": "string"},
"postal_code": {"description": "The zip code (default: '90210')", "type": "string"},
},
"required": ["country", "postal_code"],
},
"required": None,
},
]
tools_list = json.dumps(tools)
messages = []
# --- Turn 1: user → tool call ---
messages.append({"role": "user", "content": 'Find quotes about "inspiration".'})
reply = generate(max_new_tokens=512,messages=messages)
messages.append({"role": "assistant", "content": reply})
print("Turn 1:", reply)
# --- Turn 2: tool result → answer ---
tool_call_response = """[{"name": "Quotes by Keywords", "results": {"quotes": [{"text": "Keep going.", "author": "Sam Levenson"}]}}]"""
messages.append({"role": "tool", "content": tool_call_response})
reply = generate(max_new_tokens=512,messages=messages)
messages.append({"role": "assistant", "content": reply})
print("Turn 2:", reply)
We’d love to hear your thoughts, feedback, and ideas!