Instructions to use AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.2-3B") model = PeftModel.from_pretrained(base_model, "AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead") - Transformers
How to use AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead
- SGLang
How to use AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead 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 "AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead with Docker Model Runner:
docker model run hf.co/AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead
Llama-3.2-3B-banking77-lora_nclasshead
This model is a fine-tuned version of meta-llama/Llama-3.2-3B on the banking77 dataset. It achieves the following results on the evaluation set:
- Loss: 0.0615
- Exact Match: 0.9271
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0001
- train_batch_size: 16
- eval_batch_size: 32
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 20
Training results
| Training Loss | Epoch | Step | Validation Loss | Exact Match |
|---|---|---|---|---|
| 0.0929 | 1.0 | 282 | 0.0978 | 0.8721 |
| 0.0501 | 2.0 | 564 | 0.0698 | 0.9181 |
| 0.0293 | 3.0 | 846 | 0.0615 | 0.9271 |
| 0.0153 | 4.0 | 1128 | 0.0724 | 0.9241 |
| 0.0097 | 5.0 | 1410 | 0.0854 | 0.9151 |
| 0.0074 | 6.0 | 1692 | 0.0890 | 0.9251 |
Framework versions
- PEFT 0.21.0
- Transformers 5.17.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.23.1
Prompt format
Classify the banking customer message into one intent.
Message: {text}
Intent:
The model completes with {intent_name}<|end_of_text|>.
Built with Llama. Licensed under the Llama 3.2 Community License.
- Downloads last month
- 39
Model tree for AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead
Base model
meta-llama/Llama-3.2-3BDataset used to train AzadDjan/Llama-3.2-3B-banking77-lora_nclasshead
Evaluation results
- Accuracy on Banking77test set self-reported0.928
- Macro F1 on Banking77test set self-reported0.929
- Macro Precision on Banking77test set self-reported0.934
- Macro Recall on Banking77test set self-reported0.928