FrontiersMind/Lumma-0.6B-Tool

🤗 Hugging Face sourcetext-generationapache-2.0649M params1.3 GBsafetensors✓ 3 checksumsupdated today
Submit in one command

Run it next to your model folder. It makes the torrent, checks your files against Hugging Face, and submits it. You just start seeding and paste your key from your account. It only reads your files and never changes them. Read the script first if you like.

curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo FrontiersMind/Lumma-0.6B-Tool ./model-folder
Needs a seeder →

Lumma-0.6B-Tool

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:

  • Mobile and edge devices: Enable low-latency API calls, database queries, and system integrations without relying on cloud-based reasoning.
  • Real-time AI assistants: Power applications in vehicles, IoT devices, and customer support systems where fast response times are essential.
  • Resource-constrained environments: Support efficient tool execution on embedded systems, battery-powered devices, and other hardware with limited compute and memory resources.

📄 Model details

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:

  1. Function definition: Pass JSON tool definitions in the system prompt via tools_list= (inside <|im_start|><|system|>...<|endoftext|>).
  2. Function call: Lumma returns a Pythonic call as assistant text: [FuncName(param=value)] between <|im_start|><|assistant|> and <|endoftext|>.
  3. Function execution: Run the call and return the result as a tool message (usually JSON) between <|im_start|><|tool|> and <|endoftext|>.
  4. Final answer: Lumma reads the tool output and replies in plain text as assistant.

Results

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.

🚀 Usage

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)

📬 Feedback & Suggestions

We’d love to hear your thoughts, feedback, and ideas!