CoolFace
Modelpublic

SohaibAbdoAhmed/smollm2-glaive-fc-best-adapter

sourceHugging Faceupdated 11d agoView on Hugging Face
0likes29downloads
Model Card

SmolLM2-1.7B-Instruct Fine-Tuned for Function Calling (QLoRA)

This is the best performing LoRA adapter for HuggingFaceTB/SmolLM2-1.7B-Instruct fine-tuned on the glaiveai/glaive-function-calling-v2 dataset.

How to Use

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

base_model_id = "HuggingFaceTB/SmolLM2-1.7B-Instruct"
adapter_repo_id = "SohaibAbdoAhmed/smollm2-glaive-fc-best-adapter"

tokenizer = AutoTokenizer.from_pretrained(adapter_repo_id)
base_model = AutoModelForCausalLM.from_pretrained(
    base_model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto"
)
model = PeftModel.from_pretrained(base_model, adapter_repo_id)