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.

Llama 3.2 3B Function Calling Model

This model is a fine-tuned version of meta-llama/Llama-3.2-3B-Instruct for function calling tasks.

Model Details

  • Base Model: Llama 3.2 3B Instruct
  • Fine-tuning Method: LoRA (Low-Rank Adaptation)
  • Dataset: Salesforce/xlam-function-calling-60k (1000 samples)
  • Training: 2 epochs with learning rate 2e-5

Usage

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model = AutoModelForCausalLM.from_pretrained("TurkishCodeMan/llama3.2-3b-intruct-function-calling")
tokenizer = AutoTokenizer.from_pretrained("TurkishCodeMan/llama3.2-3b-intruct-function-calling")

prompt = '''<|system|>
Available functions:
- get_weather: Gets current weather for a location

GPT 4 Correct user:
<|user|>
What's the weather in Tokyo?
GPT 4 correct assistant:'''

inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=64, do_sample=False)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Training Details

  • Learning Rate: 2e-5
  • Batch Size: 2 (per device)
  • Gradient Accumulation: 8 steps
  • LoRA Rank: 8
  • LoRA Alpha: 16
  • Target Modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj

Performance

The model demonstrates excellent function calling capabilities:

  • Correct function selection
  • Proper argument formatting
  • Professional response structure
Downloads last month
4
Safetensors
Model size
3.21B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for TurkishCodeMan/llama3.2-3b-intruct-function-calling

Adapter
(436)
this model