Downloads · 30 days
7
13% of all-time downloads
ngbaoan/intent-banking
intent-banking is a text generation model from ngbaoan. Use it when you need the model to write or continue text. It is set up for peft.
This is a LoRA adapter fine-tuned on the BANKING77 dataset to perform fine-grained intent classification in the banking domain. The model is based on unsloth/Qwen2.5-7B and trained using the Unsloth library for highly…
Downloads · 30 days
7
13% of all-time downloads
All-time downloads
52
Public
Repo size
657 MB
Likes
1
Public
Click a slice to open those files.
.safetensors646 MB · 98%
From the Hugging Face model README
This is a LoRA adapter fine-tuned on the BANKING77 dataset to perform fine-grained intent classification in the banking domain. The model is based on unsloth/Qwen2.5-7B and trained using the Unsloth library for highly efficient training.
unsloth/qwen2.5-7b-unsloth-bnb-4bitThe model was evaluated on the test set and achieved the following results:
(Note: Some labels in the dataset subset might have 0 support, which affects the macro average. For supported intents, the F1 score ranges from 0.80 to 1.00).
This model is designed to classify user queries related to banking operations (e.g., card activation, lost cards, top-up failures, exchange rates, etc.) into one of 77 specific intents.
Example Input:
"I tried to top up my account using a card but it failed, what should I do?"
Example Output:
top_up_failed
The model was fine-tuned efficiently using Unsloth with 4-bit quantization and LoRA.
adamw_8bitcosineSince this is a LoRA adapter, you need to load the base model and then apply these PEFT weights. The easiest way is using the unsloth library or standard transformers.
from unsloth import FastLanguageModel
import torch
max_seq_length = 512
# 1. Load the model and tokenizer
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "ngbaoan/intent-banking", # Your Hugging Face repo
max_seq_length = max_seq_length,
dtype = None,
load_in_4bit = True,
)
FastLanguageModel.for_inference(model)
# 2. Format your prompt
prompt = """Instruct: Classify the following banking query into the correct intent.
Query: I lost my card yesterday and I need a replacement.
Intent: """
inputs = tokenizer([prompt], return_tensors = "pt").to("cuda")
# 3. Generate the response
outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = True)
print(tokenizer.batch_decode(outputs, skip_special_tokens = True)[0])