FLOR-1.3B Customer Service Chatbot (Catalan)
This project fine-tunes the projecte-aina/FLOR-1.3B
model from Projecte Aina specifically for a customer service chatbot in Catalan, utilizing the dataset ericrisco/customer_service_chatbot_ca
. The model is fine-tuned to understand and generate responses in Catalan, aiming to provide helpful and contextually relevant answers.
Model Details
Base Model: projecte-aina/FLOR-1.3B
Fine-tuning Dataset: ericrisco/customer_service_chatbot_ca
Language: Catalan
How to use it
<|startoftext|>
### Instruction
Below is an instruction that describes a task. You are a helpfull customer service assistant. Answer always in catalan.
### Context
Com puc accedir a la meva factura?
### Answer
Training and Fine-tuning Details
Training Configuration
- TrainingArguments:
output_dir
: flor1-3B-customerservice-instruct-tune-500smax_steps
: 500 (Training is step-based rather than epoch-based)per_device_train_batch_size
: 4warmup_steps
: 0.03logging_steps
: 10save_strategy
: epochevaluation_strategy
: stepseval_steps
: 20learning_rate
: 2e-4lr_scheduler_type
: constant
Model Preparation and Quantization
BitsAndBytesConfig:
- 4-bit quantization is enabled to optimize the model size and inference speed.
bnb_4bit_quant_type
: nf4bnb_double_quant
: Truebnb_4bit_compute_dtype
: torch.float16
LoRA Configuration (for Parameter-Efficient Fine-tuning):
lora_alpha
: 16lora_dropout
: 0.1lora_r
: 64bias
: nonetask_type
: CAUSAL_LM
Tokenizer
- The tokenizer from the base model
projecte-aina/FLOR-1.3B
is used. - Padding token is set to the unknown token, and padding is done to the right.
Dataset
- The dataset used for training and evaluation is
ericrisco/customer_service_chatbot_ca
. - The data is structured to provide context, instructions, and expected responses for a customer service scenario in Catalan.
Custom Prompt Formatting
- Custom prompts are created to structure the input and output in a way that is beneficial for a customer service chatbot.
- Each prompt includes:
- Beginning of the sequence token (
<|startoftext|>
) - Instruction text (defining the role and language of the model)
- Input text (customer's message)
- Expected response text
- End of the sequence token (
<|endoftext|>
)
- Beginning of the sequence token (
Training Process
- The model is trained using the
SFTTrainer
from thetrl
library, allowing for supervised fine-tuning on the task-specific dataset. - Training is performed with the specified parameters, focusing on a conversational structure and language understanding.
Usage
After fine-tuning, the model can generate responses to customer service inquiries in Catalan. To use the model, you should:
- Load the model and tokenizer.
- Prepare the input according to the custom prompt format.
- Generate the response using the model.
Detailed instructions and examples can be added to demonstrate the usage of the fine-tuned model.
Conclusion
The projecte-aina/FLOR-1.3B
model, fine-tuned on the ericrisco/customer_service_chatbot_ca
dataset, is expected to deliver responsive and contextually aware customer service interactions in Catalan. The fine-tuning process, coupled with parameter-efficient techniques and quantization, ensures that the model remains efficient while being effective in its designated task.
For further details, questions, or contributions, please refer to the project repository or contact the maintainers.
- Downloads last month
- 16
Model tree for ericrisco/flor-1-3B-customerservice
Base model
projecte-aina/FLOR-1.3B