|
--- |
|
license: apache-2.0 |
|
pipeline_tag: text-generation |
|
tags: |
|
- finetuned |
|
inference: true |
|
widget: |
|
- messages: |
|
- role: user |
|
content: What is your favorite condiment? |
|
--- |
|
|
|
# Fine-tuning Mistral-7B-v0.1 on Symbolic Instruction Tuning Dataset |
|
|
|
This repository contains the fine-tuned version of the `mistralai/Mistral-7B-v0.1` model on the `sail/symbolic-instruction-tuning` dataset. The objective of this fine-tuning process is to specialize the pre-trained model for improved performance on tasks that require understanding and processing symbolic instructions. |
|
|
|
## Model Description |
|
|
|
`Mistral-7B-v0.1` is a transformer-based language model pre-trained on a diverse corpus of text. Our fine-tuning process aims to leverage this pre-trained model and further optimize it for the symbolic instruction tuning task provided by the `sail/symbolic-instruction-tuning` dataset. |
|
|
|
## Dataset |
|
|
|
The `sail/symbolic-instruction-tuning` dataset is designed to test a model's ability to comprehend and execute symbolic instructions. It consists of a series of tasks that require the model to manipulate symbolic inputs according to specific instructions. |
|
|
|
## Fine-tuning Process |
|
|
|
The fine-tuning process involves the following steps: |
|
|
|
1. **Environment Setup**: Ensure that your environment has all the necessary dependencies installed, including `transformers` and `datasets` from Hugging Face. |
|
|
|
2. **Data Preparation**: Load the `sail/symbolic-instruction-tuning` dataset using the `datasets` library and prepare it for the training process, including any necessary preprocessing steps. |
|
|
|
3. **Model Initialization**: Load the pre-trained `mistralai/Mistral-7B-v0.1` model and prepare it for fine-tuning. |
|
|
|
4. **Training**: Fine-tune the model on the prepared dataset using an appropriate training script. This involves setting hyperparameters, training loops, and logging. |
|
|
|
5. **Evaluation**: Evaluate the fine-tuned model's performance on a validation set to ensure that it has learned the task effectively. |
|
|
|
6. **Saving and Sharing**: Save the fine-tuned model and upload it to the Hugging Face model hub for easy sharing and reuse. |
|
|
|
## Usage |
|
|
|
The fine-tuned model can be loaded from the Hugging Face model hub using the `transformers` library as follows: |
|
|
|
```python |
|
from transformers import AutoModelForCausalLM, AutoTokenizer |
|
|
|
model_name = "rootsec1/mistal-7B-it-aipi" |
|
tokenizer = AutoTokenizer.from_pretrained(model_name) |
|
model = AutoModelForCausalLM.from_pretrained(model_name) |
|
|
|
# Example usage |
|
inputs = tokenizer("Example input", return_tensors="pt") |
|
outputs = model.generate(**inputs) |
|
print(tokenizer.decode(outputs[0], skip_special_tokens=True)) |
|
``` |
|
|