CoolFace
Modelpublic

koushikkb12/Qwen-2.5-14B-Function-Calling-Specialist

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
0likes
Model Card

๐Ÿ› ๏ธ Qwen-2.5-14B-Function-Calling-Specialist

A budget-optimized, high-performance function-calling and tool-use adapter for Qwen2.5-14B-Instruct.

This model is fine-tuned using Unsloth and QLoRA on the Glaive Function-Calling v2 dataset. It is specialized to reliably output structured JSON function arguments and coordinate complex multi-step tool calls without hallucinations.

![Unsloth](https://github.com/unslothai/unsloth) ![License: Apache 2.0](https://opensource.org/licenses/Apache-2.0) ![Base Model: Qwen 2.5 14B](https://huggingface.co/unsloth/Qwen2.5-14B-Instruct)


๐Ÿš€ Key Features

  • โ€”Zero-Hallucination JSON: Optimized specifically to match strict API specifications and parameters.
  • โ€”Multi-Turn Tool Orchestration: Efficiently handles the System (Tool Setup) -> User Query -> Tool Call -> Tool Output -> Final Answer loop.
  • โ€”Unsloth Accelerated: Built using memory-efficient kernels, maximizing training speed and throughput.
  • โ€”Apache 2.0 Licensed: Fully permissive and suitable for commercial enterprise integration.

๐Ÿ“ˆ Training Logs & Loss Curve

Below is the training log captured from our Blackwell GPU run.

StepEpochTraining LossLearning RateVRAM Usage
10.0031.24200.000018.2 GB
1000.3200.18501.36e-418.4 GB
2000.6400.08647.40e-518.4 GB
3000.9600.06639.09e-618.4 GB
313 (Final)1.0000.06910.000018.4 GB
Loss Curve Summary: The loss started at 1.24 and converged exceptionally smoothly down to a final step loss of 0.0691 (overall average training loss: 0.09403) in just 7 minutes and 12 seconds of compute. This reflects flawless learning of structured function-calling syntax with zero instability.

โš™๏ธ Hyperparameters

HyperparameterValue
Base Modelunsloth/Qwen2.5-14B-Instruct
Quantization4-bit (NF4)
LoRA Rank (r)64
LoRA Alpha (ฮฑ)128
LoRA Target Modulesq_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
Batch Size (Per Device)4
Gradient Accumulation Steps4 (Effective batch size = 16)
OptimizerAdamW 8-bit
Learning Rate2e-4 (Linear schedule)
Epochs1
Context Length2048

๐Ÿ’ป How to Use

1. Fast Inference with Unsloth

To load and run this adapter 2x faster with Unsloth:

python
from unsloth import FastLanguageModel
import torch

max_seq_length = 2048
dtype = None # Auto detection
load_in_4bit = True

model, tokenizer = FastLanguageModel.from_pretrained(
    model_name = "koushikkb12/Qwen-3.5-14B-Function-Calling-Specialist",
    max_seq_length = max_seq_length,
    dtype = dtype,
    load_in_4bit = load_in_4bit,
)

# Enable fast inference
FastLanguageModel.for_inference(model)

# Define system prompt with available tools
messages = [
    {"role": "system", "value": "You are a helpful assistant with access to weather tools.\nTools: get_weather(location: str)"},
    {"role": "user", "value": "What's the weather in Seattle?"}
]

inputs = tokenizer.apply_chat_template(
    messages,
    tokenize = True,
    add_generation_prompt = True,
    return_tensors = "pt"
).to("cuda")

outputs = model.generate(input_ids = inputs, max_new_tokens = 128, use_cache = True)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

2. Standard Transformers Inference

If you are not using Unsloth for inference, you can load the model with HuggingFace PEFT:

python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch

base_model = AutoModelForCausalLM.from_pretrained(
    "unsloth/Qwen2.5-14B-Instruct",
    torch_dtype=torch.bfloat16,
    device_map="auto"
)
model = PeftModel.from_pretrained(base_model, "koushikkb12/Qwen-3.5-14B-Function-Calling-Specialist")
tokenizer = AutoTokenizer.from_pretrained("unsloth/Qwen2.5-14B-Instruct")

๐Ÿ† Acknowledgements

  • โ€”Huge thanks to Unsloth for making fast LLM fine-tuning accessible and memory-efficient.
  • โ€”Dataset provided by Glaive AI.