You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

BTGenBot-2

AIRLab-POLIMI/llama-3.2-1b-it-ft-lora-bt is the fine-tuned Llama 3.2 1B Instruct model released with BTGenBot-2: Efficient Behavior Tree Generation with Small Language Models.

BTGenBot-2 generates executable robot Behavior Trees from:

  1. a natural-language task description, and
  2. a list of available robot action primitives.

The model outputs XML Behavior Trees compatible with BehaviorTree.CPP, supporting ROS 2 robotics behavior-tree pipelines.

For the complete project, examples, code, dataset, benchmark, and paper, visit:

👉 https://airlab-polimi.github.io/BTGenBot-2/

Model Details

Intended Use

This model is intended to generate robot Behavior Trees for research and development in robotics task planning.

Example applications include:

  • ROS 2 / Nav2-compatible task planning;
  • navigation Behavior Tree generation;
  • manipulation Behavior Tree generation;
  • simulation-based robot-task validation;
  • benchmarking language-model-based Behavior Tree generation.

Input Format

The recommended input format is:

Task:
Describe the robot task in natural language.

Actions:
[ActionName(parameters: parameter_1, parameter_2), AnotherAction(parameters: parameter_1)]

Output Format

The model is expected to return XML only:

<root BTCPP_format="4">
  <BehaviorTree ID="MainTree">
    ...
  </BehaviorTree>
</root>

Training Data

BTGenBot-2 was trained on a synthetic instruction-following dataset of 5,204 natural-language instruction / Behavior Tree pairs.

Each sample contains:

  • instruction: system-level instructions for Behavior Tree generation;
  • input: task description and available robot actions;
  • output: XML Behavior Tree.

The dataset was generated from real Behavior Trees and expanded through controlled synthetic generation.

See the full project page for details:

https://airlab-polimi.github.io/BTGenBot-2/

Training Procedure

The model was fine-tuned from meta-llama/Llama-3.2-1B-Instruct using QLoRA / LoRA.

Reported training details from the paper include:

  • Train/test split: 95% / 5%
  • Learning rate: 1e-4
  • Warmup ratio: 0.1
  • Batch size: 16
  • Training duration: approximately 30 hours
  • Hardware: 2 × NVIDIA RTX Quadro 6000 GPUs, 48 GB total VRAM

Citation

@article{izzo2026btgenbot,
  title={BTGenBot-2: Efficient Behavior Tree Generation with Small Language Models},
  author={Izzo, Riccardo Andrea and Bardaro, Gianluca and Matteucci, Matteo},
  journal={arXiv preprint arXiv:2602.01870},
  year={2026}
}

More Information

Downloads last month
-
Safetensors
Model size
1B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for AIRLab-POLIMI/llama-3.2-1b-it-ft-lora-bt

Finetuned
(1754)
this model

Dataset used to train AIRLab-POLIMI/llama-3.2-1b-it-ft-lora-bt

Collection including AIRLab-POLIMI/llama-3.2-1b-it-ft-lora-bt

Paper for AIRLab-POLIMI/llama-3.2-1b-it-ft-lora-bt

Evaluation results

  • Zero-shot Success Rate with Error Recovery on BT Benchmark
    self-reported
    90.380
  • One-shot Success Rate with Error Recovery on BT Benchmark
    self-reported
    98.070
  • XML Syntax Correctness with Error Recovery on BT Benchmark
    self-reported
    100.000
  • Action Coherency with Error Recovery on BT Benchmark
    self-reported
    100.000