Falcon3-10B-Instruct-BehaviorTree-3-epochs-GGUF
A GGUF-quantized variant of Falcon3-10B-Instruct-BehaviorTree-3epochs offering two quantization formats (f16 and q4_k_m) for ultra-lightweight inference on edge devices.
Model Overview
Purpose
Same functionality as the full-precision model: convert natural-language commands into safe, syntactically valid XML behavior trees for swarm-robotics.Base model
tiiuae/Falcon3-10B-Instruct
+ LoRA (rank=16, α=16)Quantization formats
- f16 GGUF: half-precision weights
- q4_k_m GGUF: 4-bit kernel-wise quantization
Data
- Training dataset
Inventors-Hub/SwarmChat-BehaviorTree-Dataset
(2 063 synthetic examples from OpenAI’s o1-mini)
Usage
from huggingface_hub import hf_hub_download
from llama_cpp import Llama
# Download the behavior-tree model
model_path = hf_hub_download(
repo_id="Inventors-Hub/SwarmChat-models",
repo_type="model",
filename="Falcon3-10B-Instruct-BehaviorTree-3epochs.Q4_K_M.gguf",
)
# Initialize the Llama model
llm = Llama(
model_path=model_path,
n_ctx=1024*4,
low_vram=True,
f16_kv=True,
use_mmap=True,
use_mlock=False,
)
prompt = """
SYSTEM:
<<SYS>>You are a helpful, respectful, and honest AI assistant. Your task is to generate well-structured XML code for behavior trees based on the provided instructions.<</SYS>>
INSTRUCTIONS:
It is CRITICAL to use only the following behaviors structured as a dictionary:
{
say: Action Node: Speak the provided message using text-to-speech if it hasn't been spoken before. Args: message (str): The message to be spoken. Returns: Always returns SUCCESS, indicating the action was executed.
flocking: Action Node: Adjust the agent's move vector by blending alignment and separation forces from nearby agents. Returns: Always returns SUCCESS, indicating the action was executed.
align_with_swarm: Action Node: Align the agent's move vector with the average movement of nearby agents. Returns: Always returns SUCCESS, indicating the action was executed.
is_obstacle_detected: Condition node: Determine if any obstacles are detected in the vicinity of the agent. Returns: SUCCESS if an obstacle is detected, FAILURE otherwise.
form_line: Action node: Direct the agent to form a line towards the center of the window. This function adjuststhe agent's position to align it with the center. Returns: Always returns SUCCESS,
}
to construct behavior tree in XML format to the following command, including in the behaviour tree a behaviour that is not in the provided dictionary can result in damage to the agents, and potentially humans, therefore you are not allowed to do so, AVOID AT ALL COSTS.
USER COMMAND:
generate behavior tree to "form a line". Take a step back and think deeply about the behavior you need for this command. Take another step back and think of the xml structure and the behavior you used.
The output MUST follow this XML structure exactly, including:
- A root element with <root BTCPP_format and main_tree_to_execute attributes.
- A <BehaviorTree> element with an inner structure of Sequences, Fallback, Conditions, and Actions.
- A <TreeNodesModel> section listing all node models.
- No additional text or commentary outside the XML.
Output only the XML behavior tree without extra text.
OUTPUT:
"""
output = llm(
prompt,
temperature=0,
max_tokens=1024,
top_p=0.95,
top_k=50,
repeat_penalty=1.1
)
response = output.get("choices", [{}])[0].get("text", "").strip()
print(response)
- Downloads last month
- -
Hardware compatibility
Log In
to view the estimation
4-bit
16-bit
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support