Instructions to use minhthien/banking-intent-unsloth-checkpoint with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use minhthien/banking-intent-unsloth-checkpoint with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/llama-3-8b-Instruct-bnb-4bit") model = PeftModel.from_pretrained(base_model, "minhthien/banking-intent-unsloth-checkpoint") - Transformers
How to use minhthien/banking-intent-unsloth-checkpoint with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="minhthien/banking-intent-unsloth-checkpoint") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("minhthien/banking-intent-unsloth-checkpoint", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use minhthien/banking-intent-unsloth-checkpoint with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "minhthien/banking-intent-unsloth-checkpoint" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "minhthien/banking-intent-unsloth-checkpoint", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/minhthien/banking-intent-unsloth-checkpoint
- SGLang
How to use minhthien/banking-intent-unsloth-checkpoint with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "minhthien/banking-intent-unsloth-checkpoint" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "minhthien/banking-intent-unsloth-checkpoint", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "minhthien/banking-intent-unsloth-checkpoint" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "minhthien/banking-intent-unsloth-checkpoint", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use minhthien/banking-intent-unsloth-checkpoint with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for minhthien/banking-intent-unsloth-checkpoint to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for minhthien/banking-intent-unsloth-checkpoint to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for minhthien/banking-intent-unsloth-checkpoint to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="minhthien/banking-intent-unsloth-checkpoint", max_seq_length=2048, ) - Docker Model Runner
How to use minhthien/banking-intent-unsloth-checkpoint with Docker Model Runner:
docker model run hf.co/minhthien/banking-intent-unsloth-checkpoint
Banking Intent Classifier — Llama 3 8B (LoRA)
A LoRA adapter fine-tuned on top of Llama 3 8B Instruct (4-bit) for banking customer intent classification using the BANKING77 dataset.
Model Details
- Base model: unsloth/llama-3-8b-Instruct-bnb-4bit
- Model type: Causal LM + LoRA adapter (PEFT)
- Task: Intent classification (77 classes)
- Language: English
- Fine-tuned by: nguyenvmthien
- Repository: nguyenvmthien/banking-intent-unsloth
- Framework: Unsloth + TRL (SFT) + PEFT 0.18.1
Training Details
Dataset
Sampled from the BANKING77 dataset — 77 fine-grained intent categories for banking customer service queries.
| Split | Samples |
|---|---|
| Train | 10,016 |
| Test | 3,084 |
Hyperparameters
| Parameter | Value |
|---|---|
| LoRA rank (r) | 16 |
| LoRA alpha | 16 |
| LoRA dropout | 0 |
| Target modules | q, k, v, o, gate, up, down proj |
| Learning rate | 2e-4 |
| Batch size | 2 |
| Gradient accumulation | 4 |
| Epochs | 1 |
| Optimizer | AdamW 8-bit |
| LR scheduler | Linear |
| Max seq length | 256 |
| Quantization | 4-bit (load_in_4bit) |
Prompt Format
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Classify the intent of the following banking customer request.
### Input:
{customer_message}
### Response:
Usage
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="minhthien/banking-intent-unsloth-checkpoint",
max_seq_length=256,
dtype=None,
load_in_4bit=True,
)
FastLanguageModel.for_inference(model)
Or clone the full inference/evaluation code:
git clone https://github.com/nguyenvmthien/banking-intent-unsloth.git
cd banking-intent-unsloth
pip install -r requirements.txt
python scripts/evaluate.py
Evaluation
Evaluation uses log-probability scoring over all 77 candidate intent labels (no text generation needed), which is faster and more deterministic.
Results will be updated after full evaluation run.
| Model | Accuracy |
|---|---|
| Base (zero-shot) | — |
| Fine-tuned (this model) | — |
- Downloads last month
- 3
Model tree for minhthien/banking-intent-unsloth-checkpoint
Base model
unsloth/llama-3-8b-Instruct-bnb-4bit