Prototype: votes, saves, and profiles aren't stored on this hosted preview yet. No real accounts, and no emails or texts. Privacy

Recipes / Tool-calling & booking agents

Reinforcement-learn tool use on Qwen3-4B (Unsloth)

Qwen3-4B-Instruct-2507 trained with GRPO and reward functions to use tools correctly.

  • No license flags found

Source: Unsloth notebooks ↗ · by Unsloth · last updated Nov 22, 2026

What a local business could build with it

For an agency tuning an agent against a checkable goal (did the booking tool get the right arguments?). More work than plain fine-tuning.

Booking is merged into tool-calling: no source we found trains a booking agent as such, and a booking agent is a model that calls scheduling tools correctly.

How to run it

Commands are copied from the source, unchanged except where a notebook cell is cut at 40 lines (marked in the code). Placeholders like <you> are the source's own. Credit goes to the authors named on each block.

Install (as written in the notebook)

%%capture import os os.environ["UNSLOTH_VLLM_STANDBY"] = "1" # [NEW] Extra 30% context lengths! if "COLAB_" not in "".join(os.environ.keys()): # If you're not in Colab, just use pip install or uv pip install !pip install unsloth vllm else: pass # For Colab / Kaggle, we need extra instructions hidden below \/

From Unsloth notebook, Qwen3_(4B)-GRPO-Tool_Use ↗

Load the base model

from unsloth import FastLanguageModel import torch, importlib.util # vllm needs transformers 5 for tool calling, which no vllm supports on a T4, so a T4 generates with transformers fast_inference = importlib.util.find_spec("vllm") is not None max_seq_length = 2048 # Covers the prompt plus every tool call and tool result lora_rank = 32 # Larger rank = smarter, but slower model, tokenizer = FastLanguageModel.from_pretrained( model_name = "unsloth/Qwen3-4B-Instruct-2507", max_seq_length = max_seq_length, load_in_4bit = False, # False for LoRA 16bit fast_inference = fast_inference, # Enable vllm fast inference max_lora_rank = lora_rank, gpu_memory_utilization = 0.9, # Reduce if out of memory ) model = FastLanguageModel.get_peft_model( model, r = lora_rank, # Choose any number > 0 ! Suggested 8, 16, 32, 64, 128 target_modules = [ "q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj", ], lora_alpha = lora_rank*2, # *2 speeds up training use_gradient_checkpointing = "unsloth", # Reduces memory usage random_state = 3407, )

From Unsloth notebook, Qwen3_(4B)-GRPO-Tool_Use ↗

Set up training

trainer = GRPOTrainer( model = model, processing_class = tokenizer, reward_funcs = [ correct_answer, tool_use, ], tools = tools, args = training_args, train_dataset = dataset, ) trainer.train()

From Unsloth notebook, Qwen3_(4B)-GRPO-Tool_Use ↗

Licenses

No flags: every license we found for this recipe is permissive (Apache-2.0, MIT, BSD, CC BY or similar). Still read each one.

PartLicense, as the source or Hub states it
CodeLGPL-3.0 (Unsloth notebooks)
Base modelApache-2.0
DatasetDefined in the notebook

Checked against the Hugging Face API and each repo on December 4, 2026. A grouping like “$10M revenue cap” is our shorthand, not legal advice.