--- tags: - tool-calling - diffusion - pytorch --- # Diffusion tool caller 150M — slot posttrain **Code and reproduction:** [github.com/chameleon-lizard/diffusion-toolcaller](https://github.com/chameleon-lizard/diffusion-toolcaller) This custom PyTorch checkpoint adds a binary tool-routing head and a three-state (`absent`/`null`/`value`) slot head to the masked diffusion backbone. The diffusion token head generates each selected field's raw value; code validates types and assembles the outer JSON. It selects **at most one tool** and does not execute tools. The backbone started from the [long-pretrain checkpoint](https://huggingface.co/chameleon-lizard/buckwheat-diffusion-base), then received **1.6B mid-training input tokens** and five epochs of slot-format SFT on roughly 10k filtered xLAM examples. The exported weights come from the fifth SFT epoch. Candidate-tool prompts have a 384-token budget; each slot has up to 128 output positions. RoPE is computed in FP32 as in training. Use the [code repository](https://github.com/chameleon-lizard/diffusion-toolcaller) and install its requirements plus CUDA PyTorch: ```bash hf download chameleon-lizard/buckwheat-diffusion-toolcaller --local-dir model python call.py --checkpoint model --tools examples/unseen_quotes.tools.json \ --query "Get quotes from the inspiration category on page 3." ``` This is **not** a `transformers.AutoModel` package. Files are `model.safetensors`, `config.json`, a validation-only `calibration.json` (threshold 0.035), and the exact training `tokenizer.json` (SHA-256 `6c8aaa9a542084f2457eab775d4eeb51f92a70c0fd9de28d5edb0ddec3c08d30`). Optimizer and RNG state, absolute paths, and raw data were removed. On a **600-example BFCL v4 subset** with the upstream AST checker, forced-call accuracy was **298/600**: 203/400 `simple_python`, 95/200 `multiple`. This is not the official overall BFCL score. A separate thresholded end-to-end comparison used 64 output positions and 64 denoising steps and found 1,375/3,051 pooled correct cases over selected non-parallel categories. Parallel calls, Java/JavaScript, and interactive categories were not evaluated with this adapter. The model can choose a wrong tool or value; validate proposed calls before execution. Training data includes xLAM/APIGen examples; see [APIGen](https://arxiv.org/abs/2406.18518). The tokenizer's upstream license has not been independently established here. This is a research release, not a tool-execution system.